mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
* Docs edit
This commit is contained in:
parent
3096b0e0f1
commit
af88a70a25
|
@ -206,7 +206,7 @@ problematic, given our starting assumptions:
|
||||||
>>> from spacy.parts_of_speech import ADV, VERB
|
>>> from spacy.parts_of_speech import ADV, VERB
|
||||||
>>> cosine = lambda v1, v2: dot(v1, v2) / (norm(v1), norm(v2))
|
>>> cosine = lambda v1, v2: dot(v1, v2) / (norm(v1), norm(v2))
|
||||||
>>> def is_bad_adverb(token, target_verb, tol):
|
>>> def is_bad_adverb(token, target_verb, tol):
|
||||||
... if token.pos != ADVERB
|
... if token.pos != ADV
|
||||||
... return False
|
... return False
|
||||||
... elif toke.head.pos != VERB:
|
... elif toke.head.pos != VERB:
|
||||||
... return False
|
... return False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user