Top 6 NLP Python Library

NLTK - It is a leading platform for building Python programs to work with human language data. It provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning, wrappers for industrial-strength NLP libraries, and an active discussion forum.

TextBlob - It is a Python (2 and 3) library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.

Stanford CoreNLP -  It provides a set of human language technology tools. It can give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases and syntactic dependencies, indicate which noun phrases refer to the same entities, indicate sentiment, extract particular or open-class relations between entity mentions

spaCy – The spaCy excels at large-scale information extraction tasks. It's written from the ground up in carefully memory-managed Cython. spaCy is the best way to prepare text for deep learning. It interoperates seamlessly with TensorFlow, PyTorch, scikit-learn, Gensim and the rest of Python's awesome AI ecosystem.

Gensim started off as a collection of Scalable statistical semantics and can analyze plain-text documents for semantic structure, retrieve semantically similar documents

Polyglot is a natural language pipeline that supports massive multilingual applications.


aima -- Artificial Intelligence, A Modern Approach, by Stuart Russell and Peter Norvig

This file gives an overview of the Python code for the algorithms in the textbook Artificial Intelligence: A Modern Approach, also known as AIMA. The code is offered free for your use under the MIT License. 


PyBrain is top Python Library for Data Science that focuses on flexible, easy-to-use algorithms for Machine Learning tasks and a variety of predefined environments to test and compare the algorithms. It is popular because of the flexibility and algorithms for state-of-the-art research. The current problems deal with continuous state and action spaces, function approximations like neural networks and genetic algorithms with the larger dimension.

Python program to find prime numbers in a range and time taken to calculate

import time
lo = int(input("Enter lower range: "))
up = int(input("Enter upper range: "))
print("Prime numbers between",lo,"&",up,"are:\t")
for n in range(lo,up + 1):
   if n > 1:
       for i in range(2,n):
           if (n % i) == 0:
elapsed_time = time.time() - start_time
print ("Time taken to calculate:",elapsed_time)