BERT-E2E-ABSA icon indicating copy to clipboard operation
BERT-E2E-ABSA copied to clipboard

tag2ts problem

Open NourAlMerey opened this issue 5 years ago • 2 comments

When will this condition be satisfied,since it's impossible for the sentiments list to be bigger than one in this condition?

elif pos == 'B': beg = i if len(sentiments) > 1: # remove the effect of the noisy I-{POS,NEG,NEU} #print(sentiments) sentiments = [sentiments[-1]]

NourAlMerey avatar Sep 07 '20 08:09 NourAlMerey

Sorry for the late reply.

When tagging_schema is BIEOS, the sentiment tag list (i.e., the variable sentiments) will be emptied if and only if the current boundary tag is "S" or "E".

In the ideal case, we will not meet the next "B-POS/NEG/NEU" until the previous span is completed (i.e., encounter "S-POS/NEG/NEU" or "E-POS/NEG/NEU"), however, this is not guaranteed in the testing phase. Considering the example that the current prediction is "B-POS" and the previous predictions are {"I-NEG", "I-NEG", "I-NEG", "I-POS"}. Since the sentiments will accumulate the noisy sentiment tags, we need to remove them and start from the sentiment tag associated with the current "B".

lixin4ever avatar Sep 11 '20 02:09 lixin4ever

Oh now I get it. Thank you

NourAlMerey avatar Sep 12 '20 06:09 NourAlMerey