I successfully installed JPype and Boilerpipe Python wrapper.
My JAVA_HOME path is correct (as far as I know).
I created a python file with the following code:
from boilerpipe.extract import Extractor
extractor = Extractor(extractor='ArticleExtractor', url='http://edition.cnn.com/2016/02/09/politics/new-hampshire-primary-highlights/')
extracted_text = extractor.getText()
print(extracted_text)
I am getting this error when I run python3 boiler_test.py
Traceback (most recent call last):
File "boiler_test.py", line 1, in <module>
from boilerpipe.extract import Extractor
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/boilerpipe/extract/__init__.py", line 2, in <module> import urllib2
ImportError: No module named 'urllib2'
How can I solve this?
Thank you.