mirror of https://github.com/explosion/spaCy.git
Update docs [ci skip]
This commit is contained in:
parent
8ef056cf98
commit
363ac73c72
|
@ -109,12 +109,12 @@ Loading the models is expensive and not necessary if you're not actually testing
|
|||
|
||||
```python
|
||||
def test_doc_token_api_strings(en_vocab):
|
||||
text = "Give it back! He pleaded."
|
||||
words = ["Give", "it", "back", "!", "He", "pleaded", "."]
|
||||
pos = ['VERB', 'PRON', 'PART', 'PUNCT', 'PRON', 'VERB', 'PUNCT']
|
||||
heads = [0, 0, 0, 0, 5, 5, 5]
|
||||
deps = ['ROOT', 'dobj', 'prt', 'punct', 'nsubj', 'ROOT', 'punct']
|
||||
|
||||
doc = Doc(en_vocab, [t.text for t in tokens], pos=pos, heads=heads, deps=deps)
|
||||
doc = Doc(en_vocab, words=words, pos=pos, heads=heads, deps=deps)
|
||||
assert doc[0].text == 'Give'
|
||||
assert doc[0].lower_ == 'give'
|
||||
assert doc[0].pos_ == 'VERB'
|
||||
|
|
|
@ -786,15 +786,13 @@ doesn't, the pipeline analysis won't catch that.
|
|||
### Pretty
|
||||
============================= Pipeline Overview =============================
|
||||
|
||||
# Component Assigns Requires Scores Retokenizes
|
||||
- ------------- --------------- -------------- --------- -----------
|
||||
0 tagger token.tag tag_acc False
|
||||
pos_acc
|
||||
lemma_acc
|
||||
# Component Assigns Requires Scores Retokenizes
|
||||
- ------------- --------------- -------------- ----------- -----------
|
||||
0 tagger token.tag tag_acc False
|
||||
|
||||
1 entity_linker token.ent_kb_id doc.ents False
|
||||
doc.sents
|
||||
token.ent_iob
|
||||
1 entity_linker token.ent_kb_id doc.ents nel_micro_f False
|
||||
doc.sents nel_micro_r
|
||||
token.ent_iob nel_micro_p
|
||||
token.ent_type
|
||||
|
||||
|
||||
|
|
|
@ -54,9 +54,9 @@ create a surface form. Here are some examples:
|
|||
| I don't watch the news, I read the paper | read | read | `VERB` | `VerbForm=Fin`, `Mood=Ind`, `Tense=Pres` |
|
||||
| I read the paper yesterday | read | read | `VERB` | `VerbForm=Fin`, `Mood=Ind`, `Tense=Past` |
|
||||
|
||||
Morphological features are stored in the [`MorphAnalysis`](/api/morphanalysis)
|
||||
under `Token.morph`, which allows you to access individual morphological
|
||||
features.
|
||||
Morphological features are stored in the
|
||||
[`MorphAnalysis`](/api/morphology#morphanalysis) under `Token.morph`, which
|
||||
allows you to access individual morphological features.
|
||||
|
||||
> #### 📝 Things to try
|
||||
>
|
||||
|
|
|
@ -487,15 +487,13 @@ analysis = nlp.analyze_pipes(pretty=True)
|
|||
### Pretty
|
||||
============================= Pipeline Overview =============================
|
||||
|
||||
# Component Assigns Requires Scores Retokenizes
|
||||
- ------------- --------------- -------------- --------- -----------
|
||||
0 tagger token.tag tag_acc False
|
||||
pos_acc
|
||||
lemma_acc
|
||||
# Component Assigns Requires Scores Retokenizes
|
||||
- ------------- --------------- -------------- ----------- -----------
|
||||
0 tagger token.tag tag_acc False
|
||||
|
||||
1 entity_linker token.ent_kb_id doc.ents False
|
||||
doc.sents
|
||||
token.ent_iob
|
||||
1 entity_linker token.ent_kb_id doc.ents nel_micro_f False
|
||||
doc.sents nel_micro_r
|
||||
token.ent_iob nel_micro_p
|
||||
token.ent_type
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue