Skip to content

Ability to modify laws #16

@ghxm

Description

@ghxm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions