explosion/spaCy: v2.1.0a3: New models, ULMFit/BERT/Elmo-like pretraining, joint word segmentation and parsing, better Matcher, bug fixes & more
Authors/Creators
- Matthew Honnibal1
- Ines Montani1
- Matthew Honnibal1
- Henning Peters2
- Maxim Samsonov
- Jim Geovedi
- Jim Regan
- GyΓΆrgy Orosz3
- SΓΈren Lind Kristiansen
- Paul O'Leary McCann
- Duygu Altinok4
- Roman5
- GrΓ©gory Howard
- Alex6
- Sam Bozek
- Explosion Bot7
- Mark Amery
- Leif Uwe Vogelsang
- Pradeep Kumar Tippa
- GregDubbin
- Wannaphong Phatthiyaphaibun8
- Vadim Mazaev
- Jens Dahl MΓΈllerhΓΈj9
- wbwseeker
- Magnus Burton
- mpuels10
- Yubing Dong (Tom)11
- thomasO
- Ramanan Balakrishnan12
- Avadh Patel13
- 1. Founder @explosion
- 2. RiseML
- 3. LogMeIn, Meltwater
- 4. 4Com
- 5. @kouchtv
- 6. chatme.ai
- 7. @explosion
- 8. @PyThaiNLP
- 9. mollerhoj
- 10. @yoyolabsio
- 11. Quora
- 12. @Semantics3
- 13. SUNY Binghamton - Computer Science
Description
π This is an alpha pre-release of spaCy v2.1.0 and available on pip as spacy-nightly. It's not intended for production use.
pip install -U spacy-nightly
If you want to test the new version, we recommend using a new virtual environment. Also make sure to download the new models β see below for details and benchmarks.
β¨ New features and improvements Tagger, Parser & NERβ οΈ Due to difficulties linking our new
blisfor faster platform-independent matrix multiplication, this nightly release currently doesn't work on Python 2.7 on Windows. We expect this problem to be corrected in the future.
- NEW: Experimental ULMFit/BERT/Elmo-like pretraining (see #2931) via the new
spacy pretraincommand. This pre-trains the CNN using BERT's cloze task. A new trick we're calling Language Modelling with Approximate Outputs is used to apply the pre-training to smaller models. The pre-training outputs CNN and embedding weights that can be used inspacy train, using the new-t2vargument. - NEW: Allow parser to do joint word segmentation and parsing. If you pass in data where the tokenizer over-segments, the parser now learns to merge the tokens.
- Make parser, tagger and NER faster, through better hyperparameters.
- Add
EntityRecognizer.labelsproperty. - Remove document length limit during training, by implementing faster Levenshtein alignment.
- Use Thinc v7.0, which defaults to single-thread with fast
bliskernel for matrix multiplication. Parallelisation should be performed at the task level, e.g. by running more containers.
- NEW: Small accuracy improvements for parsing, tagging and NER for 6+ languages.
- NEW: The English and German models are now available under the MIT license.
- NEW: Statistical models for Greek.
- NEW:
pretraincommand for ULMFit/BERT/Elmo-like pretraining (see #2931). - NEW: New
ud-traincommand, to train and evaluate using the CoNLL 2017 shared task data. - Check if model is already installed before downloading it via
spacy download. - Pass additional arguments of
downloadcommand topipto customise installation. - Improve
traincommand by lettingGoldCorpusstream data, instead of loading into memory. - Improve
init-modelcommand, including support for lexical attributes and word-vectors, using a variety of formats. This replaces thespacy vocabcommand, which is now deprecated. - Add support for multi-task objectives to
traincommand. - Add support for data-augmentation to
traincommand.
- NEW:
Doc.retokenizecontext manager for merging tokens more efficiently. - NEW: Add support for custom pipeline component factories via entry points (#2348).
- NEW: Implement fastText vectors with subword features.
- NEW: Built-in rule-based NER component to add entities based on match patterns (see #2513).
- NEW: Allow
PhraseMatcherto match on token attributes other thanORTH, e.g.LOWER(for case-insensitive matching) or evenPOSorTAG. - Add warnings if
.similaritymethod is called with empty vectors or without word vectors. - Improve rule-based
Matcherand addreturn_matcheskeyword argument toMatcher.pipeto yield(doc, matches)tuples instead of onlyDocobjects, andas_tuplesto add context to theDocobjects. - Make stop words via
Token.is_stopandLexeme.is_stopcase-insensitive.
π§ Under constructionπ΄ Bug fixesThis section includes new features and improvements that are planned for the stable
v2.1.xrelease, but aren't included in the nightly yet.
- Enhanced pattern API for rule-based
Matcher(see #1971).- Improve tokenizer performance (see #1642).
- Allow retokenizer to update
Lexemeattributes on merge (see #2390).mdandlgmodels and new, pre-trained word vectors for German, French, Spanish, Italian, Portuguese and Dutch.- Improved JSON(L) format for training (see #2928, #2932).
Doc.to_json()method which outputs data in spaCy's training format. This will be the only place where the format is hard-coded (see #2932).- Refactor CLI and add
debug-datacommand to validate training data (see #2932).
- Fix issue #1487: Add
Doc.retokenize()context manager. - Fix issue #1574: Make sure stop words are available in medium and large English models.
- Fix issue #1665: Correct typos in symbol
Animacy_inanand addAnimacy_nhum. - Fix issue #1865: Correct licensing of
it_core_news_smmodel. - Fix issue #1889: Make stop words case-insensitive.
- Fix issue #1903: Add
relcldependency label to symbols. - Fix issue #2014: Make
Token.pos_writeable. - Fix issue #2369: Respect pre-defined warning filters.
- Fix issue #2482: Fix serialization when parser model is empty.
- Fix issue #2671, #2675: Fix incorrect match ID on some patterns.
- Fix issue #2772: Fix bug in sentence starts for non-projective parses.
- Fix issue #2782: Make
like_numwork with prefixed numbers. - Fix serialization of custom tokenizer if not all functions are defined.
- Fix bugs in beam-search training objective.
- Fix problems with model pickling.
- This version of spaCy requires downloading new models. You can use the
spacy validatecommand to find out which models need updating, and print update instructions. - If you've been training your own models, you'll need to retrain them with the new version.
- While the
MatcherAPI is fully backwards compatible, its algorithm has changed to fix a number of bugs and performance issues. This means that theMatcherinv2.1.xmay produce different results compared to theMatcherinv2.0.x. - Also note that some of the model licenses have changed:
it_core_news_smis now correctly licensed under CC BY-NC-SA 3.0, and all English and German models are now published under the MIT license.
en_core_web_sm
English
2.1.0a4
91.7
89.8
96.8
85.7
π
12 MB
en_core_web_md
English
2.1.0a4
92.0
90.1
97.0
86.2
β
93 MB
en_core_web_lg
English
2.1.0a4
92.1
90.3
97.0
86.5
β
780 MB
de_core_news_sm
German
2.1.0a4
91.9
89.8
97.2
83.4
π
12 MB
de_core_news_md
German
2.1.0a4
91.3
90.5
97.4
83.6
β
212 MB
es_core_news_sm
Spanish
2.1.0a4
90.1
87.1
96.8
89.3
π
12 MB
es_core_news_md
Spanish
2.1.0a4
90.7
87.8
97.1
89.4
β
72 MB
pt_core_news_sm
Portuguese
2.1.0a4
89.2
85.8
79.8
82.4
π
14 MB
fr_core_news_sm
French
2.1.0a4
87.2
84.0
94.4
67.0 <sup>1</sup>
π
16 MB
fr_core_news_md
French
2.1.0a4
88.8
86.0
94.9
70.0 <sup>1</sup>
β
84 MB
it_core_news_sm
Italian
2.1.0a4
90.6
87.0
96.0
81.7
π
12 MB
nl_core_news_sm
Dutch
2.1.0a4
83.1
77.2
91.3
87.3
π
12 MB
el_core_news_sm
Greek
2.1.0a4
84.2
80.4
94.6
71.5
π
12 MB
el_core_news_md
Greek
2.1.0a4
87.5
84.1
96.4
78.3
β
128 MB
xx_ent_wiki_sm
Multi
2.1.0a4
-
-
-
83.2
π
4 MB
1) We're currently investigating this, as the results are anomalously low.
π Documentation and examplesπ¬ UAS: Unlabelled dependencies (parser). LAS: Labelled dependencies (parser). POS: Part-of-speech tags (fine-grained tags, i.e.
Token.tag_). NER F: Named entities (F-score). Vec: Model contains word vectors. Size: Model file size (zipped archive).
- Fix various typos and inconsistencies.
Thanks to @DuyguA, @giannisdaras, @mgogoulos, @louridas and @skrcode for the pull requests and contributions.
Files
explosion/spaCy-v2.1.0a3.zip
Files
(24.6 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:4f092f8435bea155558c43b5516b881e
|
24.6 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/explosion/spaCy/tree/v2.1.0a3 (URL)