Using merge_entities pipe with abbreviation detector #10658
-
Hi, I have been having problems using the merge_entites pipe along with the abbreviation detector. I get the following error:
This is the part of the code that causes the error:
On a conceptual level, I understand that by merging entities I change the length of the doc (the number of tokens - as even entities that are made up of multiple words as merge together into one Spacy token), but on a technical level I don't know how to solve this. Also, the error is raised by the line abbrev_key = str(abbrev).strip() and I don't understand why the problem is not raised when calling the for loop. This is what my pipeline looks like:
The model I am using: en_core_sci_md-0.4.0 (Scispacy) Would be very grateful if someone could help me out. Thanks a lot. --- EDITS --- FULL CODE:
FULL ERROR MESSAGE:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Just as a note, scispacy is a separate project, and the abbreviation detector is a part of it. You might have more luck asking at their repo. Also there's not enough information here to debug this I think.
|
Beta Was this translation helpful? Give feedback.
Just as a note, scispacy is a separate project, and the abbreviation detector is a part of it. You might have more luck asking at their repo.
Also there's not enough information here to debug this I think.
nlp
call or accessing attributes later? Please include a sample we (or whoever) can run to reproduce your error.