You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also I think the state machine is wrong, if there are more than 2 tokens for a single annotation, the results is BIBI rather than BIII. The code will only generate an I-MENTION if the preceding token is B-MENTION. But what it should do is generate I-MENTION if the previous token is B-MENTION or I-MENTION and we're still in the same annotation.
I replaced lines 88-103 with the following - I'm not 100% sure its correct / robust though
for token in tokens:
tag = "O"
for annotation in annotations:
if token.begin >= annotation.begin and token.end <= annotation.end:
if token.begin == annotation.begin:
tag = "B-MENTION"
elif token.end <= annotation.end:
tag = "I-MENTION"
break
I think the line below
inception-external-recommender/ariadne/contrib/sklearn.py
Line 92 in 41d894c
should be
if token.begin >= annotation.begin and token.end <= annotation.end:
The text was updated successfully, but these errors were encountered: