Objective
Individual parts of laws (e.g. spans in the .spans SpanGroups should be editable.
Aims
- Obtain a spaCy document with updated text while keeping all annotations/elements
Solutions
A. Markup text and export marked text
- Store replacement text in
._.replacement_text attribute
- Import into spaCy/euCy with special markup reader for element detection
Problem: When re-reading into spaCy, markup will become part of document
B. Export text and annotation separately
- Store replacement text in
._.replacement_text attribute
- Export annotation in standard spaCy JSON
Problems:
- How to export the text and
- update the spans (when a previous span changes, start of next one also changes)
C. Split text and recreate doc at every (changes) span to obtain text + annotation (can then continue with e.g. 2.)
→ https://stackoverflow.com/a/75300856/5565500
Works at token level?
Problem: Problem might be computationally heavy
Objective
Individual parts of laws (e.g. spans in the
.spansSpanGroups should be editable.Aims
Solutions
A. Markup text and export marked text
._.replacement_text attributeProblem: When re-reading into spaCy, markup will become part of document
B. Export text and annotation separately
._.replacement_text attributeProblems:
C. Split text and recreate doc at every (changes) span to obtain text + annotation (can then continue with e.g. 2.)
→ https://stackoverflow.com/a/75300856/5565500
Works at token level?
Problem: Problem might be computationally heavy