docs: Change postags to parts_of_speech

* It seems that the docs use `spacy.postags` but the actual module that
  can be found in `spacy/` is `parts_of_speech`.

Signed-off-by: mr.Shu <mr@shu.io>
This commit is contained in:
mr.Shu 2015-01-25 18:01:43 +01:00
parent 006699eeb9
commit 48447d7355

View File

@ -184,7 +184,7 @@ adverbs to. Recall that our previous adverb highlighting function looked like
this: this:
>>> import spacy.en >>> import spacy.en
>>> from spacy.postags import ADVERB >>> from spacy.parts_of_speech import ADVERB
>>> # Load the pipeline, and call it with some text. >>> # Load the pipeline, and call it with some text.
>>> nlp = spacy.en.English() >>> nlp = spacy.en.English()
>>> tokens = nlp("Give it back, he pleaded abjectly, its mine.", >>> tokens = nlp("Give it back, he pleaded abjectly, its mine.",
@ -206,7 +206,7 @@ problematic, given our starting assumptions:
>>> from numpy import dot >>> from numpy import dot
>>> from numpy.linalg import norm >>> from numpy.linalg import norm
>>> import spacy.en >>> import spacy.en
>>> from spacy.postags import ADVERB, VERB >>> from spacy.parts_of_speech import ADVERB, VERB
>>> def is_bad_adverb(token, target_verb, tol): >>> def is_bad_adverb(token, target_verb, tol):
... if token.pos != ADVERB ... if token.pos != ADVERB
... return False ... return False