Practical Natural Language Processing Tools for Humans. Dependency Parsing, Syntactic Constituent Parsing, Semantic Role Labeling, Named Entity Recognisation, Shallow chunking, Part of Speech Tagging, all in Python.
Hello I'm trying to install practnlptools on Windows I get 'practnlptools\hash\depParse.sh': doesn't exist or not a regular file, as far I can see depParse.sh is inside practnlptools folder?
Has anyone got this to work in Windows?
I'm having this problem:
from practNLPTools.tools import Annotator
annotator = Annotator()
sent = 'The rain in Spain stays mainly on the plain'
annotator.getAnnotations(sent)['srl']
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\super\AppData\Local\Programs\Python\Python35-32\lib\site-packages\practNLPTools\tools.py", line 208, in getAnnotations
no_verbs=len(senna_tags[0].split("\t"))-6
TypeError: a bytes-like object is required, not 'str'
Now even when I use ".encode" or "bytes()" around the string objects in line 208, it still throws the same error at me.
Is there a way to suppress the Warning messages being output to the Console when pipe = subprocess.Popen(args, stdout=subprocess.PIPE, stdin=subprocess.PIPE, shell=True) is being called to collect the output in senna_stdout?
As I understand this is not easily done (see Question posted here).
Dear sir,
thank you for this great effort
Is there any method, or library to build dependency parse tree from practNLPTools generated output?
I am using ete3 toolkit to convert the dep parse into a tree, I need some automatic tool,
thanks
I have been trying to use SRL for a large text file containing many sentences. I am getting the following error:
Traceback (most recent call last):
File "C:\Users\anithachacko\Downloads\main_pjt_code1.py", line 370, in
tagged=StringIO(annotator.getAnnotations(string1)['srl'])
File "C:\Python27\lib\site-packages\practnlptools\tools.py", line 219, in getAnnotations
pos+=[senna_tag[1].strip()]
IndexError: list index out of range
I tried the tool in Chinese, the output likes that, Is there something wrong with me?
WARNING: skipping a char (
WARNING: skipping a char ()
WARNING: skipping a char (
WARNING: skipping a char (º)
.
.
.
WARNING: skipping a char ()
WARNING: skipping a char (
I have been trying to install it under Python 3.5 and it doesn't seem to run since it throws the following errors:
Sorry: TabError: inconsistent use of tabs and spaces in indentation (tools.py, line 53)
running install_data
error: can't copy 'practnlptools/data/SENNA_PT0.h': doesn't exist or not a regular file
I fixed the tab indentation in tools.py but more problems come through. Has this project been abandoned at all?
I have been using the tool for semantic role labelling, but I haven't been able to understand the result of the semantic role labelling. Can someone please guide me.
Text:
RT @WBBMNewsradio: Gov. Rauner Sends National Guard To Southern Illinois In Response To Flooding - Full Story:
Result
[{'A1': 'National Guard', 'A0': 'Gov. Rauner', 'A2': 'To Southern Illinois', 'AM-PNC': 'In Response To Flooding - Full Story', 'V': 'Sends'}]