-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
annotating choice elements #1
Comments
There are two parts to the answer:
Afterwards, the plain text looks better and spacy also recognizes the entity as PERSON.
does not find a unique context (that's what your error message will print there).
the first part is at a certain depth
and the Brienne is two depths further.
with
So in this particular case, it would be possible to add it explicitly at depth 4:
But as a more general approach, we could do an |
Code has been fixed according to your explanation. view = View(so).shrink_whitespace() And this loop is now being used for the XML annotation: `# Annotate the named entities in the XML content
|
Using the SOC python notebook, spacy did a good job annotating the following phrase with entities:
a letter from the King of <placeName type="gpe">Jerusalem</placeName>, i.e. <persName>John de Brienne</persName>
However, when we have a choice element that looks like this:
a letter from the King of Jerusalem, i.e. John de <choice><sic>Brinn</sic><corr>Brienne</corr></choice>
(see tei-c choice)
When stripping the elements and printing the plain text, SOC printed "John de BrinBrienne", and when it exported the xml at the end it went back to the proper choice structure. However, the entity John de Brienne was not annotated.
Any idea why?
I would expect the following result:
a letter from the King of <placeName type="gpe">Jerusalem</placeName>, i.e. <persName>John de <choice><sic>Brinn</sic><corr>Brienne</corr></choice></persName>
The text was updated successfully, but these errors were encountered: