From 79f11d4f854dbf283e765d4f072d13b502399413 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 23 Nov 2017 17:19:50 +0100 Subject: [PATCH 1/6] Pickle vectors with vocab --- spacy/vocab.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index 59df8cc1b..438a08ca6 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -470,26 +470,27 @@ cdef class Vocab: def pickle_vocab(vocab): sstore = vocab.strings + vectors = vocab.vectors morph = vocab.morphology length = vocab.length data_dir = vocab.data_dir lex_attr_getters = dill.dumps(vocab.lex_attr_getters) lexemes_data = vocab.lexemes_to_bytes() return (unpickle_vocab, - (sstore, morph, data_dir, lex_attr_getters, lexemes_data, length)) + (sstore, vectors, morph, data_dir, lex_attr_getters, lexemes_data, length)) -def unpickle_vocab(sstore, morphology, data_dir, +def unpickle_vocab(sstore, vectors, morphology, data_dir, lex_attr_getters, bytes lexemes_data, int length): cdef Vocab vocab = Vocab() vocab.length = length + vocab.vectors = vectors vocab.strings = sstore vocab.morphology = morphology vocab.data_dir = data_dir vocab.lex_attr_getters = dill.loads(lex_attr_getters) vocab.lexemes_from_bytes(lexemes_data) vocab.length = length - link_vectors_to_models(vocab) return vocab From 94eac75b7c9d40f51b0734db082e39331d89f206 Mon Sep 17 00:00:00 2001 From: Thomas Werkmeister Date: Sun, 3 Dec 2017 04:16:28 -0600 Subject: [PATCH 2/6] fix setup.py spacy req string for packaging Requirement should be `spacy>=2.0.2` instead of `spacy2.0.2` --- spacy/cli/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/cli/package.py b/spacy/cli/package.py index 8c590b49b..3dc7fa3e0 100644 --- a/spacy/cli/package.py +++ b/spacy/cli/package.py @@ -146,7 +146,7 @@ def list_files(data_dir): def list_requirements(meta): parent_package = meta.get('parent_package', 'spacy') - requirements = [parent_package + meta['spacy_version']] + requirements = [parent_package + ">=" + meta['spacy_version']] if 'setup_requires' in meta: requirements += meta['setup_requires'] return requirements From 9d4c185860a30dc6690291192509992dceaf1456 Mon Sep 17 00:00:00 2001 From: Mark Dodwell Date: Mon, 4 Dec 2017 23:28:06 -0800 Subject: [PATCH 3/6] Fix link to CLEAR Style dependency labels PDF --- website/api/_annotation/_dep-labels.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/api/_annotation/_dep-labels.jade b/website/api/_annotation/_dep-labels.jade index 1cb05027c..e704c808e 100644 --- a/website/api/_annotation/_dep-labels.jade +++ b/website/api/_annotation/_dep-labels.jade @@ -52,7 +52,7 @@ p +accordion("English", "dependency-parsing-english") p | The English dependency labels use the - | #[+a("http://www.mathcs.emory.edu/~choi/doc/clear-dependency-2012.pdf") CLEAR Style] + | #[+a("http://www.mathcs.emory.edu/~choi/doc/cu-2012-choi.pdf") CLEAR Style] | by #[+a("http://www.clearnlp.com") ClearNLP]. +table(["Label", "Description"]) From 04650e38c7d1bf886d235bb3ace61a91c28cb60b Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 5 Dec 2017 10:52:31 +0100 Subject: [PATCH 4/6] Set version to 2.0.4.dev0 --- spacy/about.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/about.py b/spacy/about.py index 8c63531a4..1fe5ca0fb 100644 --- a/spacy/about.py +++ b/spacy/about.py @@ -3,13 +3,13 @@ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy' -__version__ = '2.0.3' +__version__ = '2.0.4.dev0' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython' __uri__ = 'https://spacy.io' __author__ = 'Explosion AI' __email__ = 'contact@explosion.ai' __license__ = 'MIT' -__release__ = True +__release__ = False __docs_models__ = 'https://spacy.io/usage/models' __download_url__ = 'https://github.com/explosion/spacy-models/releases/download' From 5719fd1ce979817e79b1bd5f50c83564e2c08fad Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 5 Dec 2017 10:52:48 +0100 Subject: [PATCH 5/6] Require dev1 of thinc --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 884d79829..55e3acd3e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ pathlib numpy>=1.7 cymem>=1.30,<1.32 preshed>=1.0.0,<2.0.0 -thinc>=6.10.1,<6.11.0 +thinc==6.10.2.dev1 murmurhash>=0.28,<0.29 plac<1.0.0,>=0.9.6 six From b712de774e749baaff2b5b2342502fcd1493e2b7 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 5 Dec 2017 12:45:24 +0100 Subject: [PATCH 6/6] Fix vectors pickling --- spacy/vectors.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/vectors.pyx b/spacy/vectors.pyx index 6c5018d13..1e4e97c38 100644 --- a/spacy/vectors.pyx +++ b/spacy/vectors.pyx @@ -85,7 +85,7 @@ cdef class Vectors: return len(self.key2row) def __reduce__(self): - keys_and_rows = self.key2row.items() + keys_and_rows = tuple(self.key2row.items()) return (unpickle_vectors, (keys_and_rows, self.data)) def __getitem__(self, key):