Giter VIP home page Giter VIP logo

practnlptools's People

Contributors

biplab-iitb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

practnlptools's Issues

Problems in Windows with byte <-> str variable type conflict throwing errors

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.

Suppressing "WARNING: skipping a char (�)" in subprocess.Popen ?

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).

building dependency parse Tree

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

srl for large for text file

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

Add to pip

Could you please add this library to pip so it can be installed with pip?

Thanks!

SRL output

Code starts

import practnlptools.tools import Annotator
annotator= Annotator()
srl= annotator.getAnnotations("Mary is playing with john")

code ends

output

'srl': [{'A0': 'Marie', 'A1': 'with john', 'V': 'playing'}]

expected output

'srl': [{'A0': 'Marie', 'A1': 'john', 'V': 'playing'}]
can anything be done to make this possible?
Any insight will be immensely helpful.
Thankyou

screenshot from 2015-09-22 13 36 50

Can the tool be used in Chinese,please?

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 (

Python 3.5 installation error

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?

interpretation of the srl result

Dear,

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'}]

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.