Skip to content
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

Support doc.spans in Example.from_dict #7197

Merged
merged 4 commits into from
Mar 2, 2021

Conversation

svlandeg
Copy link
Member

Description

For quick tests, it's useful to be able to define doc.spans via Example.from_dict (e.g. for the upcoming coref work)

cf also comment here: #6747 (comment). The workaround provided in that PR wouldn't work if the spans are overlapping. See also new unit tests.

Types of change

enhancement

Checklist

  • I have submitted the spaCy Contributor Agreement.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@svlandeg svlandeg added enhancement Feature requests and improvements feat / doc Feature: Doc, Span and Token objects feat / training Feature: Training utils, Example, Corpus and converters labels Feb 24, 2021
@svlandeg svlandeg mentioned this pull request Mar 1, 2021
3 tasks
@honnibal
Copy link
Member

honnibal commented Mar 2, 2021

Ah tupley entity format, we cannot leave you.

Looks good though!

@honnibal honnibal merged commit 212f0e7 into explosion:master Mar 2, 2021
@svlandeg svlandeg deleted the feature/span_dict_example branch March 2, 2021 14:34
@svlandeg svlandeg mentioned this pull request Mar 3, 2021
3 tasks
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request Mar 5, 2021
* add support for spans in Example.from_dict

* add unit tests

* update error to E879
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and improvements feat / doc Feature: Doc, Span and Token objects feat / training Feature: Training utils, Example, Corpus and converters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants