Merge pull request #3 from mrshu/mrshu/docs-cosine-fix

docs: Added missing cosine declaration
This commit is contained in:
honnibal 2015-01-26 04:52:40 +11:00
commit 5ef7485749
1 changed files with 1 additions and 0 deletions

View File

@ -207,6 +207,7 @@ problematic, given our starting assumptions:
>>> from numpy.linalg import norm
>>> import spacy.en
>>> from spacy.postags import ADVERB, VERB
>>> cosine = lambda v1, v2: dot(v1, v2) / (norm(v1), norm(v2))
>>> def is_bad_adverb(token, target_verb, tol):
... if token.pos != ADVERB
... return False