-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install error on negspacy (pip install) #1
Comments
Hi, thank you for raising this issue. Please try installing again and let me know if you continue to get the issue.
I think I fixed the windows decoding issue. |
Replicated the issue on azure and had no issue when installing the new version. Let me know if you're still having the problem. Thanks! |
Thank Jeno for fixing the issue with negspacy install. I was able to install negspacy and import the packages. Ran: doc = nlp("Client is not affiliated to Soverign citizen.") Could you please check and explain why the negation detection is failing with some texts which is very close to how the successful ones are written? Is there a NER dictionary that is being being used behind the seen to identify Org entities? |
Oh good! I'm glad that issue is resolved. Yes - You're using the built in spaCy NER in the backend. If you have a specific dictionary of entities you'd like to process, I would suggest using the EntityRuler in spaCy. Just make sure it's added "ahead" of the negation component in the processing pipeline. This way you could make your own new entities or add patterns to existing ones. import spacy
from spacy.pipeline import EntityRuler
from negspacy.negation import Negex
nlp = spacy.load("en_core_web_sm")
ruler = EntityRuler(nlp)
patterns = [{"label": "MYENT", "pattern": [{"LOWER": "sovereign"}, {"LOWER": "citizen"}]}]
# add others in patterns list
ruler.add_patterns(patterns)
nlp.add_pipe(ruler)
negex = Negex(nlp)
nlp.add_pipe(negex, last=True)
doc = nlp("Client is not affiliated to sovereign citizen.")
for e in doc.ents:
print(e.text, e._.negex) |
Thank you! Looking forward to enhancements on this. Great work with this package! |
Describe the bug
Getting the below error with pip install negspacy command in Anacondo Prompt.
To Reproduce
Steps to reproduce the behavior:
Run Anaconda Prompt as Administrator
type - pip install negspacy and enter
Expected behavior
negspacy package gets install and should be present in C:\ProgramData\Anaconda3\Lib\site-packages
Screenshots
(base) C:\WINDOWS\system32>pip install C:\negspacy-0.1.0a0.tar.gz
Processing c:\negspacy-0.1.0a0.tar.gz
ERROR: Command errored out with exit status 1:
command: 'c:\programdata\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\xx\AppData\Local\Temp\pip-req-build-4b2hz8em\setup.py'"'"'; file='"'"'C:\Users\xx\AppData\Local\Temp\pip-req-build-4b2hz8em\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: C:\Users\xxAppData\Local\Temp\pip-req-build-4b2hz8em
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\xx\AppData\Local\Temp\pip-req-build-4b2hz8em\setup.py", line 10, in
long_description=open("README.md").read(),
File "c:\programdata\anaconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 274: character maps to
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: