Pytextrank – A pure Python implementation of TextRank
github.com
github.com
How is this different from all the other textrank implementation? Is this more complete?
https://github.com/summanlp/textrank
https://github.com/davidadamojr/TextRank
https://github.com/galsang/PyTextRank
rant: I hate how complex the python ecosystem is, there are different versions for language, different packaging systems (this project uses both conda and pip), sometimes you need to install stuff even with OS package manager or install packages from the source. Something really needs to be done for this mess.
print("hello")
print "hello"
while 3+ allows only print("hello") from __future__ import print_function
to get the print("hello") behaviour. airbears2-10-142-34-161:~ ecx$ echo 'print("hello")' >0.py
airbears2-10-142-34-161:~ ecx$ python2.7 0.py
hello
airbears2-10-142-34-161:~ ecx$ python2.7 -V
Python 2.7.10What the import from __future__ does is make the original non-parens version illegal syntax in Python 2. You have to treat it like a function call with that import.
>>> print "foo", 1, 2, "bar", "baz"
foo 1 2 bar baz
>>> print("foo", 1, 2, "bar", "baz")
('foo', 1, 2, 'bar', 'baz')
>>> from __future__ import print_function
>>> print("foo", 1, 2, "bar", "baz")
foo 1 2 bar bazIn the particular case of a print statement, the grouping parens disambiguate between the comma meaning multiple args and a single arg that's a tuple, once Python 2 implicitly wraps the entire right side with function calling parens.
In the end it's really a form of operator precedence. The from __future__ version behaves differently only because the function calling parens are now explicit and so tuple grouping parens must be added too if desired.
Like for every language out there (Java 6, Java 7, Java 8, etc.)
> different packaging systems (this project uses both conda and pip),
Yes, I believe that is an issue. But not that big. For instance, you can replace `conda install textblob` by `pip install textblob` for the given project.
> sometimes you need to install stuff even with OS package manager or install packages from the source.
Like for every scripting language out there.
> Something really needs to be done for this mess.
It used to be much worse, but it's moving in the right direction (see https://glyph.twistedmatrix.com/2016/08/python-packaging.htm...), except for the pip/conda divide.
Also: the project linked is not properly packaged (it has no setup.py). I guess I you had come across a repository with a bunch of .c files and no Makefile you would be lost too.
Maybe we were lucky, or more likely didn't push any corners of the JVM in an incompatible way.
I have also never had a problem finding a library version (Assuming java has one) that would work with my java version whereas with Python that is one of the main problems all the time.