The website, http://www.nltk.org, says mid 2011 in a very vague manner. I would like to start using NLTK however I have done a fair amount of work with Python 3.x and I don't want to have to go backwards in Python version just to use it. Just doing an effort analysis, if the wait is long enough I might bite the bullet and revert my Python.
There's a Python 3 branch:
https://github.com/nltk/nltk/tree/nltk-py3k
It's a transformation of the trunk and gets updated every so often to keep up with changes. You can check it out directly from git (instead of using the NLTK installation) and give it a shot.
git clone git://github.com/nltk/nltk.git nltk --branch nltk-py3k
I haven't used it personally, but I assume it works.
There is a "2and3" branch in the main nltk repo - see https://github.com/nltk/nltk/tree/2and3
It appears to be getting updated regularly, although I haven't tried it myself.
Here's the alpha release: https://github.com/nltk/nltk3-alpha
Alternative NLP: TextBlob is fully Python 3. https://github.com/sloria/TextBlob
Tutorial: http://www.stevenloria.com/how-to-build-a-text-classification-system-with-python-and-textblob/
For those who got here wondering when will nltk support python3:
Good news, the NLTK 3.0 series (currently on alpha and in development since Jan 2013) now support Python 2.6, 2.7 and Python 3 (http://www.nltk.org/nltk3-alpha/), We'll probably see a stable release soon :)
And the book is also being updated for python3, available at: http://www.nltk.org/book3/
So, the official release was in September 2014, just to add closure to the question
Related
I have been trying to migrate an older project which is mainly python 2.7 compatible to python 3.9. I did go through couple of python migration documentation and I have decided to use 2to3 tool for the migration. I read a couple of blogs that mention that these automated tools do not handle everything and there are a couple of things that have to be changed manually (for eg. - the use of division operator, text vs binary data, etc.).
Can someone tell me what else should be manually updated and what are some things that I should look out for ?
I know that python 3.6 is only available since a few days. What do you think when cx_Oracle for python 3.6 will become available?
I'm not a python expert. May I also ask why there is a dependency between the python minor version and the Oracle library?
thanks a lot, and have a great new year.
Juergen
The reason there is a dependency is because cx_Oracle is a C extension, which means that it must be compiled every time the Python C API changes. That generally happens each time a minor version is released. As to when cx_Oracle will be released for Python 3.6 -- that is unknown but hopefully will be soon! In the meantime you can compile it for yourself and use it before any official release is made.
I've been curious about this for a while now, hopefully this isn't to secretive and some Googlers could give some information about this?
No, see e.g. https://code.google.com/p/or-tools/ which is Python 2 only.
Python is far from the main language at Google anyway, see https://groups.google.com/forum/?fromgroups=#!topic/unladen-swallow/TtvEBvVEZD4
Also, " Today dozens of Google engineers use Python," http://www.python.org/about/quotes/, which is a small fraction of all engineers.
I'm not a Googler, but I'd say the answer is most likely: yes.
After all, Guido van Rossum, creator of Python, has been working for Google since 2005. And it's not really like using Python 3 is such a secretive thing. A language upgrade isn't such a "killer feature" that will sweep all competition off their feet.
Do know that using Python 3 in house is one thing, and providing Python 3 APIs is another.
Case in point: Google has been using Guice since 2006 in its mission critical applications. This means Guice has probably been under development earlier than 2006. Yet, the first public release of Guice has been in March 2007.
There is no reason to believe they aren't doing the same with Python.
As you can see, my answer is highly speculative, but it does use some common sense based on facts and previous Google's moves.
I am not a Google employee, on Google App Engine they still provide Python 2.5
I have been looking into various game design modules for python such as pyglet and pyGame. I have noticed that both of these seem to only be compatible with python 2. Seeing as python 3 is the most current version, why is this? My experience with python has been with python 3, so are there good frameworks/modules out there for python 3 game development? Or would I be better off learning python 2 and using pyglet or pyGame?
edit: I would be using pyGame on a mac. The downloads page, http://www.pygame.org/download.shtml, only has links for py2.6, py2.5, and py2.4, which is what leads me to believe it is not python 3 compatible.
I don't even get your question, as PyGame is compatible with Python 3 since version 1.9:
http://www.pygame.org/wiki/python3porting?parent=todo
There are a few minor issues, but it is usable with Python 3.
I'm developing a pygame-based application on Mac OSX with python 3. It definitely works fine, and so far I haven't run into any compatibility problems, though there are certainly other mac-specific pygame bugs that I have found.
That said, I can definitely confirm that it works.
The fifth link from the top under "Windows" on the page you linked to clearly has py-3.1 in the name.
They don't support Python 3, because nobody has made them support Python 3 yet. It's a bizarre question. :-)
PyGame seems to mostly support Python 3. There are some issues: (from http://www.pygame.org/wiki/python3porting?parent=todo )
Complete unicode file name handling (fsencoding branch), then merge back into trunk (by mid Sept/10).
update documentation to explain Unicode in Pygame
work out final solution for open Python 3 IOBase objects: how to check abstract types from C. (Sept. 1, 2010) Probably the most practical solution is to just do duck typing.
_movie - deferred until module is ready for release
scrap (does some C string stuff that makes porting difficult)
camera - what is the status of this module?
Nowhere does it say that it doesn't work for Python 3 on mac, and it seems unlikely to that that this would be the case. So you can try, but you will have to compile it yourself.
Pyglet doens't mention Python 3, so it's probably not ported.
pyglet 1.2 (alpha as of July 2012) works with Python 3.
What are the current rules for writing python code that will pass cleanly through 2to3 and what are the practices that seem to be best suited to writing code that will not become mired forever in version 2.
I have read from the SciPy/NumPy forums that "100% test coverage" (unit testing) is important for many people, and I am not sure if that would apply to everybody. Certainly having a reasonable set of unit tests to try your code out with after conversion, seems a sane step.
Are there other things? What are skilled Pythonistas doing if they are writing 2.x code that they hope to have come through "cleanly" in the 2to3 process.
I am looking for specific instances of "[don't] do this" as well as some more general "best-practices", but specific instances of "do's and don'ts" are helpful.
Let's assume that frameworks, libraries (Django, SciPy/NumPy), and every other C Extension we need gets ported to Python3 eventually, and I'm asking about how you write and maintain the pure python language code that you write yourself.
Update: It's possible that what I really want is the "style guide" and list of deprecated features that everybody was already staying away from. I cut my teeth on Python 1.5 and moved to 2.0, and then have not really followed much of the 2.5/2.6 era, used them but really my code is more 2.1 era.
I'd say:
Read the "What's new for Python 3.0". Very informative.
In particular, if you care about Unicode or text encodings at all, take the time to understand what has changed for 3.x. That's probably one of the trickier things to change for Python 3.x.
Get Python 2.6 or 2.7, and run your code with the -3 flag. It will tell you about things in your code that will need changing.
Before using 3rd-party packages, check to see if they have a Python 3.x version. If not, check the package web site, mailing lists, version control repositories etc to see how actively the package is being developed and whether there is a roadmap towards Python 3.x support.
Download Python 3.x and try it out! Admittedly, that might not be practical if you care about code that currently depends on packages that don't yet support Python 3.x (e.g. wxPython or Django).