NLTK vs Stanford NLP NLTK vs Stanford NLP python python

NLTK vs Stanford NLP


Can anyone tell me what is the difference between NLTK and Stanford NLP? Are they 2 different libraries ? I know that NLTK has an interface to Stanford NLP but can anyone throw some light on few basic differences or even more in detail.

(I'm assuming you mean "Stanford CoreNLP".)

They are two different libraries.

  • Stanford CoreNLP is written in Java
  • NLTK is a Python library

The main functional difference is that NLTK has multiple versions or interfaces to other versions of NLP tools, while Stanford CoreNLP only has their version. NLTK also supports installing third-party Java projects, and even includes instructions for installing some Stanford NLP packages on the wiki.

Both have good support for English, but if you are dealing with other languages:

That said, which one is "best" will depend on your specific application and required performance (what features you are using, language, vocabulary, desired speed, etc.).

Can Stanford NLP be used using Python?

Yes, there are a number of interfaces and packages for using Stanford CoreNLP in Python (independent of NLTK).


The choice will depend upon your use case. NLTK is great for pre-processing and tokenizing text. It also includes a good POS tagger. Standford Core NLP for only tokenizing/POS tagging is a bit of overkill, because Standford NLP requires more resources.
But one fundamental difference is, you can't parse syntactic dependencies out of the box with NLTK. You need to specify a Grammar for that which can be very tedious if the text domain is not restricted. Whereas Standford NLP provides a probabilistic parser for general text as a down-loadable model, which is quite accurate. It also has built in NER (Named Entity Recognition) and more. Also I will recomend to take a look at Spacy, which is written in python, easy to use and much faster than CoreNLP.


It appears that you are new to NLP.

I have recently started to use NLTK toolkit

If indeed you are new to NLP, then the best thing would be to start simple. So ideally you would start off with nltk. I am relatively new to natural language processing (a few months old). I can confirm that for beginners, nltk is better, since it has a great and free online book which helps the beginner learn quickly.

Once you are comfortable and actually have a problem to solve, look at Stanford Core NLP to see if it will be better at solving your problem.

If you want to stick to NLTK, you can also access the Stanford CoreNLP API in NLTK.

Now for the similarities and differences:

Can anyone tell me what is the difference between NLTK and Stanford NLP ? Are they 2 different libraries?

Both offer natural language processing. Some of the most useful parts of Stanford Core NLP include the part-of-speech tagger, the named entity recognizer, sentiment analysis, and pattern learning.

The named entity recognizer is better in the Stanford Core NLP. Stanford Core NLP is better at grammatical functions for instance picking up subject, object, predictae (that is partially why I switched from nltk to Stanford Core NLP). As @user812786 said, NLTK has multiple interfaces to other versions of NLP tools. NLTK is also better for learning NLP. If you need to use multiple corpora, use NLTK, as you can easily access a wide multitude of text corpora and lexical resources. Both have POS tagging and sentiment analysis.

Can stanford NLP be used using Python ?

Yes absolutely. You can use StanfordNLP which is a Python natural language analysis package that is able to call the CoreNLP Java package. There are also multiple Python packages using the Stanford CoreNLP server