spaCy/spacy/lang
Paul O'Leary McCann 756b66b7c0 Reduce size of language data (#4141)
* Move Turkish lemmas to a json file

Rather than a large dict in Python source, the data is now a big json
file. This includes a method for loading the json file, falling back to
a compressed file, and an update to MANIFEST.in that excludes json in
the spacy/lang directory.

This focuses on Turkish specifically because it has the most language
data in core.

* Transition all lemmatizer.py files to json

This covers all lemmatizer.py files of a significant size (>500k or so).
Small files were left alone.

None of the affected files have logic, so this was pretty
straightforward.

One unusual thing is that the lemma data for Urdu doesn't seem to be
used anywhere. That may require further investigation.

* Move large lang data to json for fr/nb/nl/sv

These are the languages that use a lemmatizer directory (rather than a
single file) and are larger than English.

For most of these languages there were many language data files, in
which case only the large ones (>500k or so) were converted to json. It
may or may not be a good idea to migrate the remaining Python files to
json in the future.

* Fix id lemmas.json

The contents of this file were originally just copied from the Python
source, but that used single quotes, so it had to be properly converted
to json first.

* Add .json.gz to gitignore

This covers the json.gz files built as part of distribution.

* Add language data gzip to build process

Currently this gzip data on every build; it works, but it should be
changed to only gzip when the source file has been updated.

* Remove Danish lemmatizer.py

Missed this when I added the json.

* Update to match latest explosion/srsly#9

The way gzipped json is loaded/saved in srsly changed a bit.

* Only compress language data if necessary

If a .json.gz file exists and is newer than the corresponding json file,
it's not recompressed.

* Move en/el language data to json

This only affected files >500kb, which was nouns for both languages and
the generic lookup table for English.

* Remove empty files in Norwegian tokenizer

It's unclear why, but the Norwegian (nb) tokenizer had empty files for
adj/adv/noun/verb lemmas. This may have been a result of copying the
structure of the English lemmatizer.

This removed the files, but still creates the empty sets in the
lemmatizer. That may not actually be necessary.

* Remove dubious entries in English lookup.json

" furthest" and " skilled" - both prefixed with a space - were in the
English lookup table. That seems obviously wrong so I have removed them.

* Fix small issues with en/fr lemmatizers

The en tokenizer was including the removed _nouns.py file, so that's
removed.

The fr tokenizer is unusual in that it has a lemmatizer directory with
both __init__.py and lemmatizer.py. lemmatizer.py had not been converted
to load the json language data, so that was fixed.

* Auto-format

* Auto-format

* Update srsly pin

* Consistently use pathlib paths
2019-08-20 14:54:11 +02:00
..
af 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
ar Add writing_system to ArabicDefaults (experimental) 2019-03-11 14:22:23 +01:00
bg 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
bn Merge branch 'master' into develop 2019-02-18 10:03:32 +01:00
ca Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
cs 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
da Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
de Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
el Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
en Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
es Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
et 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
fa Add support for vocab.writing_system property (#3390) 2019-03-11 15:23:20 +01:00
fi 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
fr Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
ga 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
he Auto-format [ci skip] 2019-03-11 17:10:50 +01:00
hi 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
hr Issue #1107 - adds examples.py for Croatian language (#4143) 2019-08-18 23:04:41 +02:00
hu Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
id Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
is 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
it Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
ja Don't set extension attribute in Japanese (closes #3398) 2019-03-12 13:30:33 +01:00
kn Enhancing Kannada language Resources (#3755) 2019-05-20 12:56:10 +02:00
ko Tidy up and auto-format 2019-08-18 15:09:16 +02:00
lt Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
lv 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
mr Tidy up [ci skip] 2019-06-12 13:38:23 +02:00
nb Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
nl Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
pl Tidy up and fix small bugs and typos 2019-02-08 14:14:49 +01:00
pt Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
ro Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
rs Stopwords for Serbian language. (#4078) 2019-08-05 10:22:27 +02:00
ru Merge branch 'master' into develop 2019-02-25 15:54:55 +01:00
si 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
sk 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
sl 💫 Add base Language classes for more languages (#3276) 2019-02-15 01:31:19 +11:00
sq Update languages and examples (see #1107) 2019-06-26 16:19:17 +02:00
sv Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
ta Remove stray print statement (closes #3342) 2019-02-27 15:35:04 +01:00
te 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
th fix thai bug (#3693) 2019-05-10 14:21:34 +02:00
tl Tidy up and fix small bugs and typos 2019-02-08 14:14:49 +01:00
tr Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
tt Replacing regex library with re to increase tokenization speed (#3218) 2019-02-01 18:05:22 +11:00
uk Add missing " (closes #3343) 2019-02-27 16:37:03 +01:00
ur Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
vi 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
xx 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
zh Tidy up and auto-format 2019-08-18 15:09:16 +02:00
__init__.py Remove imports in /lang/__init__.py 2017-05-08 23:58:07 +02:00
char_classes.py added missing punctuation following conventions. (#4066) 2019-08-04 13:41:18 +02:00
lex_attrs.py Replacing regex library with re to increase tokenization speed (#3218) 2019-02-01 18:05:22 +11:00
norm_exceptions.py Update norm_exceptions.py (#3778) 2019-05-27 11:52:52 +02:00
punctuation.py Clean up of char classes, few tokenizer fixes and faster default French tokenizer (#3293) 2019-02-20 22:10:13 +01:00
tag_map.py 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
tokenizer_exceptions.py Make the emoticon list a raw string (#4139) 2019-08-18 15:17:13 +02:00