# Load libraries
from nltk import pos_tag
from nltk import word_tokenize

"""
Explanation: Title: Tag Parts Of Speech
Slug: tag_parts_of_speech
Summary: How to tag parts of speech in unstructured text data for machine learning in Python. 
Date: 2016-09-09 12:00
Category: Machine Learning
Tags: Preprocessing Text
Authors: Chris Albon
Preliminaries
End of explanation
"""


# Create text
text_data = "Chris loved outdoor running"

"""
Explanation: Create Text Data
End of explanation
"""


# Use pre-trained part of speech tagger
text_tagged = pos_tag(word_tokenize(text_data))

# Show parts of speech
text_tagged

"""
Explanation: Tag Parts Of Speech
End of explanation
"""


