v1.6.0: Improvements to tokenizer and tests

@honnibal honnibal released this Jan 16, 2017 · 19 commits to master since this release

✨ 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 richcmp method to Token.
  • Fix issue #718: Contractions with She are now handled correctly.
  • Fix issue #736: Times are now tokenized with correct string values.
  • Fix issue #743: Token is now hashable.
  • Fix issue #744: were and Were are 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 Doc object manually.
  • Add documentation for tests to explain conventions and organisation.

πŸ‘₯ Contributors

Thanks to @oroszgy, @magnusburton, @guyrosin and @danielhers and for the pull requests!

Downloads

v1.5.0: Alpha support for Swedish and Hungarian

@ines ines released this Dec 27, 2016 · 295 commits to master since this release

✨ 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_data package in the setup.py.
  • Fix missing vec_path declaration that was failing if add_vectors was set.
  • Allow Vocab to load without serializer_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!

Downloads

v1.4.0: Improved language data and alpha Dutch support

@honnibal honnibal released this Dec 18, 2016 · 366 commits to master since this release

✨ 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: Morphology class 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 of spacy.load('en').
  • Fix issue #685: Expand TOKENIZER_EXCEPTIONS with 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

πŸ‘₯ Contributors

Thanks to @dafnevk, @jvdzwaan, @RvanNieuwpoort, @wrvhage, @jaspb, @savvopoulos and @davedwards for the pull requests!

Downloads

v1.3.0: Improve API consistency

@honnibal honnibal released this Dec 3, 2016 · 522 commits to master since this release

✨ API improvements

πŸ”΄ Bug fixes

  • Fix issue #605: accept argument to Matcher now rejects matches as expected.
  • Fix issue #617: Vocab.load() now works with string paths, as well as Path objects.
  • Fix issue #639: Stop words in Language class now used as expected.
  • Fix issues #656, #624: Tokenizer special-case rules now support arbitrary token attributes.

πŸ“– Documentation and examples

πŸ‘₯ Contributors

Thanks to @pokey, @ExplodingCabbage, @souravsingh, @sadovnychyi, @manojsakhwar, @TiagoMRodrigues, @savkov, @pspiegelhalter, @chenb67, @kylepjohnson, @YanhaoYang, @tjrileywisc, @dechov, @wjt, @jsmootiv and @blarghmatey for the pull requests!

Downloads

✨ Major features and improvements

  • NEW: Support Chinese tokenization, via Jieba.
  • NEW: Alpha support for French, Spanish, Italian and Portuguese tokenization.

πŸ”΄ Bug fixes

  • Fix issue #376: POS tags for "and/or" are now correct.
  • Fix issue #578: --force argument on download command now operates correctly.
  • Fix issue #595: Lemmatization corrected for some base forms.
  • Fix issue #588: Matcher now rejects empty patterns.
  • Fix issue #592: Added exception rule for tokenization of "Ph.D."
  • Fix issue #599: Empty documents now considered tagged and parsed.
  • Fix issue #600: Add missing token.tag and token.tag_ setters.
  • Fix issue #596: Added missing unicode import when compiling regexes that led to incorrect tokenization.
  • Fix issue #587: Resolved bug that caused Matcher to sometimes segfault.
  • Fix issue #429: Ensure missing entity types are added to the entity recognizer.

Downloads

v1.1.0: Bug fixes and adjustments

@honnibal honnibal released this Oct 23, 2016 · 874 commits to master since this release

  • Rename new pipeline keyword argument of spacy.load() to create_pipeline.
  • Rename new vectors keyword argument of spacy.load() to add_vectors.

πŸ”΄ Bug fixes

  • Fix issue #544: Add vocab.resize_vectors() method, to support changing to vectors of different dimensionality.
  • Fix issue #536: Default probability was incorrect for OOV words.
  • Fix issue #539: Unspecified encoding when opening some JSON files.
  • Fix issue #541: GloVe vectors were being loaded incorrectly.
  • Fix issue #522: Similarities and vector norms were calculated incorrectly.
  • Fix issue #461: ent_iob attribute was incorrect after setting entities via doc.ents
  • Fix issue #459: Deserialiser failed on empty doc
  • Fix issue #514: Serialization failed after adding a new entity label.

Downloads

v1.0.0: Support for deep learning workflows and entity-aware rule matcher

@honnibal honnibal released this Oct 18, 2016 · 970 commits to master since this release

✨ Major features and improvements

  • NEW: custom processing pipelines, to support deep learning workflows
  • NEW: Rule matcher now supports entity IDs and attributes
  • NEW: Official/documented training APIs and GoldParse class
  • Download and use GloVe vectors by default
  • Make it easier to load and unload word vectors
  • Improved rule matching functionality
  • Move basic data into the code, rather than the json files. This makes it simpler to use the tokenizer without the models installed, and makes adding new languages much easier.
  • Replace file-system strings with Path objects. You can now load resources over your network, or do similar trickery, by passing any object that supports the Path protocol.

⚠️ Backwards incompatibilities

  • The data_dir keyword argument of Language.__init__ (and its subclasses English.__init__ and German.__init__) has been renamed to path.
  • Details of how the Language base-class and its sub-classes are loaded, and how defaults are accessed, have been heavily changed. If you have your own subclasses, you should review the changes.
  • The deprecated token.repvec name has been removed.
  • The .train() method of Tagger and Parser has been renamed to .update()
  • The previously undocumented GoldParse class has a new __init__() method. The old method has been preserved in GoldParse.from_annot_tuples().
  • Previously undocumented details of the Parser class have changed.
  • The previously undocumented get_package and get_package_by_name helper functions have been moved into a new module, spacy.deprecated, in case you still need them while you update.

πŸ”΄ Bug fixes

  • Fix get_lang_class bug when GloVe vectors are used.
  • Fix Issue #411: doc.sents raised IndexError on empty string.
  • Fix Issue #455: Correct lemmatization logic
  • Fix Issue #371: Make Lexeme objects hashable
  • Fix Issue #469: Make noun_chunks detect root NPs

πŸ‘₯ Contributors

Thanks to @daylen, @RahulKulhari, @stared, @adamhadani, @izeye and @crawfordcomeaux for the pull requests!

Downloads

  • May 10, 2016

    0.101.0

    2016-05-0 0.101.0: Fixed German model
    * Fixed bug that prevented German parses from being deprojectivised.
    * Bug fixes to sentence boundary detection.
    * Add rich comparison methods to the Lexeme class.
    * Add missing Doc.has_vector and Span.has_vector properties.
    * Add missing Span.sent property.
  • May 4, 2016

    0.100.7

    2016-04-05 v0.100.7: German!
    ----------------------------
    
    spaCy finally supports another language, in addition to English. We're lucky to have Wolfgang Seeker on the team, and the new German model is just the beginning.
    Now that there are multiple languages, you should consider loading spaCy via the load() function. This function also makes it easier to load extra word vector data for English:
    
    .. code:: python
    
        import spacy
        en_nlp = spacy.load('en', vectors='en_glove_cc_300_1m_vectors')
        de_nlp = spacy.load('de')
    
    To support use of the load function, there are also two new helper functions: spacy.get_lang_class and spacy.set_lang_class.
    Once the German model is loaded, you can use it just like the English model:
    
    .. code:: python
    
        doc = nlp(u'''Wikipedia ist ein Projekt zum Aufbau einer EnzyklopΓ€die aus freien Inhalten, zu dem du mit deinem Wissen beitragen kannst. Seit Mai 2001 sind 1.936.257 Artikel in deutscher Sprache entstanden.''')
    
        for sent in doc.sents:
            print(sent.root.text, sent.root.n_lefts, sent.root.n_rights)
    
        # (u'ist', 1, 2)
        # (u'sind', 1, 3)
    
    The German model provides tokenization, POS tagging, sentence boundary detection, syntactic dependency parsing, recognition of organisation, location and person entities, and word vector representations trained on a mix of open subtitles and Wikipedia data. It doesn't yet provide lemmatisation or morphological analysis, and it doesn't yet recognise numeric entities such as numbers and dates.
    
    Bugfixes
    --------
    
    * spaCy < 0.100.7 had a bug in the semantics of the Token.__str__ and Token.__unicode__ built-ins: they included a trailing space.
    * Improve handling of "infixed" hyphens. Previously the tokenizer struggled with multiple hyphens, such as "well-to-do".
    
    * Improve handling of periods after mixed-case tokens
    
    * Improve lemmatization for English special-case tokens
    
    * Fix bug that allowed spaces to be treated as heads in the syntactic parse
    
    * Fix bug that led to inconsistent sentence boundaries before and after serialisation.
    
    * Fix bug from deserialising untagged documents.
  • Mar 8, 2016

    0.100.6

    Add support for GloVe vectors
    This release offers improved support for replacing the word vectors used by spaCy.
    
    To install Stanford's GloVe vectors, trained on the Common Crawl, just run
    
        sputnik --name spacy install en_glove_cc_300_1m_vectors
    
    To reduce memory usage and loading time, we've trimmed the vocabulary down to 1m entries.
    
    This release also integrates all the code necessary for German parsing. A German model will be
    released shortly. To assist in multi-lingual processing, we've added a load() function. To load the English model with the GloVe vectors:
    
        spacy.load('en', vectors='en_glove_cc_300_1m_vectors')