spaCy/spacy/tests/lang
adrianeboyd a5cd203284
Reduce stored lexemes data, move feats to lookups (#5238)
* Reduce stored lexemes data, move feats to lookups

* Move non-derivable lexemes features (`norm / cluster / prob`) to
`spacy-lookups-data` as lookups
  * Get/set `norm` in both lookups and `LexemeC`, serialize in lookups
  * Remove `cluster` and `prob` from `LexemesC`, get/set/serialize in
    lookups only
* Remove serialization of lexemes data as `vocab/lexemes.bin`
  * Remove `SerializedLexemeC`
  * Remove `Lexeme.to_bytes/from_bytes`
* Modify normalization exception loading:
  * Always create `Vocab.lookups` table `lexeme_norm` for
    normalization exceptions
  * Load base exceptions from `lang.norm_exceptions`, but load
    language-specific exceptions from lookups
  * Set `lex_attr_getter[NORM]` including new lookups table in
    `BaseDefaults.create_vocab()` and when deserializing `Vocab`
* Remove all cached lexemes when deserializing vocab to override
  existing normalizations with the new normalizations (as a replacement
  for the previous step that replaced all lexemes data with the
  deserialized data)

* Skip English normalization test

Skip English normalization test because the data is now in
`spacy-lookups-data`.

* Remove norm exceptions

Moved to spacy-lookups-data.

* Move norm exceptions test to spacy-lookups-data

* Load extra lookups from spacy-lookups-data lazily

Load extra lookups (currently for cluster and prob) lazily from the
entry point `lg_extra` as `Vocab.lookups_extra`.

* Skip creating lexeme cache on load

To improve model loading times, do not create the full lexeme cache when
loading. The lexemes will be created on demand when processing.

* Identify numeric values in Lexeme.set_attrs()

With the removal of a special case for `PROB`, also identify `float` to
avoid trying to convert it with the `StringStore`.

* Skip lexeme cache init in from_bytes

* Unskip and update lookups tests for python3.6+

* Update vocab pickle to include lookups_extra

* Update vocab serialization tests

Check strings rather than lexemes since lexemes aren't initialized
automatically, account for addition of "_SP".

* Re-skip lookups test because of python3.5

* Skip PROB/float values in Lexeme.set_attrs

* Convert is_oov from lexeme flag to lex in vectors

Instead of storing `is_oov` as a lexeme flag, `is_oov` reports whether
the lexeme has a vector.

Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com>
2020-05-19 15:59:14 +02:00
..
ar Revert #4334 2019-09-29 17:32:12 +02:00
bn Revert #4334 2019-09-29 17:32:12 +02:00
ca Revert #4334 2019-09-29 17:32:12 +02:00
da Reduce stored lexemes data, move feats to lookups (#5238) 2020-05-19 15:59:14 +02:00
de Reduce stored lexemes data, move feats to lookups (#5238) 2020-05-19 15:59:14 +02:00
el Limiting noun_chunks for specific languages (#5396) 2020-05-14 12:58:06 +02:00
en Reduce stored lexemes data, move feats to lookups (#5238) 2020-05-19 15:59:14 +02:00
es Limiting noun_chunks for specific languages (#5396) 2020-05-14 12:58:06 +02:00
eu Add __init__.py to eu and hy tests (#5278) 2020-04-08 20:03:06 +02:00
fa Fix syntax iterators for Persian (#5437) 2020-05-14 16:51:03 +02:00
fi add two abbreviations and some additional unit tests (#5040) 2020-02-22 14:12:32 +01:00
fr Limiting noun_chunks for specific languages (#5396) 2020-05-14 12:58:06 +02:00
ga Revert #4334 2019-09-29 17:32:12 +02:00
gu Add 2 ini files in tests/lang (#5359) 2020-04-27 13:01:54 +02:00
he Revert #4334 2019-09-29 17:32:12 +02:00
hu Tidy up and auto-format 2020-03-25 12:28:12 +01:00
hy Add __init__.py to eu and hy tests (#5278) 2020-04-08 20:03:06 +02:00
id Limiting noun_chunks for specific languages (#5396) 2020-05-14 12:58:06 +02:00
it Revert #4334 2019-09-29 17:32:12 +02:00
ja Revert #4334 2019-09-29 17:32:12 +02:00
ko Revert #4334 2019-09-29 17:32:12 +02:00
lb Reduce stored lexemes data, move feats to lookups (#5238) 2020-05-19 15:59:14 +02:00
lt Improve Lithuanian tokenization (#5205) 2020-03-25 11:28:12 +01:00
ml Add 2 ini files in tests/lang (#5359) 2020-04-27 13:01:54 +02:00
nb Limiting noun_chunks for specific languages (#5396) 2020-05-14 12:58:06 +02:00
nl Move lookup tables out of the core library (#4346) 2019-10-01 00:01:27 +02:00
pl Revert #4334 2019-09-29 17:32:12 +02:00
pt Revert #4334 2019-09-29 17:32:12 +02:00
ro Move lookup tables out of the core library (#4346) 2019-10-01 00:01:27 +02:00
ru Revert #4334 2019-09-29 17:32:12 +02:00
sr Move lookup tables out of the core library (#4346) 2019-10-01 00:01:27 +02:00
sv Limiting noun_chunks for specific languages (#5396) 2020-05-14 12:58:06 +02:00
th Revert #4334 2019-09-29 17:32:12 +02:00
tr Move lookup tables out of the core library (#4346) 2019-10-01 00:01:27 +02:00
tt Add trailing whitespace to multiline test text (#4877) 2020-01-06 14:58:59 +01:00
uk Revert #4334 2019-09-29 17:32:12 +02:00
ur Revert #4334 2019-09-29 17:32:12 +02:00
yo Adding support for Yoruba Language (#4614) 2019-12-21 14:11:50 +01:00
zh Add method to update / reset pkuseg user dict (#5404) 2020-05-08 11:21:46 +02:00
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_attrs.py Tidy up and auto-format 2019-12-21 19:04:17 +01:00
test_initialize.py Adding support for Yoruba Language (#4614) 2019-12-21 14:11:50 +01:00