4 ms·
Autocompletion isn't a standard feature of any major NLP library, and blaming it on Python (currently the most popular language for NLP) isn't a good argument.
by The_rationalist 6y ago
Autocompletion isn't a standard feature of any major NLP library, and blaming it on Python (currently the most popular language for NLP) isn't a good argument.
I install a package (spacy)
I don't get any autocompletion of the API from the main spacy object and any other subsequent spacy data structure.
Indeed autocompletion is usually on the language side but here it's a combination of the weaknesses of python and of the lazyness of spacy developers by making everything dynamic they broke the autocompletion that is normally working in python.
Therefore it's not production ready, what else is there to say?
I tried both pycharm and vscode
- syllogism 6y ago> lazyness of spacy developers by making everything dynamic they broke the autocompletion that is normally working in python. Actually it's the opposite of "making everything dynamic". spaCy is mostly implemented in Cython, which is a language for writing C extensions for Python. So things are statically typed and memory managed, which sometimes doesn't work well with inspect. We set whatever compilation flags we can to make the annotations passed through though. It's definitely not a question of laziness though...You could say we worked extremely hard to break things in this particular way. In v3 we've been able to finally ditch Python 2 support, which means we're able to embrace type annotations. Our machine learning library, https://thinc.ai https://thinc.ai, is extensively type-annotated and actually you can get type hints and type errors for composing layers incorrectly. Personally I use vim and don't use autocompletion, I find it makes the typing laggy and I've just never really wanted it. We do have developers on the team who use autocompletion though and I think spaCy actually supports it better than you suggest, I'm not sure whether you had a specific problem, but maybe see whether it works if you install spacy-nightly. Btw I do think you've come across as a weird jerk in this thread though? You might want to read over your messages and think about that. Like, I (and I think most others) genuinely didn't get what you meant in your first few messages; I thought you were saying spaCy didn't let you _build_ autocomplete.
- wokwokwok 6y agofwiw, I love spacy but the autocomplete has never work for me in pycharm either. Many autocomplete implementations seem to struggle with anything that isn’t “pure python”; pyspark is notorious for it too. ...but, the type annotations do work! That’s definitely the right way to fix it. Can’t wait~
- nl 6y agoI mentioned this elsewhere in thread, but here is an image of it working with VS.Code: https://imgur.com/a/9bcgPkz https://imgur.com/a/9bcgPkz