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

EditTreeLemmatizer: correctly add strings when initializing from labels #11934

Merged

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Dec 5, 2022

Description

Strings in replacement nodes where not added to the StringStore when EditTreeLemmatizer was initialized from a set of labels. The corresponding test did not capture this because it added the strings through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing' of the bug in the test.

Bug found while implementing distillation, since it relies purely on this functionality to initialize the teacher.

Types of change

Bug fix.

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • 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.

Strings in replacement nodes where not added to the `StringStore`
when `EditTreeLemmatizer` was initialized from a set of labels. The
corresponding test did not capture this because it added the strings
through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing'
of the bug in the test.
@danieldk danieldk added bug Bugs and behaviour differing from documentation feat / lemmatizer Feature: Rule-based and lookup lemmatization labels Dec 5, 2022
Copy link
Contributor

@polm polm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@polm polm merged commit 27fac7d into explosion:master Dec 7, 2022
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request Dec 9, 2022
…ls (explosion#11934)

Strings in replacement nodes where not added to the `StringStore`
when `EditTreeLemmatizer` was initialized from a set of labels. The
corresponding test did not capture this because it added the strings
through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing'
of the bug in the test.
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request Dec 9, 2022
…ls (explosion#11934)

Strings in replacement nodes where not added to the `StringStore`
when `EditTreeLemmatizer` was initialized from a set of labels. The
corresponding test did not capture this because it added the strings
through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing'
of the bug in the test.
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request Dec 9, 2022
…ls (explosion#11934)

Strings in replacement nodes where not added to the `StringStore`
when `EditTreeLemmatizer` was initialized from a set of labels. The
corresponding test did not capture this because it added the strings
through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing'
of the bug in the test.
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request Dec 9, 2022
…ls (explosion#11934)

Strings in replacement nodes where not added to the `StringStore`
when `EditTreeLemmatizer` was initialized from a set of labels. The
corresponding test did not capture this because it added the strings
through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing'
of the bug in the test.
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request Dec 9, 2022
…ls (explosion#11934)

Strings in replacement nodes where not added to the `StringStore`
when `EditTreeLemmatizer` was initialized from a set of labels. The
corresponding test did not capture this because it added the strings
through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing'
of the bug in the test.
adrianeboyd pushed a commit to adrianeboyd/spaCy that referenced this pull request Dec 9, 2022
…ls (explosion#11934)

Strings in replacement nodes where not added to the `StringStore`
when `EditTreeLemmatizer` was initialized from a set of labels. The
corresponding test did not capture this because it added the strings
through the examples that were passed to the initialization.

This change fixes both this bug in the initialization as the 'shadowing'
of the bug in the test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and behaviour differing from documentation feat / lemmatizer Feature: Rule-based and lookup lemmatization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants