Skip to content
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

updates for boilerpipe dependency #6

Open
wants to merge 1 commit into
base: master
from

Conversation

@shawnmjones shawnmjones added the bug label Aug 29, 2019

@adamhb123
Copy link

left a comment

Why not just say 'boilerpipe3' rather than 'boilerpipe @ http://github.com/misja/python-boilerpipe/tarball/master#egg=python-boilerpipe'? This throws me an error when used, where as 'boilerpipe3' doesn't.

@shawnmjones

This comment has been minimized.

Copy link
Author

commented Aug 29, 2019

Interesting. I originally used boilerpipe3 when testing NwalaTextUtils and had no issues.

I offered this solution because the author @anwala specified a dependency on the library at https://github.com/misja/python-boilerpipe/tarball/master#egg=python-boilerpipe.

According to Pypi, the boilerpipe3 library comes from https://github.com/slaveofcode/boilerpipe3. I was trying to offer the @anwala something closer to the original intention of the setup.py of NwalaTextUtils.

I do not get an error with the solution in this pull request. I do, however get a warning.

In [1]: import json
   ...: from NwalaTextUtils.textutils import prlGetTxtFrmURIs
   ...:
   ...: uris_lst = [
   ...:     'http://www.euro.who.int/en/health-topics/emergencies/pages/news/news/2015/03/united-kingdom-is-declared-free-of-ebola-virus-disease',
   ...:     'https://time.com/3505982/ebola-new-cases-world-health-organization/',
   ...:     'https://www.scientificamerican.com/article/why-ebola-survivors-struggle-with-new-symptoms/'
   ...:   ]
   ...:
   ...: doc_lst = prlGetTxtFrmURIs(uris_lst)
   ...: with open('doc_lst.json', 'w') as outfile:
   ...:     json.dump(doc_lst, outfile)
   ...:
/Users/smj/.virtualenvs/nwala-testing/lib/python3.7/site-packages/jpype/_core.py:210: UserWarning:
-------------------------------------------------------------------------------
Deprecated: convertStrings was not specified when starting the JVM. The default
behavior in JPype will be False starting in JPype 0.8. The recommended setting
for new code is convertStrings=False.  The legacy value of True was assumed for
this session. If you are a user of an application that reported this warning,
please file a ticket with the developer.
-------------------------------------------------------------------------------

  """)
	deref uri i: 0 of 3

In [2]:

A glance at the resulting JSON indicates that it looks similar with either boilerpipe3 or misja/python-boilerpipe in spite of the warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.