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

Disregard special tag _SP in check for new tag map #5641

Merged

Conversation

adrianeboyd
Copy link
Contributor

@adrianeboyd adrianeboyd commented Jun 24, 2020

Description

In Tagger.begin_training() check for new tags aside from _SP in the new tag map initialized from the provided gold tuples when determining whether to reinitialize the morphology with the new tag map.

This fixes a regression introduced by #5527 when Tagger.begin_training() is called without gold tuples.

Fixes #5648.

Types of change

Bug fix.

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.

In `Tagger.begin_training()` check for new tags aside from `_SP` in the
new tag map initialized from the provided gold tuples when determining
whether to reinitialize the morphology with the new tag map.
@adrianeboyd adrianeboyd added bug Bugs and behaviour differing from documentation feat / tagger Feature: Part-of-speech tagger labels Jun 24, 2020
spacy/pipeline/pipes.pyx Outdated Show resolved Hide resolved
@svlandeg svlandeg merged commit b7107ac into explosion:master Jun 26, 2020
honnibal pushed a commit that referenced this pull request Jun 29, 2020
* Fix typos and auto-format [ci skip]

* Add pkuseg warnings and auto-format [ci skip]

* Update Binder URL [ci skip]

* Update Binder version [ci skip]

* Update alignment example for new gold.align

* Update POS in tagging example

* Fix numpy.zeros() dtype for Doc.from_array

* Change example title to Dr.

Change example title to Dr. so the current model does exclude the title
in the initial example.

* Fix spacy convert argument

* Warning for sudachipy 0.4.5 (#5611)

* Create myavrum.md (#5612)

* Update lex_attrs.py (#5608)

* Create mahnerak.md (#5615)

* Some changes for Armenian (#5616)

* Fixing numericals

* We need a Armenian question sign to make the sentence a question

* Add Nepali Language  (#5622)

* added support for nepali lang

* added examples and test files

* added spacy contributor agreement

* Japanese model: add user_dict entries and small refactor (#5573)

* user_dict fields: adding inflections, reading_forms, sub_tokens
deleting: unidic_tags
improve code readability around the token alignment procedure

* add test cases, replace fugashi with sudachipy in conftest

* move bunsetu.py to spaCy Universe as a pipeline component BunsetuRecognizer

* tag is space -> both surface and tag are spaces

* consider len(text)==0

* Add warnings example in v2.3 migration guide (#5627)

* contribute (#5632)

* Fix polarity of Token.is_oov and Lexeme.is_oov (#5634)

Fix `Token.is_oov` and `Lexeme.is_oov` so they return `True` when the
lexeme does **not** have a vector.

* Extend what's new in v2.3 with vocab / is_oov (#5635)

* Skip vocab in component config overrides (#5624)

* Fix backslashes in warnings config diff (#5640)

Fix backslashes in warnings config diff in v2.3 migration section.

* Disregard special tag  _SP in check for new tag map (#5641)

* Skip special tag  _SP in check for new tag map

In `Tagger.begin_training()` check for new tags aside from `_SP` in the
new tag map initialized from the provided gold tuples when determining
whether to reinitialize the morphology with the new tag map.

* Simplify _SP check

Co-authored-by: Ines Montani <[email protected]>
Co-authored-by: Marat M. Yavrumyan <[email protected]>
Co-authored-by: Karen Hambardzumyan <[email protected]>
Co-authored-by: Rameshh <[email protected]>
Co-authored-by: Hiroshi Matsuda <[email protected]>
Co-authored-by: Richard Liaw <[email protected]>
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 / tagger Feature: Part-of-speech tagger
Projects
None yet
Development

Successfully merging this pull request may close these issues.

part of speech tagger training example from documentation doesn't seem to work after update
2 participants