Releases: explosion/spaCy
v1.8.0: Better NER training, saving and loading
We've been delighted to see spaCy growing so much over the last few months. Before the v1.0 release, we asked for your feedback, which has been incredibly helpful in improving the library. As we're getting closer to v2.0 we hope you'll take a few minutes to fill out the survey, to help us understand how you're using the library, and how it can be better.
📊 Take the survey!
✨ Major features and improvements
- NEW: Add experimental
Language.save_to_directory()method to make it easier to save user-trained models. - Add
spacy.compatmodule to handle platform and Python version compatibility. - Update
packagecommand to read from existingmeta.jsonand supply custom location to meta file. - Fix various compatibility issues and improve error messages in
spacy.cli.
🔴 Bug fixes
- Fix issue #701, #822, #937, #959: Updated docs for NER training and saving/loading.
- Fix issue #968:
spacy.load()now prints warning if no model is found. - Fix issue #970, #978: Use correct unicode paths for symlinks on Python 2 / Windows.
- Fix issue #973: Make
token.lemmaandtoken.lemma_attributes writeable. - Fix issue #983: Add
spacy.compatto handle compatibility.
📖 Documentation and examples
- NEW: Example for training a new entity type.
- NEW: Workflow for training the Named Entity Recognizer.
- NEW: Workflow for saving and loading models.
- Update Contributing Guidelines with code conventions for Python and Cython.
- Fix various typos and inconsistencies.
👥 Contributors
Thanks to @tsohil and @oroszgy for the pull requests!
v1.7.5: Bug fixes and new CLI commands
We've been delighted to see spaCy growing so much over the last few months. Before the v1.0 release, we asked for your feedback, which has been incredibly helpful in improving the library. As we're getting closer to v2.0 we hope you'll take a few minutes to fill out the survey, to help us understand how you're using the library, and how it can be better.
📊 Take the survey!
✨ Major features and improvements
- NEW: Experimental
convertandmodelcommands to convert files to spaCy's JSON format for training, and initialise a new model and its data directory. - Updated language data for Spanish and Portuguese.
🔴 Bug fixes
- Error messages now show the new download commands if no model is loaded.
- The
packagecommand now works correctly and doesn't fail when creating files. - Fix issue #693: Improve rules for detecting noun chunks.
- Fix issue #758: Adding labels now doesn't cause
EntityRecognizertransition bug. - Fix issue #862:
labelkeyword argument is now handled correctly indoc.merge(). - Fix issue #891: Tokens containing
/infixes are now split by the tokenizer. - Fix issue #898: Dependencies are now deprojectivized correctly.
- Fix issue #910: NER models with new labels now saved correctly, preventing memory errors.
- Fix issue #934, #946: Symlink paths are now handled correctly on Windows, preventing
invalid switcherror. - Fix issue #947: Hebrew module is now added to
setup.pyand__init__.py. - Fix issue #948: Contractions are now lemmatized correctly.
- Fix issue #957: Use
regexmodule to avoid back-tracking on URL regex.
📖 Documentation and examples
- Documentation for new
convertandmodelcommands. - Update troubleshooting guide with
--no-cache-direrror resulting from outdated pip version and file name shadowing model problem. - Fix various typos and inconsistencies.
👥 Contributors
Thanks to @ericzhao28, @Gregory-Howard, @kinow, @jreeter, @mamoit, @kumaranvpl and @dvsrepo for the pull requests!
v1.7.3: Alpha support for Hebrew, new CLI commands and bug fixes
✨ Major features and improvements
- NEW: Alpha tokenization for Hebrew.
- NEW: Experimental
trainandpackagecommands to train a model and convert it to a Python package. - Enable experimental support for L1-regularized regression loss in dependency parser and named entity recognizer. Should improve fine-tuning of existing models.
- Fix high memory usage in
downloadcommand.
🔴 Bug fixes
- Fix issue #903, #912: Base forms are now correctly protected from lemmatization.
- Fix issue #909, #925: Use
mlinkto create symlinks in Python 2 on Windows. - Fix issue #910: Update config when adding label to pre-trained model.
- Fix issue #911: Delete old training scripts.
- Fix issue #918: Use
--no-cache-dirwhen downloading models via pip. - Fixed infinite recursion in
spacy.info. - Fix initialisation of languages when no model is available.
📖 Documentation and examples
- Troubleshooting guide for most common issues and usage problems.
- Documentation for new
packageandtraincommands. - Documentation for spaCy's JSON format for training data.
- Fix various typos and inconsistencies.
👥 Contributors
Thanks to @raphael0202, @pavlin99th, @iddoberger and @solresol for the pull requests!
v1.7.2: Small fixes to beam parser and model linking
🔴 Bug fixes
- Success message in
linkis now displayed correctly when using local paths. - Decrease beam density and fix Python 3 problem in
beam_parser. - Fix issue #894: Model packages now install and compile paths correctly on Windows.
📖 Documentation and examples
- Standalone NER training example.
- Fix various typos and inconsistencies.
v1.7.1: Fix data download for system installation
🔴 Bug fixes
- Fix issue #892: Data now downloads and installs correctly on system Python.
v1.7.0: New 50 MB model, CLI, better downloads and lots of bug fixes
✨ Major features and improvements
- NEW: Improved English model.
- NEW: Additional smaller English model (50 MB, only 2% less accurate than larger model).
- NEW: Command line interface to download and link models, view debugging info and print Markdown info for easy copy-pasting to GitHub.
- NEW: Alpha support for Finnish and Bengali.
- Updated language data for Swedish and French.
- Simplified import of lemmatizer data to make it easier to add lemmatization for other languages.
Improved model download and installation
To increase transparency and make it easier to use spaCy with your own models, all data is now available as direct downloads, organised in individual releases. spaCy v1.7 also supports installing and loading models as Python packages. You can now choose how and where you want to keep the data files, and set up "shortcut links" to load models by name from within spaCy. For more info on this, see the new models documentation.
# out-of-the-box: download best-matching default model
python -m spacy download en
# download best-matching version of specific model for your spaCy installation
python -m spacy download en_core_web_md
# pip install .tar.gz archive from path or URL
pip install /Users/you/en_core_web_md-1.2.0.tar.gz
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_md-1.2.0/en_core_web_md-1.2.0.tar.gz
# set up shortcut link to load installed package as "en_default"
python -m spacy link en_core_web_md en_default
# set up shortcut link to load local model as "my_amazing_model"
python -m spacy link /Users/you/data my_amazing_modelnlp1 = spacy.load('en')
nlp2 = spacy.load('en_core_web_md')
nlp3 = spacy.load('my_amazing_model')⚠️ Backwards incompatibilities
- IMPORTANT: Due to fixes to the lemmatizer, the previous English model (v1.1.0) is not compatible with spaCy v1.7.0. When upgrading to this version, you need to download the new model (
en_core_web_mdv1.2.0). The German model is still valid and will be linked to thedeshortcut automatically. - spaCy's package manger
sputnikis now deprecated. For now, we will keep maintaining our download server to support thepython -m spacy.{en|de}.download allcommand in older versions, but it will soon re-route to download the models from GitHub instead. - English lemmatizer data is now stored in Python files in
spacy/enand the WordNet data previously stored incorpora/enhas been removed. This should not affect your code, unless you have added functionality that relies on these data files.
This will be the last major release before v2.0, which will introduce a few breaking changes to allow native deep learning integration. If you're using spaCy in production, don't forget to pin your dependencies:
# requirements.txt
spacy>=1.7.0,<2.0.0
# setup.py
install_requires=['spacy>=1.7.0,<2.0.0']🔴 Bug fixes
- Fix issue #401: Contractions with
'sare now lemmatized correctly. - Fix issue #507, #711, #798: Models are now available as direct downloads.
- Fix issue #669:
Spanclass now haslower_andupper_properties. - Fix issue #686: Pronouns now lemmatize to
-PRON-. - Fix issue #704: Sentence boundary detection improved with new English model.
- Fix issue #717: Contracted verbs now have the correct lemma.
- Fix issue #730, #763, #880, #890: A smaller English model (
en_core_web_sm) is now available. - Fix issue #755: Add missing import to prevent exception using
--force. - Fix issue #759: All available
NUM_WORDSare now recognised correctly aslike_number. - Fix issue #766: Add operator to
matcherand make sure open patterns are closed at doc end. - Fix issue #768: Allow zero-width infix tokens in tokenizer exceptions.
- Fix issue #771: Version numbers for
ujsonandplacare now specified correctly. - Fix issue #775: "Shell" and "shell" are now excluded from English tokenizer exceptions.
- Fix issue #778: spaCy is now available on conda via
conda-forge. - Fix issue #781: Lemmatizer is now correctly applied to OOV words.
- Fix issue #791: Environment variables are now passed to subprocess calls in
cythonize. - Fix issue #792: Trailing whitespace is now handled correctly by the tokenizer.
- Fix issue #801: Update global infix rules to prevent attached punctuation in complex cases.
- Fix issue #805: Swedish tokenizer exceptions are now imported correctly.
- Fix issue #834:
load_vectors()now accepts arbitrary space characters as word tokens. - Fix issue #840: Use better regex for matching URL patterns in tokenizer exceptions.
- Fix issue #847: "Shed" and "shed" are now excluded from English tokenizer exceptions.
- Fix issue #856: Vocab now adds missing words when importing vectors.
- Fix issue #859: Prevent extra spaces from being added after applying
token_matchregex. - Fix issue #868: Model data can now be downloaded to any directory.
- Fix issue #886:
token.idxnow matches original index when text contains newlines.
📖 Documentation and examples
- NEW: Models usage documentation.
- NEW: Command line interface documentation.
- NEW:
spacy-models, including the latest model releases. - NEW: Linear model feature scheme API docs.
- Add
help wanted (easy)issue label for contribution requests suitable for beginners. - Update installation docs with more details on model download and building spaCy from source.
- Fix various typos and inconsistencies.
👥 Contributors
This release is brought to you by @honnibal and @ines. Thanks to @magnusburton, @jktong, @JasonKessler, @sudowork, @oiwah, @raphael0202, @latkins, @ematvey, @Tpt, @wallinm1, @knub, @wehlutyk, @vaulttech, @nycmonkey, @jondoughty, @aniruddha-adhikary, @badbye, @shuvanon, @rappdw, @ericzhao28, @juanmirocks and @rominf for the pull requests!
v1.6.0: Improvements to tokenizer and tests
✨ Major features and improvements
- Updated token exception handling mechanism to allow the usage of arbitrary functions as token exception matchers.
- Improve how tokenizer exceptions for English contractions and punctuations are generated.
- Update language data for Hungarian and Swedish tokenization.
- Update to use Thinc v6 to prepare for spaCy v2.0.
🔴 Bug fixes
- Fix issue #326: Tokenizer is now more consistent and handles abbreviations correctly.
- Fix issue #344: Tokenizer now handles URLs correctly.
- Fix issue #483: Period after two or more uppercase letters is split off in tokenizer exceptions.
- Fix issue #631: Add
richcmpmethod toToken. - Fix issue #718: Contractions with
Sheare now handled correctly. - Fix issue #736: Times are now tokenized with correct string values.
- Fix issue #743:
Tokenis now hashable. - Fix issue #744:
wereandWereare now excluded correctly from contractions.
📋 Tests
- Modernise and reorganise all tests and remove model dependencies where possible.
- Improve test speed to ~20s for basic tests (from previously >80s) and ~100s including models (from previously >200s).
- Add fixtures for spaCy components and test utilities, e.g. to create
Docobject manually. - Add documentation for tests to explain conventions and organisation.
👥 Contributors
Thanks to @oroszgy, @magnusburton, @guyrosin and @danielhers and for the pull requests!
v1.5.0: Alpha support for Swedish and Hungarian
✨ Major features and improvements
- NEW: Alpha support for Swedish tokenization.
- NEW: Alpha support for Hungarian tokenization.
- Update language data for Spanish tokenization.
- Speed up tokenization when no data is preloaded by caching the first 10,000 vocabulary items seen.
🔴 Bug fixes
- List the
language_datapackage in thesetup.py. - Fix missing
vec_pathdeclaration that was failing ifadd_vectorswas set. - Allow
Vocabto load withoutserializer_freqs.
📖 Documentation and examples
- NEW: spaCy Jupyter notebooks repo: ongoing collection of easy-to-run spaCy examples and tutorials.
- Fix issue #657: Generalise dependency parsing annotation specs beyond English.
- Fix various typos and inconsistencies.
👥 Contributors
Thanks to @oroszgy, @magnusburton, @jmizgajski, @aikramer2, @fnorf and @bhargavvader for the pull requests!
v1.4.0: Improved language data and alpha Dutch support
✨ Major features and improvements
- NEW: Alpha support for Dutch tokenization.
- Reorganise and improve format of language data.
- Add shared tag map, entity rules, emoticons and punctuation to language data.
- Convert entity rules, morphological rules and lemmatization rules from JSON to Python.
- Update language data for English, German, Spanish, French, Italian and Portuguese.
🔴 Bug fixes
- Fix issue #649: Update and reorganise stop lists.
- Fix issue #672: Make
token.ent_iob_return unicode. - Fix issue #674: Add missing lemmas for contracted forms of "be" to
TOKENIZER_EXCEPTIONS. - Fix issue #683:
Morphologyclass now supplies tag map value for the special space tag if it's missing. - Fix issue #684: Ensure
spacy.en.English()loads the Glove vector data if available. Previously was inconsistent with behaviour ofspacy.load('en'). - Fix issue #685: Expand
TOKENIZER_EXCEPTIONSwith unicode apostrophe (’). - Fix issue #689: Correct typo in
STOP_WORDS. - Fix issue #691: Add tokenizer exceptions for "gonna" and "Gonna".
⚠️ Backwards incompatibilities
No changes to the public, documented API, but the previously undocumented language data and model initialisation processes have been refactored and reorganised. If you were relying on the bin/init_model.py script, see the new spaCy Developer Resources repo. Code that references internals of the spacy.en or spacy.de packages should also be reviewed before updating to this version.
📖 Documentation and examples
- NEW: "Adding languages" workflow.
- NEW: "Part-of-speech tagging" workflow.
- NEW: spaCy Developer Resources repo – scripts, tools and resources for developing spaCy.
- Fix various typos and inconsistencies.
👥 Contributors
Thanks to @dafnevk, @jvdzwaan, @RvanNieuwpoort, @wrvhage, @jaspb, @savvopoulos and @davedwards for the pull requests!
v1.3.0: Improve API consistency
✨ Major features and improvements
- Add
Span.sentimentattribute. - #658: Add
Span.noun_chunksiterator (thanks @pokey). - #642: Let
--data-pathbe specified when running download.py scripts (thanks @ExplodingCabbage). - #638: Add German stopwords (thanks @souravsingh).
- #614: Fix
PhraseMatcherto work with newMatcher(thanks @sadovnychyi).
🔴 Bug fixes
- Fix issue #605:
acceptargument toMatchernow rejects matches as expected. - Fix issue #617:
Vocab.load()now works with string paths, as well asPathobjects. - Fix issue #639: Stop words in
Languageclass now used as expected. - Fix issues #656, #624:
Tokenizerspecial-case rules now support arbitrary token attributes.
📖 Documentation and examples
- Add "Customizing the tokenizer" workflow.
- Add "Training the tagger, parser and entity recognizer" workflow.
- Add "Entity recognition" workflow.
- Fix various typos and inconsistencies.
👥 Contributors
Thanks to @pokey, @ExplodingCabbage, @souravsingh, @sadovnychyi, @manojsakhwar, @TiagoMRodrigues, @savkov, @pspiegelhalter, @chenb67, @kylepjohnson, @YanhaoYang, @tjrileywisc, @dechov, @wjt, @jsmootiv and @blarghmatey for the pull requests!