# Natural Language Processing using NLTK

# Install NLTK - pip install nltk

# Tokenization of paragraphs/sentences
import nltk
nltk.download('maxent_ne_chunker')
nltk.download('words')
paragraph = """The Taj Mahal was built by Emperor <NAME>"""
               
               
# POS Tagging
words = nltk.word_tokenize(paragraph)

tagged_words = nltk.pos_tag(words)

# Named entity recognition
namedEnt = nltk.ne_chunk(tagged_words)
namedEnt.draw()

"""
ORGANIZATION	Georgia-Pacific Corp., WHO
PERSON	<NAME>, President Obama
LOCATION	Murray River, Mount Everest
DATE	June, 2008-06-29
TIME	two fifty a m, 1:30 p.m.
MONEY	175 million Canadian Dollars, GBP 10.40
PERCENT	twenty pct, 18.75 %
FACILITY	Washington Monument, Stonehenge
GPE	South East Asia, Midlothian
"""
# Natural Language Processing using NLTK

# Install NLTK - pip install nltk

# Tokenization of paragraphs/sentences
import nltk
nltk.download('maxent_ne_chunker')
nltk.download('words')
paragraph = """The Taj Mahal was built by Emperor <NAME>"""
               
               
# POS Tagging
words = nltk.word_tokenize(paragraph)

tagged_words = nltk.pos_tag(words)

# Named entity recognition
namedEnt = nltk.ne_chunk(tagged_words)
namedEnt.draw()

"""
ORGANIZATION	Georgia-Pacific Corp., WHO
PERSON	<NAME>, President Obama
LOCATION	Murray River, Mount Everest
DATE	June, 2008-06-29
TIME	two fifty a m, 1:30 p.m.
MONEY	175 million Canadian Dollars, GBP 10.40
PERCENT	twenty pct, 18.75 %
FACILITY	Washington Monument, Stonehenge
GPE	South East Asia, Midlothian
"""
# Natural Language Processing using NLTK # Install NLTK - pip install nltk # Tokenization of paragraphs/sentences The Taj Mahal was built by Emperor <NAME> # POS Tagging # Named entity recognition ORGANIZATION	Georgia-Pacific Corp., WHO PERSON	<NAME>, President Obama LOCATION	Murray River, Mount Everest DATE	June, 2008-06-29 TIME	two fifty a m, 1:30 p.m. MONEY	175 million Canadian Dollars, GBP 10.40 PERCENT	twenty pct, 18.75 % FACILITY	Washington Monument, Stonehenge GPE	South East Asia, Midlothian