Commit Graph

139 Commits

Author SHA1 Message Date
ines
95063ba26b Update tests documentation (resolves #1781) 2018-01-03 16:42:26 +01:00
Martin Andrews
e4355dade2
Documentation example fix : token.head needs '==' rather than 'is'
(similar change to #1689, it seems).
2017-12-18 18:12:10 +08:00
mpuels
b3df2a2ffd
doc: Fix minor mistakes 2017-12-14 20:55:59 +01:00
mpuels
3f7bedadee
doc: Fix minor mistakes 2017-12-13 11:37:24 +01:00
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
7ade336ab7 Add "Unknown locale" issue to troubleshooting guide (see #1684, #1641, #1517) 2017-12-05 13:17:55 +01: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
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
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
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
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
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