Affected tutorial that no longer is accurate: http://spacy.io/tutorials/mark-adverbs/
I see you have patched the vectors behaviour just now, so I assume you're on the way to fixing this...but it's broken in your 0.90 release completely. There is no more has_repvec property either. Reading the source for clues, I am also unable to get token.similarity() or Lexeme.similarity() to function, an error is returned saying that Tokens/Lexemes do not have a similarity method/attribute.
Because I still cannot compile from source on Debian Jessie (see issue #92, I'm dead in the water unless I revert to v0.89.
Thanks, I've just pushed a fix to this, and updated the docs. Try:
pip install --upgrade spacy
Which should update to v0.92.
Tutorial still broken with v0.92 on this step:
>>> from numpy import dot
>>> from numpy.linalg import norm
>>> cosine = lambda v1, v2: dot(v1, v2) / (norm(v1) * norm(v2))
>>> words = [w for w in nlp.vocab if w.has_vector]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'spacy.lexeme.Lexeme' object has no attribute 'has_vector'
Out of curiosity, would you be willing to place git tags on this repo so we know the exact commits that are included in a particular pip release? I see your commit for has_vector but it seemingly isn't in the 0.92 release.
Definitely agree that I need some process improvements here. The specific problem here was that the v0.92 release shipped with old .cpp, that weren't based on the most recent .pyx source. I was also missing a test for that attribute, which I've now added.
I've updated the my "publish" command in my Fabric file, so that it creates and pushes an annotated tag for each release. The source is here: https://github.com/honnibal/spaCy/blob/master/fabfile.py#L64
If you're not used to Fabric, basically it's just a way to run shell commands with Python-like syntax. The equivalent shell commands are something like:
git push origin master
git tag -a $VERSION
git push origin $VERSION
python setup.py sdist
python setup.py register
twine upload dist/$VERSION.tar.gz
Does this look right to you?
Looks like the right set of commands. When should I expect an 0.93, or did you slipstream a revised 0.92 version to the cheese shop?
I'm working on the Debian install issue, to see if I need to modify setup.py to fix it.
I think I've got it figured out.
Hey guys
Im still getting the error
object has no attribute 'has_repvec'
Any ideas?
Getting this error as well: AttributeError: 'spacy.lexeme.Lexeme' object has no attribute 'has_repvec'
Running the latest version from pip as of today (9/4/16) - spacy v 0.101.0
Looking into it now to see if I can patch it and open a PR.
I think this can be fixed by updating has_repvec to has_vector and repvec to vector.
Apologies鈥擨 just saw that has_vector, above, doesn't fix the issue (due to the old .cpp file shipping with v0.92). My mistake!
@ericqweinstein - It actually helps, thanks! :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I think this can be fixed by updating
has_repvectohas_vectorandrepvectovector.