mpuels
e3af19a076
doc: Replace 'is not' with '!=' in code example
...
The function `dependency_labels_to_root(token)` defined in section *Get syntactic dependencies* does not terminate. Here is a complete example:
import spacy
nlp = spacy.load('en')
doc = nlp("Apple and banana are similar. Pasta and hippo aren't.")
def dependency_labels_to_root(token):
"""Walk up the syntactic tree, collecting the arc labels."""
dep_labels = []
while token.head is not token:
dep_labels.append(token.dep)
token = token.head
return dep_labels
dep_labels = dependency_labels_to_root(doc[1])
dep_labels
Replacing `is not` with `!=` solves the issue:
import spacy
nlp = spacy.load('en')
doc = nlp("Apple and banana are similar. Pasta and hippo aren't.")
def dependency_labels_to_root(token):
"""Walk up the syntactic tree, collecting the arc labels."""
dep_labels = []
while token.head != token:
dep_labels.append(token.dep)
token = token.head
return dep_labels
dep_labels = dependency_labels_to_root(doc[1])
dep_labels
The output is
['cc', 'nsubj']
2017-12-06 20:08:42 +01:00
mpuels
82e575ebfb
doc: Fix assert statement in Lightning Tour
...
Python 3 throws an error message on the original assert statement. Also, according to the Python documentation regarding the assert statement (https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement ), `assert` takes at least one argument and at most two. In the two-argument form the second argument is meant as an error message to be displayed when the assertion fails. I don't think this is intended in this case.
2017-12-06 16:40:51 +01:00
mpuels
662601f01c
doc: Add missing *-operator to nlp.disable_pipes()
...
I'm using SpaCy version 2.0.3. If I don't use the *-operator in the example, Python throws an error message. With the operator it works fine. Also according to the documentation of the function `nlp.disable_pipes()`, it expects one or more strings as arguments and not one argument being a list of strings.
2017-12-06 15:26:43 +01:00
ines
b078e276e6
Document offsets_from_biluo_tags
2017-12-06 13:40:51 +01:00
ines
fb663f9b7d
Add Russian to list of languages
2017-12-06 13:40:32 +01:00
ines
58a19518cf
Merge branch 'master' of https://github.com/explosion/spaCy
2017-12-05 13:17:58 +01:00
ines
7ade336ab7
Add "Unknown locale" issue to troubleshooting guide (see #1684 , #1641 , #1517 )
2017-12-05 13:17:55 +01:00
Mark Dodwell
9d4c185860
Fix link to CLEAR Style dependency labels PDF
2017-12-04 23:28:06 -08:00
ines
40638b7cdf
Update resources
2017-12-02 04:16:03 +01:00
ines
9ea8a7cf0c
Add spacy_cld to extensions
2017-12-01 23:21:33 +01:00
ines
8d3f29322f
Add spacy_hunspell to resources (see #315 )
2017-11-29 09:33:22 +01:00
atomobianco
f6a82da907
Corrected char index instead of token index
...
Changed the index used to add the label because `displacy.render` apparently uses char index
2017-11-26 23:55:25 +01:00
ines
bda6e2a816
Add training example to lightning tour
2017-11-26 18:04:18 +01:00
ines
89f8b1fba0
Update example documents
2017-11-26 18:04:04 +01:00
ines
65d66b81f1
Fix typo
2017-11-26 18:03:44 +01:00
ines
e4ee666be5
Fix biluo_tags_from_offsets example and docs
2017-11-26 16:37:32 +01:00
ines
434030e0d0
Fix requirements.txt example (see #1638 )
2017-11-26 15:53:19 +01:00
Matthew Honnibal
6bc9917a0e
Another small fix to component docs
2017-11-23 11:47:20 +01:00
markulrich
c9b63c0dfc
Use correct local parameter in example MyComponent (and added markulrich.md contributor file)
2017-11-22 15:59:08 -08:00
ines
4f7e64e371
Update resources
2017-11-18 02:53:00 +01:00
ines
c3051e95f7
Add note on attribute extension defaults ( resolves #1587 )
2017-11-17 19:14:29 +01:00
ines
954f8cc6d1
Update syntax theme (should move the modifications out to an extension sometime)
2017-11-17 19:13:53 +01:00
Raphaël Bournhonesque
a0793fd4cc
Fix typo
2017-11-17 17:57:55 +01:00
Martino Mensio
ce1aade41e
small typo on docs
2017-11-17 16:20:22 +01:00
pavillet
ad2935f0c3
Update _spacy.jade
...
Doc example gives 'object is not subscriptable' error.
Correcting as an attribuet
2017-11-17 00:02:20 +01:00
ines
40c4e8fc09
Remove "optional" from dev_data arg and add more info (see #1578 )
2017-11-14 20:26:05 +01:00
KMLDS
d5b20ac3b6
Update span.jade
2017-11-13 19:27:20 -05:00
ines
bc79274706
Fix typo
2017-11-13 17:00:03 +01:00
ines
7a7b01feb1
Update links
2017-11-13 08:30:06 +01:00
ines
b3e502a076
Add videos section to resources
2017-11-13 08:29:57 +01:00
ines
f2b6b98b75
Fix typo in code example ( resolves #1556 )
2017-11-13 08:29:16 +01:00
ines
ceb2c596f1
Update conda details
2017-11-11 13:07:00 +01:00
ines
4a97def06a
Update features
2017-11-10 19:05:10 +01:00
ines
dea5636d6c
Fix broken links
2017-11-10 13:06:38 +01:00
Wahib Faizi
0da56f8ef8
Fix typo. Add missing '='.
2017-11-10 14:51:24 +03:00
ines
4c5d2c80d5
Re-add python -m to commands, too brittle :( (see #1536 )
2017-11-10 02:30:55 +01:00
ines
ee5697a1cd
Fix training tips
2017-11-10 00:19:42 +01:00
ines
6ae0ebfa3a
Update training tips
2017-11-10 00:17:10 +01:00
ines
b20779bac4
Update resources
2017-11-09 23:05:37 +01:00
ines
ed84688935
Remove old link
2017-11-09 15:34:12 +01:00
Ines Montani
e5b9ccdb5c
Merge pull request #1526 from mcsalgado/fix-typos
...
fix typos
2017-11-09 15:33:55 +01:00
Victor Salgado
fe1d969d5f
fix typos
2017-11-09 10:55:13 -02:00
Mathias Deschamps
25b26f0d64
Fix similarity visual
...
Doc was showing similarity when dissimilar
2017-11-09 11:08:26 +01:00
ines
98767122a7
Fix typos
2017-11-09 04:13:03 +01:00
ines
e87eb11beb
Update package.json
2017-11-09 04:12:57 +01:00
ines
33b84f4c39
Change clear_vectors to reset_vectors ( resolves #1516 )
2017-11-08 18:11:23 +01:00
ines
97a5892347
Document Vectors.resize() and update v2 incompatibilities ( resolves #1514 )
2017-11-08 17:11:11 +01:00
ines
c0a7a32bf8
Add en.stop_words change to v2 docs ( resolves #1512 )
2017-11-08 16:30:46 +01:00
ines
9b09b6b0cd
Fix formatting
2017-11-08 16:30:23 +01:00
ines
f0bdfb4471
Fix vector listing for core sm models in list overview (see #1513 )
2017-11-08 16:24:27 +01:00
ines
94cd3d51db
Update v2 docs and model info
...
Take out speed tables until we fix our benchmark tests on CPU and GPU
2017-11-08 11:43:00 +01:00
ines
14f97cfd20
Add note on stream processing to migration guide (see #1508 )
2017-11-08 01:53:36 +01:00
ines
5d1162cf21
Improve nlp.update / training loop overview (see #1507 )
2017-11-08 01:17:42 +01:00
ines
2229aba71c
Update website
2017-11-08 01:06:30 +01:00
ines
1768703e1c
Update website for v2.0
2017-11-07 14:48:17 +01:00
ines
e4a05385d6
Update docs
2017-11-07 12:33:43 +01:00
ines
a4662a31a9
Move model package templates to cli.package and update docs
2017-11-07 12:15:35 +01:00
ines
a09c096d3c
Get docs ready for v2.0.0
2017-11-07 12:00:43 +01:00
ines
173b1551af
Update examples
2017-11-07 01:22:30 +01:00
ines
c37837cad1
Update training docs
2017-11-07 01:06:31 +01:00
ines
c7bda87b17
Update model docs and add tips section
2017-11-07 01:05:37 +01:00
ines
a1261e8632
Fix formatting
2017-11-07 01:05:30 +01:00
ines
912c1b1821
Document "simple training style"
2017-11-07 00:23:19 +01:00
ines
ad6438ccdf
Update aside labels and under construction mixin
2017-11-07 00:23:00 +01:00
ines
8fb48b9b91
Update and document new util functions
2017-11-07 00:22:43 +01:00
ines
6447b8e396
Update v2 details
2017-11-06 21:15:36 +01:00
ines
008d7408cf
Make vectors vs. tensors more explicit in 101 (see #1498 )
2017-11-06 20:16:38 +01:00
ines
71852d3f25
Fix code mixins
2017-11-06 20:16:19 +01:00
ines
3b0699c9fe
Update benchmarks and data table style
2017-11-06 19:36:02 +01:00
ines
ddff7dc474
Update GPU install docs
2017-11-06 19:35:36 +01:00
ines
64d0f97c67
Update benchmarks and models
2017-11-06 18:19:00 +01:00
Matthew Honnibal
6fdffd7246
Merge pull request #1497 from explosion/feature/improve-optimizer-handling
...
💫 Improve optimizer handling
2017-11-06 16:41:15 +01:00
ines
972298e0c9
Update Pipe component docs and training API
2017-11-06 14:42:24 +01:00
ines
f48e1973ed
Fix accuracy table descriptions
2017-11-06 14:12:11 +01:00
ines
2d85ee6b5d
Fix broken link
2017-11-06 13:27:30 +01:00
ines
efb0a7e934
Fix broken links
2017-11-06 13:20:36 +01:00
ines
42a99eae02
Update troubleshooting guide
2017-11-06 13:17:09 +01:00
ines
2dca9e71a1
Add notes on catastrophic forgetting (see #1496 )
2017-11-06 13:17:02 +01:00
ines
e68d31bffa
Update models quickstart usage example
2017-11-06 13:06:26 +01:00
ines
2fe2c4942f
Update models directory and listing
2017-11-06 13:04:29 +01:00
ines
df1bdc7173
Add Dutch model
2017-11-06 02:44:59 +01:00
ines
333bef482f
Update pattern for Prism.js Python
2017-11-06 02:44:24 +01:00
ines
6b08aefd0c
Update formatting and styleguide
2017-11-05 23:31:31 +01:00
ines
e61a067c4b
Update v2 docs
2017-11-05 21:41:56 +01:00
ines
86d6bd7503
Fix wording
2017-11-05 19:23:50 +01:00
ines
6742657c4d
Fix website asset versioning
2017-11-05 19:23:45 +01:00
ines
2ca82d1f6e
Take out pt_core_news_sm for now
2017-11-05 18:57:04 +01:00
ines
a6ffa942bb
Update UD schemes
2017-11-05 18:46:24 +01:00
ines
3fa8900a6b
Don't include tag and label schemes in usage guide
2017-11-05 18:21:49 +01:00
ines
4810be4b44
Update POS scheme docs and add links for other schemes
2017-11-05 18:16:34 +01:00
ines
e7d0641125
Update POS row mixins
2017-11-05 18:16:16 +01:00
ines
15de2bb01d
Update and simplify other annotation scheme data
2017-11-05 16:09:48 +01:00
ines
2d59dd374b
Use collapsible sections for pos/dep scheme and update
...
Will ensure better overview as we add more schemes for more languages
2017-11-05 16:09:30 +01:00
ines
a9c77e01b4
Add accordion component (collapsible section)
2017-11-05 16:08:13 +01:00
ines
3d4dff1845
Remove comment
2017-11-05 16:07:14 +01:00
ines
b53c2010db
Add global focus style for links
2017-11-05 16:07:00 +01:00
ines
f092506578
Use hidden attribute instead of style.display
2017-11-05 16:06:50 +01:00
ines
0e8157674a
Add Portuguese and French
2017-11-04 23:07:21 +01:00
ines
d9fa3c6054
Update adding languages example
2017-11-04 15:12:39 +01:00
ines
c83fe54f0c
Update venv docs in installation instructions
2017-11-04 14:27:55 +01:00
ines
2940938bd8
Use more distinct style for checkboxes in quickstart
2017-11-04 14:24:30 +01:00
ines
4793d56a3e
Update commands for building from source
2017-11-04 14:24:14 +01:00
ines
177bf4ee39
Update GitHub topic links
2017-11-04 14:02:28 +01:00
ines
2639ecd5f8
Add docs note on custom tokenizer rules (see #1491 )
2017-11-03 23:33:18 +01:00
ines
380f2441b4
Fix script includes
2017-11-03 18:51:03 +01:00
Abhinav Sharma
c740277f9f
Minor typo [ nad => and ]
2017-11-03 16:30:44 +05:30
ines
1e16374687
Update models list to reflect spaCy v2.0.0a18
2017-11-03 11:29:34 +01:00
ines
a62b0727d8
Tidy up and always use bundle in built site for now
...
Just to be safe
2017-11-03 11:29:21 +01:00
ines
d0f88af5b6
Hide error earlier
2017-11-03 11:29:04 +01:00
ines
43512c68b2
Fix vector details in model overview
2017-11-02 20:04:13 +01:00
ines
9baab241b4
Add skeleton language data for Turkish
2017-11-02 16:32:24 +01:00
ines
31e349a62c
Update model families
2017-11-02 16:13:38 +01:00
ines
15cbc61a6e
Adjust rendering of large numbers
...
1234 -> 1.2k
12345 -> 12.3k
123456 -> 123k
1234567 -> 1.2m
2017-11-02 16:13:18 +01:00
ines
391fce09d9
Update licenses
2017-11-01 23:04:40 +01:00
ines
c6fea3e5f6
Add Romanian and Croatian skeletons (experimental)
...
Add language data templates to make it easier for others to contribute to the language support
2017-11-01 23:04:28 +01:00
ines
408f450ce0
Tidy up
2017-11-01 23:01:12 +01:00
ines
2fa53b39d5
Add dev dependency
2017-11-01 23:01:06 +01:00
ines
1976fb157f
Update licenses
2017-11-01 21:49:57 +01:00
ines
2ba4e4fc88
Fix broken links and add check_links shortcut script
2017-11-01 21:11:10 +01:00
ines
e5a4c31bb4
Adjust code line height
2017-11-01 19:49:42 +01:00
ines
5dd0d6a383
Update lightning tour
2017-11-01 19:49:36 +01:00
ines
9b4c38fe9f
Add button option to terminal component
2017-11-01 19:49:27 +01:00
ines
12954ab218
Don't document the tensorizer for now
2017-11-01 19:49:04 +01:00
ines
a7a76ea8c5
Update backwards incompatibilities
...
Also add separate section for deprecated
2017-11-01 16:31:57 +01:00
ines
4f77bb8476
Fix error handling
2017-11-01 16:29:55 +01:00
ines
5ab4e96144
Update v2 guide and split into partials
2017-11-01 14:13:36 +01:00
ines
1c7313051f
Document Token.is_sent_start
2017-11-01 14:13:22 +01:00
ines
9e429b5a8a
Update formatting of deprecation note
2017-11-01 14:13:08 +01:00
ines
0fbab8160d
Update GloVe vectors example
2017-11-01 13:14:43 +01:00
ines
a6f6bd6c98
Adjust tag spacing
2017-11-01 02:04:00 +01:00
ines
f84660986a
Update example sentences for models quickstart
2017-11-01 01:57:33 +01:00
ines
3b7ec64caa
Add PYTHONPATH to build from source quickstart
2017-11-01 01:52:45 +01:00
ines
092333afd4
Update vector details and number conversion
2017-11-01 01:47:31 +01:00
ines
5fd851a80b
Log errors
2017-11-01 01:46:50 +01:00
ines
07d02c3304
Update vectors and similarity usage guide
2017-11-01 01:25:17 +01:00
ines
0d8f4a534b
Update Vectors API docs
2017-11-01 00:56:54 +01:00
ines
9eb998443f
Update language tokenizer dependencies
2017-11-01 00:56:35 +01:00
ines
0cde065ed9
Add Irish to list of languages (see #1152 )
2017-11-01 00:56:21 +01:00
Ines Montani
3c8db3e4da
Merge pull request #1473 from explosion/refactor-javascript
...
Refactor website JS and add model comparison tool
2017-10-31 14:02:05 +01:00
ines
be5b635388
Remove "needs model" and add info about models (see #1471 )
2017-10-31 13:37:55 +01:00
ines
5af6c8b746
Update training docs
2017-10-30 20:28:00 +01:00
ines
8ad4f3f6e5
Take out JSON format include in tagger/parser
2017-10-30 19:48:35 +01:00
ines
33af6ac69a
Use even smaller examle size
...
100 was still too much, so try 20 instead
2017-10-30 19:46:45 +01:00
ines
f02b0af821
Fix path and use smaller example size
...
500 was too larger and caused laggy rendering
2017-10-30 19:44:35 +01:00
ines
18dde7869a
Update training data docs and add vocab JSONL
2017-10-30 19:40:05 +01:00
ines
57534253e6
Move CLI docs to own page
2017-10-30 19:39:26 +01:00
ines
ec657c1ddc
Update vocab docs and document Vocab.prune_vectors
2017-10-30 19:35:41 +01:00
ines
12343e23fd
Update CLI docs and document vocab command
2017-10-30 18:59:08 +01:00
ines
5598542055
Add link
2017-10-30 18:58:55 +01:00
ines
abf8aa05d3
Populate --create-meta defaults from file if available
...
If meta.json is found in directory and user chooses to overwrite it, show existing data as defaults.
2017-10-30 18:39:38 +01:00