diff --git a/README.md b/README.md index cde8c31..20a00dd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# corenlp_pywrap 1.0.4 +# corenlp_pywrap 1.0.5 ######Powerfull python wrapper for Stanford CoreNLP project -[![GitHub release](https://img.shields.io/badge/release-1.0.4-green.svg?maxAge=2592000)](https://github.com/hhsecond/corenlp_pywrap/releases) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/hhsecond/corenlp_pywrap/blob/master/LICENCE.txt) [![PyPI](https://img.shields.io/pypi/wheel/Django.svg?maxAge=2592000)](https://pypi.python.org/pypi/corenlp_pywrap) +[![GitHub release](https://img.shields.io/badge/release-1.0.5-green.svg?maxAge=2592000)](https://github.com/hhsecond/corenlp_pywrap/releases) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/hhsecond/corenlp_pywrap/blob/master/LICENCE.txt) [![PyPI](https://img.shields.io/pypi/wheel/Django.svg?maxAge=2592000)](https://pypi.python.org/pypi/corenlp_pywrap) ##CoreNLP v3.6.0 diff --git a/corenlp_pywrap/example.py b/corenlp_pywrap/example.py index debd06e..a55136c 100644 --- a/corenlp_pywrap/example.py +++ b/corenlp_pywrap/example.py @@ -1,8 +1,8 @@ import pywrap as p import logging -p.root.setLevel(logging.WARNING) +p.root.setLevel(logging.DEBUG) cn = p.CoreNLP() -sent = '''Well, that is it then. Zimbabwe have thrashed Afghanistan for 1.0 and FOUR runs''' +sent = ''' .cb-list-heading{font-weight:normal!important} MOBILE SITE & APPSm.cricbuzz.comAndroidiOSWindows MobileBlackberryChrome ExtensionFOLLOW US ONfacebooktwittergoogle+PinterestRSS FeedCOMPANYCareersAdvertisePrivacy PolicyTerms of UseCricbuzz TV AdsĀ© 2016 Cricbuzz.com, Times Internet Limited. All rights reserved | The Times of India | Navbharat Timesvar script_tag = document.getElementsByTagName('script')[0]; (function() { var cmin = document.createElement('script'); cmin.type = 'text/javascript'; cmin.async = true; cmin.src = 'http://i.cricketcb.com/statics/site/js/cricbuzz.min.1466404921.js'; script_tag.parentNode.insertBefore(cmin, script_tag); })();(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PGNCT7'); 0''' r = cn.arrange(sent) print(len(r['index'])) print(len(r['word'])) diff --git a/corenlp_pywrap/pywrap.py b/corenlp_pywrap/pywrap.py index c7ea248..e92f04b 100644 --- a/corenlp_pywrap/pywrap.py +++ b/corenlp_pywrap/pywrap.py @@ -128,7 +128,7 @@ def process_sentences(sentences): #workaround to handle length inconsistancie with normalizedNER, rethink the logic if 'ner' in val.keys() and 'normalizedNER' not in val.keys(): - token_dict['normalizedNER'].append('') + token_dict['normalizedNER'].append(0) for key, val in val.items(): if key == 'index': diff --git a/setup.py b/setup.py index 33d2677..45f0198 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name = "corenlp_pywrap", - version = "1.0.4", + version = "1.0.5", author = "hhsecond", author_email = "sherinct@live.com", description = ("A powerful python wraper for Stanford CoreNLP"), @@ -10,7 +10,7 @@ keywords = "stanford corenlp wrapper", install_requires=['requests'], url = "https://www.github.com/hhsecond/corenlp_pywrap", - download_url = "https://www.github.com/hhsecond/corenlp_pywrap/tarball/1.0.4", + download_url = "https://www.github.com/hhsecond/corenlp_pywrap/tarball/1.0.5", packages=['corenlp_pywrap'], long_description='Production Ready version equiped with basic'\ 'output fetch of stanfornlp and custom arrange function, '\