UKPLab / sentence-transformers

State-of-the-Art Text Embeddings
https://www.sbert.net
Apache License 2.0
14.78k stars 2.43k forks source link

Word embeddings for semantic role labelling #139

Open kchax4377 opened 4 years ago

kchax4377 commented 4 years ago

First of all, thank you for your wonderful work "SBERT". Is there a way to create the embeddings for semantic role labelling (SRL) task? For example, I want to create the embeddings in the following manner:

sentence:verb:SRL Role 1:SRL Role 2:....:SRL Role n An example:

John hit Jack with a stick while playing : hit : John : with a stick : while playing

The objective is to use the 'verb' as the marker and identify the 'subject' and 'object' of the sentence. So, how do I create such an embedding?

nreimers commented 4 years ago

Hi @kchax4377 I'm sadly not sure what you want to achieve.

In SRL, you usually want to identify the frame trigger (for example the word hit) and the frame arguments (for example the subject John and object Jack).

For that, you usually use classification methods, for example, based on BERT.

Not sure how you want to use sentence embeddings for that?

Best Nils Reimers

kchax4377 commented 4 years ago

Well, actually I am not able to figure out how to tell BERT to recognize the VERB and the corresponding SUBJECT and OBJECT. My corpus is already tagged as:

in CSV format. So, how do I use this format in BERT or SBERT, so that the VERB and the other semantic constituents are understood by BERT. In other words, my first task is to tell BERT to identify each of the semantic constituents. My second task is to cluster sentences with similar SUBJECTS and OBJECTS. I have no clue on implementing it using BERT. So, need your help in this regard. On Sat, 29 Feb 2020, 14:48 Nils Reimers, wrote: > Hi @kchax4377 > I'm sadly not sure what you want to achieve. > > In SRL, you usually want to identify the frame trigger (for example the > word hit) and the frame arguments (for example the subject John and object > Jack). > > For that, you usually use classification methods, for example, based on > BERT. > > Not sure how you want to use sentence embeddings for that? > > Best > Nils Reimers > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . >