Releases: explosion/spaCy
v2.1.5: Base support for Marathi and Korean, better pretraining, scores per entity and bug fixes
✨ New features and improvements
- NEW: Base language data for Marathi and Korean (via
mecab-ko
,mecab-ko-dic
andnatto-py
). - Improve language data for Lithuanian, Spanish, Kannada, French, Norwegian and Hindi.
- Add evaluation metrics per entity type.
- Add resume logic to
spacy pretrain
. - Add optional
id
property to EntityRuler patterns. - Better introspection and IDE automcomplete for custom extension attributes.
- Make
Doc.is_sentenced
always returnTrue
for single-token docs.
🔴 Bug fixes
- Fix issue #3490: Add evaluation metrics per entity type to
Scorer
. - Fix issue #3526: Serialize
EntityRuler
settings correctly. - Fix issue #3558: Improve
E024
error message for incorrectGoldParse
. - Fix issue #3611: Fix bug when setting
ngram
parameter in text classifier. - Fix issue #3625: Improve default punctuation rules for Hindi.
- Fix issue #3707: Improve introspection of custom attributes.
- Fix issue #3737: Check if component is callable in
Language.replace_pipe
. - Fix issue #3743: Fix documentation of
lex_id
. - Fix issue #3749: Change vector training script to work with latest Gensim.
- Fix issue #3762, #3934: Make
Doc.is_sentenced
default toTrue
for single-tokenDoc
s. - Fix issue #3802: Fix typo in docs example.
- Fix issue #3811: Fix type of
--seed
option inspacy pretrain
. - Fix issue #3822: Allow passing
PhraseMatcher
arguments toEntityRuler
. - Fix issue #3839: Ensure the
Matcher
returns correct match IDs when used with operators. - Fix issue #3840: Improve error messages in
spacy pretrain
. - Fix issue #3853: Rename vectors if multiple models are loaded to prevent clashes.
- Fix issue #3859: Update
pretrain
to prevent unintended overwriting of weight files. - Fix issue #3862: Fix matcher callback example.
- Fix issue #3868: Add
"v.s."
to English tokenizer exceptions. - Fix issue #3869: Make
Doc.count_by
work as expected. - Fix issue #3880: Fix unflatten padding in Thinc when last element is empty.
- Fix issue #3882: Exclude
user_data
when copying doc in displaCy. - Fix issue #3892: Update
Tokenizer
initialization docs. - Fix issue #3912: Make text classifier raise more friendly errors.
📖 Documentation and examples
- Add documentation for
Scorer
,Language.evaluate
andgold.docs_to_json
. - Fix various typos and inconsistencies.
👥 Contributors
Thanks to @BreakBB, @ujwal-narayan, @estr4ng7d, @maknotavailable, @ramananbalakrishnan, @nipunsadvilkar, @NirantK, @munozbravo, @intrafindBreno, @Azagh3l, @jarib, @tokestermw, @polm, @skrcode, @kabirkhan, @demongolem, @elbaulp, @clarus, @BramVanroy, @rokasramas, @askhogan, @khellan, @kognate, @cedar101 and @yash1994 for the pull requests and contributions.
v2.1.4: Training improvements and bug fixes
✨ New features and improvements
- NEW:
util.filter_spans
helper to filter duplicates and overlaps from a list ofSpan
objects. - Improve language data for Thai, Japanese, Indonesian and Dutch.
- Add
--n-save-every
tospacy pretrain
and rename--nr-iter
to--n-iter
for consistency. - Add
--return-scores
flag tospacy evaluate
to return a dict. - Add
--n-early-stopping
option tospacy train
to define maximum number of iterations without dev accuracy improvements.
🔴 Bug fixes
- Fix issue #3307: Fix symlink creation to show error on Windows.
- Fix issue #3473: Fix GPU training for text classification.
- Fix issue #3475: Change favicon.
- Fix issue #3482: Add Estonian base support to documentation.
- Fix issue #3484: Ensure lemmatization is always consistent between sessions.
- Fix issue #3521: Add variations of contractions to English stop words.
- Fix issue #3523: Make
spacy convert
correctly default tojson
. - Fix issue #3525, #3551, #3572: Fix problem that'd cause lemmas to not be lowercase.
- Fix issue #3531: Don't make
"settings"
or"title"
required in displaCy data. - Fix issue #3533: Remove non-existent example from docs.
- Fix issue #3546: Make sure path in
GoldParse.__del__
is a string. - Fix issue #3549: Ensure match pattern error isn't raised on empty errors list.
- Fix issue #3561: Fix
DependencyParser.predict
docs. - Fix issue #3598: Allow
jupyter=False
to override Jupyter mode indisplacy
. - Fix issue #3620: Fix bug in
.iob
converter. - Fix issue #3628: Relax
jsonschema
pin. - Fix issue #3667: Fix offset bug in loading pre-trained word2vec.
- Fix issue #3679: Update glossary to include missing labels in
spacy.explain
. - Fix issue #3680: Re-add missing universe README.
- Fix issue #3681: Rewrite information extraction example to use
Doc.retokenize
. - Fix issue #3692: Fix return value in
Language.update
docs. - Fix issue #3694: Make
"text"
inspacy pretrain
optional when"tokens"
is provided. - Fix issue #3701: Improve
Token.prob
andLexeme.prob
docs. - Fix issue #3708: Fix error in regex matcher examples.
- Fix issue #3713: Call
rmtree
andcopytree
with strings inspacy train
. - Fix issue #3720: Add version tag to
--base-model
argument inspacy train
docs.
📖 Documentation and examples
- Add free interactive spaCy course.
- Fix various typos and inconsistencies.
- Add new projects to the spaCy universe.
👥 Contributors
Thanks to @svlandeg, @wannaphongcom, @Bharat123rox, @DuyguA, @SamuelLKane, @graus, @HiromuHota, @jeannefukumaru, @ivigamberdiev, @socool, @yvespeirsman, @lemontheme, @Dobita21, @w4nderlust, @pierremonico, @bryant1410, @celikomer, @xssChauhan, @kowaalczyk, @BreakBB, @fizban99, @tokestermw, @bjascob, @pickfire, @yaph, @amitness, @henry860916, @d5555, @BramVanroy, @F0rge1cE, @richardpaulhudson, @ldorigo, @aaronkub and @devforfu for the pull requests and contributions.
v2.1.3: Improve sentencizer and serialization
✨ New features and improvements
- Allow customizing punctuation characters in sentencizer and make it serializable.
- Add new
"bow"
architecture forTextCategorizer
, to do faster bag-of-words text classification.
🔴 Bug fixes
- Fix issue #3433, #3458: Fix mismatch of classes in parser after serialization.
- Fix issue #3464: Fix training loop in
train_textcat.py
example. - Fix issue #3468: Make sentencizer set
Token.is_sent_start
correctly. - Fix bug in the
"ensemble"
TextClassifier
architecture that prevented the unigram bag-of-words submodel from working properly.
👥 Contributors
Thanks to @chkoar for the pull request!
v2.1.2: Fixes to regex handling on Python 2 and tag map
🔴 Bug fixes
- Fix issue #3356: Fix handling of unicode ranges in regular expressions on Python 2.
- Fix issue #3432: Update
wasabi
to better handle non-UTF-8 terminals. - Fix issue #3445: Update docs on
label
argument inSpan.__init__
. - Fix issue #3455: Bring English
tag_map
in line with UD Treebank.
📖 Documentation and examples
- Add
--init-tok2vec
argument totrain_textcat.py
example. - Fix various typos and inconsistencies.
v2.1.1: Small GPU fixes
✨ New features and improvements
- Raise error if user is running a narrow unicode build.
- Move
ud_train
,ud_evaluate
and other UD scripts from CLI to/bin
in repo only. - Improve accuracy of
spacy pretrain
by implementing cosine loss.
🔴 Bug fixes
- Fix issue #3421: Update docs and raise error for narrow unicode builds.
- Fix issue #3427: Correct mistake in French lemmatizer.
- Fix issue #3431: Make
Doc.vector
andDoc.vector_norm
work as expected on GPU. - Fix issue #3437: Fix installation problem on GPU.
- Fix issue #3439, #3446: Don't include UD scripts in
spacy.cli
.
👥 Contributors
Thanks to @mhham and @Bharat123Rox for the pull requests!
v2.1.0: New models, ULMFit/BERT/Elmo-like pretraining, faster tokenization, better Matcher, bug fixes & more
⚠️ This version of spaCy requires downloading new models. You can use thespacy validate
command 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.
✨ New features and improvements
Tagger, Parser, NER and Text Categorizer
- NEW: Experimental ULMFit/BERT/Elmo-like pretraining (see #2931) via the new
spacy pretrain
command. 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-t2v
argument. - 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 simpler, GPU-friendly option to
TextCategorizer
, and allow settingexclusive_classes
andarchitecture
arguments on initialization. - Add
EntityRecognizer.labels
property. - Remove document length limit during training, by implementing faster Levenshtein alignment.
- Use Thinc v7.0, which defaults to single-thread with fast
blis
kernel for matrix multiplication. Parallelisation should be performed at the task level, e.g. by running more containers.
Models & Language Data
- NEW: 2-3 times faster tokenization across all languages at the same accuracy!
- 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: Alpha support for Tamil, Ukrainian and Kannada, and base language classes for Afrikaans, Bulgarian, Czech, Icelandic, Lithuanian, Latvian, Slovak, Slovenian and Albanian.
- Improve loading time of
French
by ~30%. - Add
Vocab.writing_system
(populated via the language data) to expose settings like writing direction.
CLI
- NEW:
pretrain
command for ULMFit/BERT/Elmo-like pretraining (see #2931). - NEW: New
ud-train
command, 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
download
command topip
to customise installation. - Improve
train
command by lettingGoldCorpus
stream data, instead of loading into memory. - Improve
init-model
command, including support for lexical attributes and word-vectors, using a variety of formats. This replaces thespacy vocab
command, which is now deprecated. - Add support for multi-task objectives to
train
command. - Add support for data-augmentation to
train
command.
Other
- NEW: Enhanced pattern API for rule-based
Matcher
(see #1971). - NEW:
Doc.retokenize
context manager for merging and splitting 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
PhraseMatcher
to match on token attributes other thanORTH
, e.g.LOWER
(for case-insensitive matching) or evenPOS
orTAG
. - NEW: Replace
ujson
,msgpack
,msgpack-numpy
,pickle
,cloudpickle
anddill
with our own packagesrsly
to centralise dependencies and allow binary wheels. - NEW:
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). - NEW: Built-in
EntityRuler
component to make it easier to build rule-based NER and combinations of statistical and rule-based systems. - NEW:
gold.spans_from_biluo_tags
helper that returnsSpan
objects, e.g. to overwrite thedoc.ents
. - Add warnings if
.similarity
method is called with empty vectors or without word vectors. - Improve rule-based
Matcher
and addreturn_matches
keyword argument toMatcher.pipe
to yield(doc, matches)
tuples instead of onlyDoc
objects, andas_tuples
to add context to theDoc
objects. - Make stop words via
Token.is_stop
andLexeme.is_stop
case-insensitive. - Accept
"TEXT"
as an alternative to"ORTH"
inMatcher
patterns. - Use
black
for auto-formatting.py
source and optimse codebase usingflake8
. You can now runflake8 spacy
and it should return no errors or warnings. SeeCONTRIBUTING.md
for details.
🔴 Bug fixes
- Fix issue #795: Fix behaviour of
Token.conjuncts.
- Fix issue #1487: Add
Doc.retokenize()
context manager. - Fix issue #1537: Make
Span.as_doc
return a copy, not a view. - Fix issue #1574: Make sure stop words are available in medium and large English models.
- Fix issue #1585: Prevent parser from predicting unseen classes.
- Fix issue #1642: Replace
regex
withre
and speed up tokenization. - Fix issue #1665: Correct typos in symbol
Animacy_inan
and addAnimacy_nhum
. - Fix issue #1748, #1798, #2756, #2934: Add simpler GPU-friendly option to
TextCategorizer
. - Fix issue #1773: Prevent tokenizer exceptions from setting
POS
but notTAG
. - Fix issue #1782, #2343: Fix training on GPU.
- Fix issue #1816: Allow custom
Language
subclasses via entry points. - Fix issue #1865: Correct licensing of
it_core_news_sm
model. - Fix issue #1889: Make stop words case-insensitive.
- Fix issue #1903: Add
relcl
dependency label to symbols. - Fix issue #1963: Resize
Doc.tensor
when merging spans. - Fix issue #1971: Update
Matcher
engine to support regex, extension attributes and rich comparison. - Fix issue #2014: Make
Token.pos_
writeable. - Fix issue #2091: Fix
displacy
support for RTL languages. - Fix issue #2203, #3268: Prevent bad interaction of lemmatizer and tokenizer exceptions.
- Fix issue #2329: Correct
TextCategorizer
andGoldParse
API docs. - Fix issue #2369: Respect pre-defined warning filters.
- Fix issue #2390: Support setting lexical attributes during retokenization.
- Fix issue #2396: Fix
Doc.get_lca_matrix
. - Fix issue #2464, #3009: Fix behaviour of
Matcher
's?
quantifier. - Fix issue #2482: Fix serialization when parser model is empty.
- Fix issue #2512, #2153: Fix issue with deserialization into non-empty vocab.
- Fix issue #2603: Improve handling of missing NER tags.
- Fix issue #2644: Add table explaining training metrics to docs.
- Fix issue #2648: Fix
KeyError
inVectors.most_similar
. - Fix issue #2671, #2675: Fix incorrect match ID on some patterns.
- Fix issue #2693: Only use
'sentencizer'
as built-in sentence boundary component name. - Fix issue #2728: Fix HTML escaping in
displacy
NER visualization and correct API docs. - Fix issue #2740: Add ability to pass additional arguments to pipeline components.
- Fix issue #2754, #3028: Make
NORM
aToken
attribute instead of aLexeme
attribute to allow setting context-specific norms in tokenizer exceptions. - Fix issue #2769: Fix issue that'd cause segmentation fault when calling
EntityRecognizer.add_label
. - Fix issue #2772: Fix bug in sentence starts for non-projective parses.
- Fix issue #2779: Fix handling of pre-set entities.
- Fix issue #2782: Make
like_num
work with prefixed numbers. - Fix issue #2833: Raise better error if
Token
orSpan
are pickled. - Fix issue #2838: Add
Retokenizer.split
method to split one token into several. - Fix issue #2869: Make
doc[0].is_sent_start == True
. - Fix issue #2870: Make it illegal for the entity recognizer to predict whitespace tokens as
B
,L
orU
. - Fix issue #2871: Fix vectors for reserved words.
- Fix issue #2901: Fix issue with first call of
nlp
in Japanese (MeCab). - Fix issue #2924: Make IDs of displaCy arcs more unique to avoid clashes.
- Fix issue #3012: Fix clobber of
Doc.is_tagged
inDoc.from_array
. - Fix issue #3027: Allow
Span
to take unicode value forlabel
argument. - Fix issue #3036: Support mutable default arguments in extension attributes.
- Fix issue #3048: Raise better errors for uninitialized pipeline components.
- Fix issue #3064: Allow single string attributes in
Doc.to_array
. - Fix issue #3093, #3067: Set
vectors.name
correctly when exporting model via CLI. - Fix issue #3112: Make sure entity types are added correctly on GPU.
- Fix issue #3191: Fix pickling of
Japanese
. - Fix issue #3122: Correct docs of
Token.subtree
andSpan.subtree
. - Fix issue #3128: Improve error handling in converters.
- Fix issue #3248: Fix
PhraseMatcher
pickling and make__len__
consistent. - Fix issue #3274: Make
Token.sent
work as expected without the parser. - Fix issue #3277: Add en/em dash to tokenizer prefixes and suffixes.
- Fix issue #3346: Expose Japanese stop words in language class.
- Fix issue #3357: Update displaCy examples in docs to correctly show
Token.pos_
. - Fix issue #3345: Fix NER when preset entities cross-sentence boundaries.
- Fix issue #3348: Don't use
numpy
directly for similarity. - Fix issue #3366: Improve converters, training data formats and docs.
- Fix issue #3369: Fix
#egg
fragments in direct downloads. - Fix issue #3382: Make
Doc.from_array
consistent withDoc.to_array
. - Fix issu...
v2.1.0a13: New models, ULMFit/BERT/Elmo-like pretraining, joint word segmentation and parsing, better Matcher, bug fixes & more
🌙 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. See here for the updated nightly docs.
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.
⚠️ This nightly release currently doesn't work on Python 2.7 on Windows, due to difficulties compiling our new matrix multiplication dependencyblis
in that environment. We expect this can be corrected in future.
✨ New features and improvements
Tagger, Parser, NER and Text Categorizer
- NEW: Experimental ULMFit/BERT/Elmo-like pretraining (see #2931) via the new
spacy pretrain
command. 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-t2v
argument. - 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 simpler, GPU-friendly option to
TextCategorizer
, and allow settingexclusive_classes
andarchitecture
arguments on initialization. - Add
EntityRecognizer.labels
property. - Remove document length limit during training, by implementing faster Levenshtein alignment.
- Use Thinc v7.0, which defaults to single-thread with fast
blis
kernel for matrix multiplication. Parallelisation should be performed at the task level, e.g. by running more containers.
Models & Language Data
- NEW: 2-3 times faster tokenization across all languages at the same accuracy!
- 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: Alpha support for Tamil, Ukrainian and Kannada, and base language classes for Afrikaans, Bulgarian, Czech, Icelandic, Lithuanian, Latvian, Slovak, Slovenian and Albanian.
- Improve loading time of
French
by ~30%. - Add
Vocab.writing_system
(populated via the language data) to expose settings like writing direction.
CLI
- NEW:
pretrain
command for ULMFit/BERT/Elmo-like pretraining (see #2931). - NEW: New
ud-train
command, 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
download
command topip
to customise installation. - Improve
train
command by lettingGoldCorpus
stream data, instead of loading into memory. - Improve
init-model
command, including support for lexical attributes and word-vectors, using a variety of formats. This replaces thespacy vocab
command, which is now deprecated. - Add support for multi-task objectives to
train
command. - Add support for data-augmentation to
train
command.
Other
- NEW: Enhanced pattern API for rule-based
Matcher
(see #1971). - NEW:
Doc.retokenize
context manager for merging and splitting 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
PhraseMatcher
to match on token attributes other thanORTH
, e.g.LOWER
(for case-insensitive matching) or evenPOS
orTAG
. - NEW: Replace
ujson
,msgpack
,msgpack-numpy
,pickle
,cloudpickle
anddill
with our own packagesrsly
to centralise dependencies and allow binary wheels. - NEW:
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). - NEW: Built-in
EntityRuler
component to make it easier to build rule-based NER and combinations of statistical and rule-based systems. - NEW:
gold.spans_from_biluo_tags
helper that returnsSpan
objects, e.g. to overwrite thedoc.ents
. - Add warnings if
.similarity
method is called with empty vectors or without word vectors. - Improve rule-based
Matcher
and addreturn_matches
keyword argument toMatcher.pipe
to yield(doc, matches)
tuples instead of onlyDoc
objects, andas_tuples
to add context to theDoc
objects. - Make stop words via
Token.is_stop
andLexeme.is_stop
case-insensitive. - Accept
"TEXT"
as an alternative to"ORTH"
inMatcher
patterns. - Use
black
for auto-formatting.py
source and optimse codebase usingflake8
. You can now runflake8 spacy
and it should return no errors or warnings. SeeCONTRIBUTING.md
for details.
🔴 Bug fixes
- Fix issue #795: Fix behaviour of
Token.conjuncts.
- Fix issue #1487: Add
Doc.retokenize()
context manager. - Fix issue #1537: Make
Span.as_doc
return a copy, not a view. - Fix issue #1574: Make sure stop words are available in medium and large English models.
- Fix issue #1585: Prevent parser from predicting unseen classes.
- Fix issue #1642: Replace
regex
withre
and speed up tokenization. - Fix issue #1665: Correct typos in symbol
Animacy_inan
and addAnimacy_nhum
. - Fix issue #1748, #1798, #2756, #2934: Add simpler GPU-friendly option to
TextCategorizer
. - Fix issue #1773: Prevent tokenizer exceptions from setting
POS
but notTAG
. - Fix issue #1782, #2343: Fix training on GPU.
- Fix issue #1816: Allow custom
Language
subclasses via entry points. - Fix issue #1865: Correct licensing of
it_core_news_sm
model. - Fix issue #1889: Make stop words case-insensitive.
- Fix issue #1903: Add
relcl
dependency label to symbols. - Fix issue #1963: Resize
Doc.tensor
when merging spans. - Fix issue #1971: Update
Matcher
engine to support regex, extension attributes and rich comparison. - Fix issue #2014: Make
Token.pos_
writeable. - Fix issue #2091: Fix
displacy
support for RTL languages. - Fix issue #2203, #3268: Prevent bad interaction of lemmatizer and tokenizer exceptions.
- Fix issue #2329: Correct
TextCategorizer
andGoldParse
API docs. - Fix issue #2369: Respect pre-defined warning filters.
- Fix issue #2390: Support setting lexical attributes during retokenization.
- Fix issue #2396: Fix
Doc.get_lca_matrix
. - Fix issue #2464, #3009: Fix behaviour of
Matcher
's?
quantifier. - Fix issue #2482: Fix serialization when parser model is empty.
- Fix issue #2512, #2153: Fix issue with deserialization into non-empty vocab.
- Fix issue #2603: Improve handling of missing NER tags.
- Fix issue #2644: Add table explaining training metrics to docs.
- Fix issue #2648: Fix
KeyError
inVectors.most_similar
. - Fix issue #2671, #2675: Fix incorrect match ID on some patterns.
- Fix issue #2693: Only use
'sentencizer'
as built-in sentence boundary component name. - Fix issue #2728: Fix HTML escaping in
displacy
NER visualization and correct API docs. - Fix issue #2740: Add ability to pass additional arguments to pipeline components.
- Fix issue #2754, #3028: Make
NORM
aToken
attribute instead of aLexeme
attribute to allow setting context-specific norms in tokenizer exceptions. - Fix issue #2769: Fix issue that'd cause segmentation fault when calling
EntityRecognizer.add_label
. - Fix issue #2772: Fix bug in sentence starts for non-projective parses.
- Fix issue #2779: Fix handling of pre-set entities.
- Fix issue #2782: Make
like_num
work with prefixed numbers. - Fix issue #2833: Raise better error if
Token
orSpan
are pickled. - Fix issue #2838: Add
Retokenizer.split
method to split one token into several. - Fix issue #2869: Make
doc[0].is_sent_start == True
. - Fix issue #2870: Make it illegal for the entity recognizer to predict whitespace tokens as
B
,L
orU
. - Fix issue #2871: Fix vectors for reserved words.
- Fix issue #2901: Fix issue with first call of
nlp
in Japanese (MeCab). - Fix issue #2924: Make IDs of displaCy arcs more unique to avoid clashes.
- Fix issue #3012: Fix clobber of
Doc.is_tagged
inDoc.from_array
. - Fix issue #3027: Allow
Span
to take unicode value forlabel
argument. - Fix issue #3036: Support mutable default arguments in extension attributes.
- Fix issue #3048: Raise better errors for uninitialized pipeline components.
- Fix issue #3064: Allow single string attributes in
Doc.to_array
. - Fix issue #3093, #3067: Set
vectors.name
correctly when exporting model via CLI. - Fix issue #3112: Make sure entity types are added correctly on GPU.
- Fix issue #3191: Fix pickling of
Japanese
. - Fix issue #3122: Correct docs of
Token.subtree
andSpan.subtree
. - Fix issue #3128: Improve error handling in converters.
- Fix issue #3248: Fix
PhraseMatcher
pickling and make__len__
consistent. - Fix issue #3274: Make
Token.sent
work as expected without the parser. - Fix issue #3277: Add en/em dash to tokenizer prefixes and suffixes.
- Fix issue #3346: Expose Japanese stop words in language class.
- Fix issue #3357: Update displ...
v2.1.0a12: New models, ULMFit/BERT/Elmo-like pretraining, joint word segmentation and parsing, better Matcher, bug fixes & more
🌙 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. See here for the updated nightly docs.
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.
⚠️ Due to difficulties linking our newblis
for faster platform-independent matrix multiplication, this nightly release currently doesn't work on Python 2.7 on Windows. We expect this to be corrected in the future.
✨ New features and improvements
Tagger, Parser, NER and Text Categorizer
- NEW: Experimental ULMFit/BERT/Elmo-like pretraining (see #2931) via the new
spacy pretrain
command. 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-t2v
argument. - 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 simpler, GPU-friendly option to
TextCategorizer
, and allow settingexclusive_classes
andarchitecture
arguments on initialization. - Add
EntityRecognizer.labels
property. - Remove document length limit during training, by implementing faster Levenshtein alignment.
- Use Thinc v7.0, which defaults to single-thread with fast
blis
kernel for matrix multiplication. Parallelisation should be performed at the task level, e.g. by running more containers.
Models & Language Data
- NEW: 2-3 times faster tokenization across all languages at the same accuracy!
- 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: Alpha support for Tamil, Ukrainian and Kannada, and base language classes for Afrikaans, Bulgarian, Czech, Icelandic, Lithuanian, Latvian, Slovak, Slovenian and Albanian.
- Improve loading time of
French
by ~30%. - Add
Vocab.writing_system
(populated via the language data) to expose settings like writing direction.
CLI
- NEW:
pretrain
command for ULMFit/BERT/Elmo-like pretraining (see #2931). - NEW: New
ud-train
command, 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
download
command topip
to customise installation. - Improve
train
command by lettingGoldCorpus
stream data, instead of loading into memory. - Improve
init-model
command, including support for lexical attributes and word-vectors, using a variety of formats. This replaces thespacy vocab
command, which is now deprecated. - Add support for multi-task objectives to
train
command. - Add support for data-augmentation to
train
command.
Other
- NEW: Enhanced pattern API for rule-based
Matcher
(see #1971). - NEW:
Doc.retokenize
context manager for merging and splitting 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
PhraseMatcher
to match on token attributes other thanORTH
, e.g.LOWER
(for case-insensitive matching) or evenPOS
orTAG
. - NEW: Replace
ujson
,msgpack
,msgpack-numpy
,pickle
,cloudpickle
anddill
with our own packagesrsly
to centralise dependencies and allow binary wheels. - NEW:
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). - NEW: Built-in
EntityRuler
component to make it easier to build rule-based NER and combinations of statistical and rule-based systems. - NEW:
gold.spans_from_biluo_tags
helper that returnsSpan
objects, e.g. to overwrite thedoc.ents
. - Add warnings if
.similarity
method is called with empty vectors or without word vectors. - Improve rule-based
Matcher
and addreturn_matches
keyword argument toMatcher.pipe
to yield(doc, matches)
tuples instead of onlyDoc
objects, andas_tuples
to add context to theDoc
objects. - Make stop words via
Token.is_stop
andLexeme.is_stop
case-insensitive. - Accept
"TEXT"
as an alternative to"ORTH"
inMatcher
patterns. - Use
black
for auto-formatting.py
source and optimse codebase usingflake8
. You can now runflake8 spacy
and it should return no errors or warnings. SeeCONTRIBUTING.md
for details.
🔴 Bug fixes
- Fix issue #795: Fix behaviour of
Token.conjuncts.
- Fix issue #1487: Add
Doc.retokenize()
context manager. - Fix issue #1537: Make
Span.as_doc
return a copy, not a view. - Fix issue #1574: Make sure stop words are available in medium and large English models.
- Fix issue #1585: Prevent parser from predicting unseen classes.
- Fix issue #1642: Replace
regex
withre
and speed up tokenization. - Fix issue #1665: Correct typos in symbol
Animacy_inan
and addAnimacy_nhum
. - Fix issue #1748, #1798, #2756, #2934: Add simpler GPU-friendly option to
TextCategorizer
. - Fix issue #1773: Prevent tokenizer exceptions from setting
POS
but notTAG
. - Fix issue #1782, #2343: Fix training on GPU.
- Fix issue #1816: Allow custom
Language
subclasses via entry points. - Fix issue #1865: Correct licensing of
it_core_news_sm
model. - Fix issue #1889: Make stop words case-insensitive.
- Fix issue #1903: Add
relcl
dependency label to symbols. - Fix issue #1963: Resize
Doc.tensor
when merging spans. - Fix issue #1971: Update
Matcher
engine to support regex, extension attributes and rich comparison. - Fix issue #2014: Make
Token.pos_
writeable. - Fix issue #2091: Fix
displacy
support for RTL languages. - Fix issue #2203, #3268: Prevent bad interaction of lemmatizer and tokenizer exceptions.
- Fix issue #2329: Correct
TextCategorizer
andGoldParse
API docs. - Fix issue #2369: Respect pre-defined warning filters.
- Fix issue #2390: Support setting lexical attributes during retokenization.
- Fix issue #2396: Fix
Doc.get_lca_matrix
. - Fix issue #2464, #3009: Fix behaviour of
Matcher
's?
quantifier. - Fix issue #2482: Fix serialization when parser model is empty.
- Fix issue #2512, #2153: Fix issue with deserialization into non-empty vocab.
- Fix issue #2603: Improve handling of missing NER tags.
- Fix issue #2644: Add table explaining training metrics to docs.
- Fix issue #2648: Fix
KeyError
inVectors.most_similar
. - Fix issue #2671, #2675: Fix incorrect match ID on some patterns.
- Fix issue #2693: Only use
'sentencizer'
as built-in sentence boundary component name. - Fix issue #2728: Fix HTML escaping in
displacy
NER visualization and correct API docs. - Fix issue #2740: Add ability to pass additional arguments to pipeline components.
- Fix issue #2754, #3028: Make
NORM
aToken
attribute instead of aLexeme
attribute to allow setting context-specific norms in tokenizer exceptions. - Fix issue #2769: Fix issue that'd cause segmentation fault when calling
EntityRecognizer.add_label
. - Fix issue #2772: Fix bug in sentence starts for non-projective parses.
- Fix issue #2779: Fix handling of pre-set entities.
- Fix issue #2782: Make
like_num
work with prefixed numbers. - Fix issue #2833: Raise better error if
Token
orSpan
are pickled. - Fix issue #2838: Add
Retokenizer.split
method to split one token into several. - Fix issue #2869: Make
doc[0].is_sent_start == True
. - Fix issue #2870: Make it illegal for the entity recognizer to predict whitespace tokens as
B
,L
orU
. - Fix issue #2871: Fix vectors for reserved words.
- Fix issue #2901: Fix issue with first call of
nlp
in Japanese (MeCab). - Fix issue #2924: Make IDs of displaCy arcs more unique to avoid clashes.
- Fix issue #3012: Fix clobber of
Doc.is_tagged
inDoc.from_array
. - Fix issue #3027: Allow
Span
to take unicode value forlabel
argument. - Fix issue #3036: Support mutable default arguments in extension attributes.
- Fix issue #3048: Raise better errors for uninitialized pipeline components.
- Fix issue #3064: Allow single string attributes in
Doc.to_array
. - Fix issue #3093, #3067: Set
vectors.name
correctly when exporting model via CLI. - Fix issue #3112: Make sure entity types are added correctly on GPU.
- Fix issue #3191: Fix pickling of
Japanese
. - Fix issue #3122: Correct docs of
Token.subtree
andSpan.subtree
. - Fix issue #3128: Improve error handling in converters.
- Fix issue #3248: Fix
PhraseMatcher
pickling and make__len__
consistent. - Fix issue #3274: Make
Token.sent
work as expected without the parser. - Fix issue #3277: Add en/em dash to tokenizer prefixes and suffixes.
- Fix issue #3346: Expose Japanese stop words in language class.
- Fix issue #3357: Update dis...
v2.1.0a11: New models, ULMFit/BERT/Elmo-like pretraining, joint word segmentation and parsing, better Matcher, bug fixes & more
🌙 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. See here for the updated nightly docs.
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.
⚠️ Due to difficulties linking our newblis
for faster platform-independent matrix multiplication, this nightly release currently doesn't work on Python 2.7 on Windows. We expect this to be corrected in the future.
✨ New features and improvements
Tagger, Parser, NER and Text Categorizer
- NEW: Experimental ULMFit/BERT/Elmo-like pretraining (see #2931) via the new
spacy pretrain
command. 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-t2v
argument. - 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 simpler, GPU-friendly option to
TextCategorizer
, and allow settingexclusive_classes
andarchitecture
arguments on initialization. - Add
EntityRecognizer.labels
property. - Remove document length limit during training, by implementing faster Levenshtein alignment.
- Use Thinc v7.0, which defaults to single-thread with fast
blis
kernel for matrix multiplication. Parallelisation should be performed at the task level, e.g. by running more containers.
Models & Language Data
- NEW: 2-3 times faster tokenization across all languages at the same accuracy!
- 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: Alpha support for Tamil, Ukrainian and Kannada, and base language classes for Afrikaans, Bulgarian, Czech, Icelandic, Lithuanian, Latvian, Slovak, Slovenian and Albanian.
- Improve loading time of
French
by ~30%.
CLI
- NEW:
pretrain
command for ULMFit/BERT/Elmo-like pretraining (see #2931). - NEW: New
ud-train
command, 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
download
command topip
to customise installation. - Improve
train
command by lettingGoldCorpus
stream data, instead of loading into memory. - Improve
init-model
command, including support for lexical attributes and word-vectors, using a variety of formats. This replaces thespacy vocab
command, which is now deprecated. - Add support for multi-task objectives to
train
command. - Add support for data-augmentation to
train
command.
Other
- NEW: Enhanced pattern API for rule-based
Matcher
(see #1971). - NEW:
Doc.retokenize
context manager for merging and splitting 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
PhraseMatcher
to match on token attributes other thanORTH
, e.g.LOWER
(for case-insensitive matching) or evenPOS
orTAG
. - NEW: Replace
ujson
,msgpack
,msgpack-numpy
,pickle
,cloudpickle
anddill
with our own packagesrsly
to centralise dependencies and allow binary wheels. - NEW:
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). - NEW: Built-in
EntityRuler
component to make it easier to build rule-based NER and combinations of statistical and rule-based systems. - NEW:
gold.spans_from_biluo_tags
helper that returnsSpan
objects, e.g. to overwrite thedoc.ents
. - Add warnings if
.similarity
method is called with empty vectors or without word vectors. - Improve rule-based
Matcher
and addreturn_matches
keyword argument toMatcher.pipe
to yield(doc, matches)
tuples instead of onlyDoc
objects, andas_tuples
to add context to theDoc
objects. - Make stop words via
Token.is_stop
andLexeme.is_stop
case-insensitive. - Accept
"TEXT"
as an alternative to"ORTH"
inMatcher
patterns. - Use
black
for auto-formatting.py
source and optimse codebase usingflake8
. You can now runflake8 spacy
and it should return no errors or warnings. SeeCONTRIBUTING.md
for details.
🔴 Bug fixes
- Fix issue #1487: Add
Doc.retokenize()
context manager. - Fix issue #1537: Make
Span.as_doc
return a copy, not a view. - Fix issue #1574: Make sure stop words are available in medium and large English models.
- Fix issue #1585: Prevent parser from predicting unseen classes.
- Fix issue #1642: Replace
regex
withre
and speed up tokenization. - Fix issue #1665: Correct typos in symbol
Animacy_inan
and addAnimacy_nhum
. - Fix issue #1748, #1798, #2756, #2934: Add simpler GPU-friendly option to
TextCategorizer
. - Fix issue #1773: Prevent tokenizer exceptions from setting
POS
but notTAG
. - Fix issue #1782, #2343: Fix training on GPU.
- Fix issue #1816: Allow custom
Language
subclasses via entry points. - Fix issue #1865: Correct licensing of
it_core_news_sm
model. - Fix issue #1889: Make stop words case-insensitive.
- Fix issue #1903: Add
relcl
dependency label to symbols. - Fix issue #1963: Resize
Doc.tensor
when merging spans. - Fix issue #1971: Update
Matcher
engine to support regex, extension attributes and rich comparison. - Fix issue #2014: Make
Token.pos_
writeable. - Fix issue #2203, #3268: Prevent bad interaction of lemmatizer and tokenizer exceptions.
- Fix issue #2329: Correct
TextCategorizer
andGoldParse
API docs. - Fix issue #2369: Respect pre-defined warning filters.
- Fix issue #2390: Support setting lexical attributes during retokenization.
- Fix issue #2396: Fix
Doc.get_lca_matrix
. - Fix issue #2464, #3009: Fix behaviour of
Matcher
's?
quantifier. - Fix issue #2482: Fix serialization when parser model is empty.
- Fix issue #2512, #2153: Fix issue with deserialization into non-empty vocab.
- Fix issue #2603: Improve handling of missing NER tags.
- Fix issue #2644: Add table explaining training metrics to docs.
- Fix issue #2648: Fix
KeyError
inVectors.most_similar
. - Fix issue #2671, #2675: Fix incorrect match ID on some patterns.
- Fix issue #2693: Only use
'sentencizer'
as built-in sentence boundary component name. - Fix issue #2728: Fix HTML escaping in
displacy
NER visualization and correct API docs. - Fix issue #2740: Add ability to pass additional arguments to pipeline components.
- Fix issue #2754, #3028: Make
NORM
aToken
attribute instead of aLexeme
attribute to allow setting context-specific norms in tokenizer exceptions. - Fix issue #2769: Fix issue that'd cause segmentation fault when calling
EntityRecognizer.add_label
. - Fix issue #2772: Fix bug in sentence starts for non-projective parses.
- Fix issue #2779: Fix handling of pre-set entities.
- Fix issue #2782: Make
like_num
work with prefixed numbers. - Fix issue #2833: Raise better error if
Token
orSpan
are pickled. - Fix issue #2838: Add
Retokenizer.split
method to split one token into several. - Fix issue #2869: Make
doc[0].is_sent_start == True
. - Fix issue #2870: Make it illegal for the entity recognizer to predict whitespace tokens as
B
,L
orU
. - Fix issue #2871: Fix vectors for reserved words.
- Fix issue #2901: Fix issue with first call of
nlp
in Japanese (MeCab). - Fix issue #2924: Make IDs of displaCy arcs more unique to avoid clashes.
- Fix issue #3012: Fix clobber of
Doc.is_tagged
inDoc.from_array
. - Fix issue #3027: Allow
Span
to take unicode value forlabel
argument. - Fix issue #3048: Raise better errors for uninitialized pipeline components.
- Fix issue #3064: Allow single string attributes in
Doc.to_array
. - Fix issue #3093, #3067: Set
vectors.name
correctly when exporting model via CLI. - Fix issue #3112: Make sure entity types are added correctly on GPU.
- Fix issue #3122: Correct docs of
Token.subtree
andSpan.subtree
. - Fix issue #3128: Improve error handling in converters.
- Fix issue #3248: Fix
PhraseMatcher
pickling and make__len__
consistent. - Fix issue #3274: Make
Token.sent
work as expected without the parser. - Fix issue #3277: Add en/em dash to tokenizer prefixes and suffixes.
- Fix issue #3346: Expose Japanese stop words in language class.
- Fix issue #3357: Update displaCy examples in docs to correctly show
Token.pos_
. - Fix issue #3345: Fix NER when preset entities cross-sentence boundaries.
- Fix issue #3348: Don't use
numpy
directly for similarity. - Fix issue #3366: Improve converters, training data formats and docs.
- Fix issue #3369: Fix
#egg
fragments in direct downloads. - Fix issue #3382: Mak...
v2.1.0a10: New models, ULMFit/BERT/Elmo-like pretraining, joint word segmentation and parsing, better Matcher, bug fixes & more
🌙 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. See here for the updated nightly docs.
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.
⚠️ Due to difficulties linking our newblis
for faster platform-independent matrix multiplication, this nightly release currently doesn't work on Python 2.7 on Windows. We expect this to be corrected in the future.
✨ New features and improvements
Tagger, Parser, NER and Text Categorizer
- NEW: Experimental ULMFit/BERT/Elmo-like pretraining (see #2931) via the new
spacy pretrain
command. 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-t2v
argument. - 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 simpler, GPU-friendly option to
TextCategorizer
, and allow settingexclusive_classes
andarchitecture
arguments on initialization. - Add
EntityRecognizer.labels
property. - Remove document length limit during training, by implementing faster Levenshtein alignment.
- Use Thinc v7.0, which defaults to single-thread with fast
blis
kernel for matrix multiplication. Parallelisation should be performed at the task level, e.g. by running more containers.
Models & Language Data
- NEW: 2-3 times faster tokenization across all languages at the same accuracy!
- 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: Alpha support for Tamil, Ukrainian and Kannada, and base language classes for Afrikaans, Bulgarian, Czech, Icelandic, Lithuanian, Latvian, Slovak, Slovenian and Albanian.
- Improve loading time of
French
by ~30%.
CLI
- NEW:
pretrain
command for ULMFit/BERT/Elmo-like pretraining (see #2931). - NEW: New
ud-train
command, 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
download
command topip
to customise installation. - Improve
train
command by lettingGoldCorpus
stream data, instead of loading into memory. - Improve
init-model
command, including support for lexical attributes and word-vectors, using a variety of formats. This replaces thespacy vocab
command, which is now deprecated. - Add support for multi-task objectives to
train
command. - Add support for data-augmentation to
train
command.
Other
- NEW: Enhanced pattern API for rule-based
Matcher
(see #1971). - NEW:
Doc.retokenize
context manager for merging and splitting 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
PhraseMatcher
to match on token attributes other thanORTH
, e.g.LOWER
(for case-insensitive matching) or evenPOS
orTAG
. - NEW: Replace
ujson
,msgpack
,msgpack-numpy
,pickle
,cloudpickle
anddill
with our own packagesrsly
to centralise dependencies and allow binary wheels. - NEW:
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). - NEW: Built-in
EntityRuler
component to make it easier to build rule-based NER and combinations of statistical and rule-based systems. - NEW:
gold.spans_from_biluo_tags
helper that returnsSpan
objects, e.g. to overwrite thedoc.ents
. - Add warnings if
.similarity
method is called with empty vectors or without word vectors. - Improve rule-based
Matcher
and addreturn_matches
keyword argument toMatcher.pipe
to yield(doc, matches)
tuples instead of onlyDoc
objects, andas_tuples
to add context to theDoc
objects. - Make stop words via
Token.is_stop
andLexeme.is_stop
case-insensitive. - Accept
"TEXT"
as an alternative to"ORTH"
inMatcher
patterns. - Use
black
for auto-formatting.py
source and optimse codebase usingflake8
. You can now runflake8 spacy
and it should return no errors or warnings. SeeCONTRIBUTING.md
for details.
🔴 Bug fixes
- Fix issue #1487: Add
Doc.retokenize()
context manager. - Fix issue #1537: Make
Span.as_doc
return a copy, not a view. - Fix issue #1574: Make sure stop words are available in medium and large English models.
- Fix issue #1585: Prevent parser from predicting unseen classes.
- Fix issue #1642: Replace
regex
withre
and speed up tokenization. - Fix issue #1665: Correct typos in symbol
Animacy_inan
and addAnimacy_nhum
. - Fix issue #1748, #1798, #2756, #2934: Add simpler GPU-friendly option to
TextCategorizer
. - Fix issue #1773: Prevent tokenizer exceptions from setting
POS
but notTAG
. - Fix issue #1782, #2343: Fix training on GPU.
- Fix issue #1816: Allow custom
Language
subclasses via entry points. - Fix issue #1865: Correct licensing of
it_core_news_sm
model. - Fix issue #1889: Make stop words case-insensitive.
- Fix issue #1903: Add
relcl
dependency label to symbols. - Fix issue #1963: Resize
Doc.tensor
when merging spans. - Fix issue #1971: Update
Matcher
engine to support regex, extension attributes and rich comparison. - Fix issue #2014: Make
Token.pos_
writeable. - Fix issue #2329: Correct
TextCategorizer
andGoldParse
API docs. - Fix issue #2369: Respect pre-defined warning filters.
- Fix issue #2390: Support setting lexical attributes during retokenization.
- Fix issue #2396: Fix
Doc.get_lca_matrix
. - Fix issue #2464, #3009: Fix behaviour of
Matcher
's?
quantifier. - Fix issue #2482: Fix serialization when parser model is empty.
- Fix issue #2603: Improve handling of missing NER tags.
- Fix issue #2644: Add table explaining training metrics to docs.
- Fix issue #2648: Fix
KeyError
inVectors.most_similar
. - Fix issue #2671, #2675: Fix incorrect match ID on some patterns.
- Fix issue #2693: Only use
'sentencizer'
as built-in sentence boundary component name. - Fix issue #2728: Fix HTML escaping in
displacy
NER visualization and correct API docs. - Fix issue #2754, #3028: Make
NORM
aToken
attribute instead of aLexeme
attribute to allow setting context-specific norms in tokenizer exceptions. - Fix issue #2769: Fix issue that'd cause segmentation fault when calling
EntityRecognizer.add_label
. - Fix issue #2772: Fix bug in sentence starts for non-projective parses.
- Fix issue #2779: Fix handling of pre-set entities.
- Fix issue #2782: Make
like_num
work with prefixed numbers. - Fix issue #2833: Raise better error if
Token
orSpan
are pickled. - Fix issue #2838: Add
Retokenizer.split
method to split one token into several. - Fix issue #2869: Make
doc[0].is_sent_start == True
. - Fix issue #2870: Make it illegal for the entity recognizer to predict whitespace tokens as
B
,L
orU
. - Fix issue #2871: Fix vectors for reserved words.
- Fix issue #2901: Fix issue with first call of
nlp
in Japanese (MeCab). - Fix issue #2924: Make IDs of displaCy arcs more unique to avoid clashes.
- Fix issue #3012: Fix clobber of
Doc.is_tagged
inDoc.from_array
. - Fix issue #3027: Allow
Span
to take unicode value forlabel
argument. - Fix issue #3048: Raise better errors for uninitialized pipeline components.
- Fix issue #3064: Allow single string attributes in
Doc.to_array
. - Fix issue #3093, #3067: Set
vectors.name
correctly when exporting model via CLI. - Fix issue #3112: Make sure entity types are added correctly on GPU.
- Fix issue #3122: Correct docs of
Token.subtree
andSpan.subtree
. - Fix issue #3128: Improve error handling in converters.
- Fix issue #3248: Fix
PhraseMatcher
pickling and make__len__
consistent. - Fix issue #3274: Make
Token.sent
work as expected without the parser. - Fix issue #3277: Add en/em dash to tokenizer prefixes and suffixes.
- Fix serialization of custom tokenizer if not all functions are defined.
- Fix bugs in beam-search training objective.
- Fix problems with model pickling.
⚠️ Backwards incompatibilities
- This version of spaCy requires downloading new models. You can use the
spacy validate
command 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.
- Due to difficulties linking our new
blis
for faster platform-independent matrix multiplication, v2.1.x currently **doesn't work on Python 2.7 o...