Commit Graph

8595 Commits

Author SHA1 Message Date
Ines Montani
284bbb1dd1
Merge pull request #2146 from justindujardin/tensorboard-standalone-example
Add example using TensorBoard standalone projector
2018-03-27 13:23:32 +02:00
Justin DuJardin
4eeb178856 Add example using TensorBoard standalone projector
- the tensorboard standalone project expects a different set of files than the plugin to TensorFlow.
2018-03-25 21:50:13 -07:00
Ines Montani
68226109f4
Merge pull request #2142 from jimregan/polish-more-tokens
more exceptions
2018-03-24 19:06:44 +01:00
Matthew Honnibal
d566e673bf Set version to v2.0.10 2018-03-24 18:09:03 +01:00
Matthew Honnibal
0d3bf0d4eb Merge branch 'master' of https://github.com/explosion/spaCy 2018-03-24 17:31:49 +01:00
dejanmarich
ccd1c04c63 Update stop_words.py
Added more words
2018-03-24 17:31:24 +01:00
ines
f1446b0257 Port over Turkish changes 2018-03-24 17:31:07 +01:00
DuyguA
cd604878a4 quick typo fix 2018-03-24 17:26:35 +01:00
Matthew Honnibal
406548b976 Support .gz and .tar.gz files in spacy init-model 2018-03-24 17:18:32 +01:00
ines
6173c4aaa6 Port over contributor agreements 2018-03-24 17:17:37 +01:00
ines
4ec2809eb5 Port over TensorBoard example 2018-03-24 17:15:48 +01:00
ines
5ecc60cf3b Add book to resources [ci skip] 2018-03-24 17:12:56 +01:00
ines
53680642af Port over docs changes [ci skip] 2018-03-24 17:12:48 +01:00
Matthew Honnibal
74cc6bb06a Merge branch 'master' into hotfix/v2.0.9 2018-03-24 17:08:13 +01:00
Matthew Honnibal
11fc69d6ef Merge remote-tracking branch 'origin' 2018-03-24 17:07:50 +01:00
Matthew Honnibal
48f3606a8a Merge branch 'master' into hotfix/v2.0.9 2018-03-24 17:06:50 +01:00
Matthew Honnibal
d4cad89407 Merge branch 'develop' 2018-03-24 17:05:18 +01:00
Jim O'Regan
efe037e8be more exceptions 2018-03-24 00:05:27 +00:00
Ines Montani
a218579be7
Merge pull request #2141 from ottosulin/fin_examples
Finnish examples
2018-03-23 22:57:28 +01:00
Ines Montani
719037cf20
Update formatting and add missing commas 2018-03-23 22:18:20 +01:00
Ines Montani
2b68361501
Merge pull request #2140 from ottosulin/ottosulin_contributor [ci skip]
My contributor agreement
2018-03-23 22:14:34 +01:00
Otto Sulin
266efc2018 Added Finnish examples 2018-03-23 22:58:52 +02:00
Ines Montani
cd97a44894
Merge pull request #2137 from justindujardin/tensorboard-example
Add example for visualizing word vectors with TensorBoard Projector
2018-03-23 21:47:13 +01:00
Otto Sulin
82acb8f399 My contributor agreement 2018-03-23 22:46:58 +02:00
Otto Sulin
1940e54602 Added Finnish numbers 2018-03-23 22:33:08 +02:00
Otto Sulin
4ec3f19e2b fixed stop words -> to-do lex_attrs.py 2018-03-23 22:18:17 +02:00
Justin DuJardin
c7ff8ee66c Add contributor agreement 2018-03-23 13:11:56 -07:00
Justin DuJardin
eef9430f07 Add example for visualizing word vectors with TensorBoard Projector
Use:

```bash
python vectors_tensorboard.py en_core_web_lg ./output_folder spaCy_large
```
2018-03-23 12:49:01 -07:00
Matthew Honnibal
85717f570c Merge branch 'master' of https://github.com/explosion/spaCy 2018-03-23 20:30:42 +01:00
Matthew Honnibal
8902754f0b Fix vector loading for ud_train 2018-03-23 20:30:00 +01:00
Ines Montani
782ec6f4f2
Merge pull request #2131 from calumcalder/fix-displacy-docs-typo
Fix typo in documentation for displacy Visualizer
2018-03-23 13:03:00 +01:00
Xiaoquan Kong
a71b99d7ff bugfix for global-variable-change-in-runtime related issue (#2135)
* Bugfix: setting pollution from spacy/cli/ud_train.py to whole package

* Add contributor agreement of howl-anderson
2018-03-23 11:36:38 +01:00
Calum Calder
d000b4323a
Add contributor agreement 2018-03-22 19:29:22 +00:00
Calum Calder
c6a0c1cc38
Fix typo in documentation for displacy Visualizer
The word_spacing variable affects the vertical spacing between the words and arcs, not the horizontal spacing.
2018-03-22 19:23:32 +00:00
Ines Montani
c94139e436
Merge pull request #2126 from iann0036/patch-1
Add contributor doc
2018-03-22 09:04:17 +01:00
Ines Montani
40c444eaae
Merge pull request #2127 from SebastinSanty/docs-patch
Docs patch
2018-03-22 09:03:50 +01:00
Sebastin Santy
793d29904f
Update _similarity.jade 2018-03-22 03:51:38 +05:30
Ian Mckay
c33d6ca360
Add contributor doc 2018-03-22 09:04:58 +11:00
Sebastin Santy
720d2231f6
Update doc.jade 2018-03-22 03:13:23 +05:30
Matthew Honnibal
044397e269 Support .gz and .tar.gz files in spacy init-model 2018-03-21 14:33:23 +01:00
Ines Montani
15eb54fecc
Merge pull request #2123 from iann0036/master
drop should be a float
2018-03-21 13:43:06 +01:00
Ian Mckay
4fbd9897f4
drop should be a float 2018-03-21 23:16:56 +11:00
Matthew Honnibal
49fbe2dfee Use thinc.openblas in spacy.syntax.nn_parser 2018-03-20 02:22:09 +01:00
Ines Montani
d24190ee9b
Merge pull request #2116 from DuyguA/minor-enhancements
Minor enhancements
2018-03-19 16:32:37 +01:00
DuyguA
f708d7443b added contractions to stopwords #2020 2018-03-19 14:06:39 +01:00
DuyguA
ad598c66db added forgotten C for spaCy 2018-03-19 12:47:34 +01:00
Matthew Honnibal
bede11b67c
Improve label management in parser and NER (#2108)
This patch does a few smallish things that tighten up the training workflow a little, and allow memory use during training to be reduced by letting the GoldCorpus stream data properly.

Previously, the parser and entity recognizer read and saved labels as lists, with extra labels noted separately. Lists were used becaue ordering is very important, to ensure that the label-to-class mapping is stable.

We now manage labels as nested dictionaries, first keyed by the action, and then keyed by the label. Values are frequencies. The trick is, how do we save new labels? We need to make sure we iterate over these in the same order they're added. Otherwise, we'll get different class IDs, and the model's predictions won't make sense.

To allow stable sorting, we map the new labels to negative values. If we have two new labels, they'll be noted as having "frequency" -1 and -2. The next new label will then have "frequency" -3. When we sort by (frequency, label), we then get a stable sort.

Storing frequencies then allows us to make the next nice improvement. Previously we had to iterate over the whole training set, to pre-process it for the deprojectivisation. This led to storing the whole training set in memory. This was most of the required memory during training.

To prevent this, we now store the frequencies as we stream in the data, and deprojectivize as we go. Once we've built the frequencies, we can then apply a frequency cut-off when we decide how many classes to make.

Finally, to allow proper data streaming, we also have to have some way of shuffling the iterator. This is awkward if the training files have multiple documents in them. To solve this, the GoldCorpus class now writes the training data to disk in msgpack files, one per document. We can then shuffle the data by shuffling the paths.

This is a squash merge, as I made a lot of very small commits. Individual commit messages below.

* Simplify label management for TransitionSystem and its subclasses

* Fix serialization for new label handling format in parser

* Simplify and improve GoldCorpus class. Reduce memory use, write to temp dir

* Set actions in transition system

* Require thinc 6.11.1.dev4

* Fix error in parser init

* Add unicode declaration

* Fix unicode declaration

* Update textcat test

* Try to get model training on less memory

* Print json loc for now

* Try rapidjson to reduce memory use

* Remove rapidjson requirement

* Try rapidjson for reduced mem usage

* Handle None heads when projectivising

* Stream json docs

* Fix train script

* Handle projectivity in GoldParse

* Fix projectivity handling

* Add minibatch_by_words util from ud_train

* Minibatch by number of words in spacy.cli.train

* Move minibatch_by_words util to spacy.util

* Fix label handling

* More hacking at label management in parser

* Fix encoding in msgpack serialization in GoldParse

* Adjust batch sizes in parser training

* Fix minibatch_by_words

* Add merge_subtokens function to pipeline.pyx

* Register merge_subtokens factory

* Restore use of msgpack tmp directory

* Use minibatch-by-words in train

* Handle retokenization in scorer

* Change back-off approach for missing labels. Use 'dep' label

* Update NER for new label management

* Set NER tags for over-segmented words

* Fix label alignment in gold

* Fix label back-off for infrequent labels

* Fix int type in labels dict key

* Fix int type in labels dict key

* Update feature definition for 8 feature set

* Update ud-train script for new label stuff

* Fix json streamer

* Print the line number if conll eval fails

* Update children and sentence boundaries after deprojectivisation

* Export set_children_from_heads from doc.pxd

* Render parses during UD training

* Remove print statement

* Require thinc 6.11.1.dev6. Try adding wheel as install_requires

* Set different dev version, to flush pip cache

* Update thinc version

* Update GoldCorpus docs

* Remove print statements

* Fix formatting and links [ci skip]
2018-03-19 02:58:08 +01:00
Matthew Honnibal
13c060b90c Merge branch 'master' of https://github.com/explosion/spaCy 2018-03-19 02:04:45 +01:00
Matthew Honnibal
ff42b726c1 Fix unicode declaration on test 2018-03-19 02:04:24 +01:00
Ines Montani
affc43ef61
Merge pull request #2102 from doug-descombaz/patch-1 (resolves #2103)
Fix typo ditectory -> directory
2018-03-19 02:02:29 +01:00