spaCy v2.2.2 Release Notes

Release Date: 2019-10-31 // over 4 years ago
  • ๐Ÿฑ โœจ New features and improvements

    • ๐Ÿ†• NEW: Support multiprocessing in nlp.pipe via the n_process argument (Python 3 only).
    • ๐Ÿ‘ Base language support for Luxembourgish.
    • โž• Add noun chunks iterator for Swedish.
    • ๐Ÿ“œ Retrained models for Greek, Norwegian Bokmรฅl and Lithuanian that now correctly support parser-based sentence segmentation.
    • ๐Ÿ“ฆ Repackaged models for Greek and German with improved lookup tables via spacy-lookups-data.
    • โž• Add warning in debug-data for low sentences per doc ratio.
    • ๐Ÿ‘Œ Improve checks and errors related to ill-formed IOB input in convert and debug-data CLI.
    • ๐Ÿ‘Œ Support training dict format as JSONL.
    • ๐Ÿ‘‰ Make EntityRuler ID resolution 2ร— faster and support "id" in patterns to set Token.ent_id.
    • ๐Ÿ‘Œ Improve rendering of named entity spans in displacy for RTL languages.
    • Update Thinc to ditch thinc_gpu_ops for simpler GPU install.
    • ๐Ÿ‘Œ Support Mish activation in spacy pretrain.
    • โž• Add forwards-compatible support for new Language.disable_pipes API, which will become
      0๏ธโƒฃ the default in the future. The method can now also take a list of component names as its first argument (instead of a variable number of arguments).

      • disabled = nlp.disable_pipes("tagger", "parser")+ disabled = nlp.disable_pipes(["tagger", "parser"])
    • โž• Add forwards-compatible support for new Matcher.add and PhraseMatcher.add API, which will become the default in the future. The patterns are now the second argument and a list (instead of a variable number of arguments). The on_match callback becomes an optional keyword argument.

      patterns = [[{"TEXT": "Google"}, {"TEXT": "Now"}], [{"TEXT": "GoogleNow"}]]- matcher.add("GoogleNow", None, *patterns)+ matcher.add("GoogleNow", patterns)- matcher.add("GoogleNow", on_match, *patterns)+ matcher.add("GoogleNow", patterns, on_match=on_match)

    • โž• Add new and improved tokenization alignment in gold.align behind a feature flag. The new alignment may produce backwards-incompatible results, so it won't be enabled by default before v3.0.

      import spacy.gold spacy.gold.USE_NEW_ALIGN = True

    ๐Ÿฑ ๐Ÿ”ด Bug fixes

    • ๐Ÿ›  Fix issue #1303: Support multiprocessing in nlp.pipe.
    • Fix issue #1745: Ditch thinc_gpu_ops for simpler GPU install.
    • ๐Ÿ›  Fix issue #2411: Update Thinc to fix compilation on cygwin.
    • ๐Ÿ›  Fix issue #3412: Prevent division by zero in Vectors.most_similar.
    • ๐Ÿ›  Fix issue #3618: Fix memory leak for long-running parsing processes.
    • ๐Ÿ›  Fix issue #4241: Update Greek lookups in spacy-lookups-data.
    • ๐Ÿ›  Fix issue #4269: Extend unicode character block for Sinhala.
    • ๐Ÿ›  Fix issue #4362: Improve URL_PATTERN and handling in tokenizer.
    • ๐Ÿ›  Fix issue #4373: Make PhraseMatcher.vocab consistent with Matcher.vocab.
    • ๐Ÿ›  Fix issue #4377: Clarify serialization of extension attributes.
    • ๐Ÿ›  Fix issue #4382: Improve usage of pkg_resources and handling of entry points.
    • ๐Ÿ›  Fix issue #4386: Consider batch_size when sorting similar vectors.
    • ๐Ÿ›  Fix issue #4389: Fix ner_jsonl2json converter.
    • ๐Ÿ›  Fix issue #4397: Ensure on_match callback is executed in PhraseMatcher.
    • ๐Ÿ›  Fix issue #4401, #4408: Fix sentence segmentation in Greek, Norwegian and Lithuanian models.
    • ๐Ÿ›  Fix issue #4402: Fix issue with how training data was passed through the pipeline.
    • ๐Ÿ›  Fix issue #4406: Correct spelling in lemmatizer API docs.
    • ๐Ÿ›  Fix issue #4418, #4438: Improve knowledge base and Wikidata parsing.
    • ๐Ÿ›  Fix issue #4435: Fix PhraseMatcher.remove for overlapping patterns.
    • ๐Ÿ›  Fix issue #4443: Fix bug in Vectors.most_similar.
    • Fix issue #4452: Fix gold.docs_to_json documentation.
    • Fix issue #4463: Add missing cats to GoldParse.from_annot_tuples in Scorer.
    • ๐Ÿ›  Fix issue #4470: Suppress convert output if writing to stdout.
    • ๐Ÿ›  Fix issue #4475: Correct mistake in docs example.
    • ๐Ÿ›  Fix issue #4485: Update tag maps and docs for English and German.
    • ๐Ÿ›  Fix issue #4493: Update information in spaCy Universe.
    • ๐Ÿ›  Fix issue #4496: Improve docs of PhraseMatcher.add arguments.
    • ๐Ÿ›  Fix issue #4506: Ensure Vectors.most_similar returns 1.0 for identical vectors.
    • ๐Ÿ›  Fix issue #4509: Fix None iteration error in entity linking script.
    • ๐Ÿ›  Fix issue #4524: Fix typo in Parser sample construction of GoldParse.
    • ๐Ÿ›  Fix issue #4528: Fix serialization of extension attribute values in DocBin.
    • ๐Ÿ›  Fix issue #4529: Ensure GoldParse is initialized correctly with misaligned tokens.
    • ๐Ÿ›  Fix issue #4538: Backport memory leak fix to v2.1.x branch and release v2.1.9.

    ๐Ÿฑ โš ๏ธ Backwards incompatibilities

    • The unused attributes lemma_rules, lemma_index, lemma_exc and lemma_lookup of the Language.Defaults have now been removed to prevent confusion (e.g. if users add rules that then have no effect). The only place lemmatization tables are stored and can be modified at runtime is via nlp.vocab.lookups.

      • nlp.Defaults.lemma_lookup["spaCies"] = "spaCy"+ lemma_lookup = nlp.vocab.lookups.get_table("lemma_lookup")+ lemma_lookup["spaCies"] = "spaCy"

    ๐Ÿ“š ๐Ÿ“– Documentation and examples

    • ๐Ÿ›  Fix various typos and inconsistencies.
    • โž• Add more projects to the spaCy Universe.

    ๐Ÿ‘ฅ Contributors

    Thanks to @tamuhey, @PeterGilles, @akornilo, @danielkingai2, @ghollah, @pberba, @gustavengstrom, @ju-sh, @kabirkhan, @ZhuoruLin, @nipunsadvilkar and @neelkamath for the pull requests and contributions.