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

Update nltk version #465

Merged
merged 2 commits into from Dec 20, 2017

Conversation

ssaamm
Copy link

@ssaamm ssaamm commented Oct 27, 2017

nltk 2.0.5 doesn't seem to install. How about we update to a version that works?

Tests pass with these changes:

$ python tests/unit_tests.py
        testing function 'test_config_build'
        [OK] in 'test_config_build' 0.01 sec
.       testing function 'test_chinese_fulltext_extract'
Building prefix dict from <OBSCURED>/lib/python2.7/site-packages/jieba/dict.txt ...
Loading model from cache /var/folders/mt/4fq_3q8s6hzg69gy03lq40zm0000gn/T/jieba.cache
Loading model cost 0.455691099167 seconds.
Prefix dict has been built succesfully.
        [OK] in 'test_chinese_fulltext_extract' 0.93 sec
        testing function 'test_arabic_fulltext_extract'
        [OK] in 'test_arabic_fulltext_extract' 0.32 sec
        testing function 'test_spanish_fulltext_extract'
        [OK] in 'test_spanish_fulltext_extract' 41.24 sec
.       testing function 'test_valid_urls'
        [OK] in 'test_valid_urls' 0.00 sec
.       testing function 'test_url'
        [OK] in 'test_url' 0.00 sec
        testing function 'test_download_html'
        [OK] in 'test_download_html' 0.00 sec
        testing function 'test_pre_download_parse'
You must download() an article before parsing it!
        [OK] in 'test_pre_download_parse' 0.00 sec
        testing function 'test_parse_html'
        [OK] in 'test_parse_html' 0.31 sec
        testing function 'test_meta_type_extraction'
        [OK] in 'test_meta_type_extraction' 0.00 sec
        testing function 'test_meta_extraction'
        [OK] in 'test_meta_extraction' 0.00 sec
        testing function 'test_pre_download_nlp'
You must download and parse an article before parsing it!
        [OK] in 'test_pre_download_nlp' 0.00 sec
        testing function 'test_pre_parse_nlp'
You must download and parse an article before parsing it!
        [OK] in 'test_pre_parse_nlp' 0.00 sec
        testing function 'test_nlp_body'
        [OK] in 'test_nlp_body' 0.00 sec
.       testing function 'test_hot_trending'
        [OK] in 'test_hot_trending' 0.31 sec
        testing function 'test_popular_urls'
        [OK] in 'test_popular_urls' 0.00 sec
.
----------------------------------------------------------------------
Ran 5 tests in 43.129s

OK

@ssaamm
Copy link
Author

ssaamm commented Oct 27, 2017

@codelucas, the Travis failure looks unrelated to these changes. Am I misunderstanding?

@ssaamm
Copy link
Author

ssaamm commented Dec 6, 2017

@codelucas or @yprez , have either of you gotten the chance to look this over?

@yprez
Copy link
Collaborator

yprez commented Dec 20, 2017

@ssaamm I think that travis is not configured on the py2 branch, that's why it's failing.
Is this version fully compatible with Python2.7? If so, I see no reason not to merge this in.
Thanks.

@ssaamm
Copy link
Author

ssaamm commented Dec 20, 2017

@yprez ah, that makes sense. Thank you for clarifying.

Yes, (a) NLTK says they're 2.7 compatible and (b) the tests seem to work when I run them with a 2.7 interpreter.

@yprez
Copy link
Collaborator

yprez commented Dec 20, 2017

Sounds good enough to me. Thanks!

@yprez yprez merged commit 1a18012 into codelucas:python-2-head Dec 20, 2017
@ssaamm ssaamm deleted the python-2-requirementsupdate branch January 11, 2018 13:39
@MichaelBaumgarn
Copy link

so newspaper will never be compatible with python 3?

@codelucas
Copy link
Owner

@MichaelBaumgarn Newspaper already is compatible with python 3 and has been for some time.

We maintain two separate branches in this repo, 'master' is purely python 3 while 'python-2-head' (this branch) is purely python 2.

These separate branches are separate projects in pip, download the python 3 version with pip3 install newspaper3k or python 2 version via pip install newspaper

@MichaelBaumgarn
Copy link

MichaelBaumgarn commented Sep 17, 2018

yes my bad newspaper3k did the trick, I found this via google (nltk==2.0.5 bug)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants