In this tutorial we will be discussing about Standford NLP POS Tagger with an example. We will be creating a simple project in eclipse IDE with maven as a building tool and look into how Standford NLP can be used to tag any part of speech. We will be using MaxentTagger provided by Standford to tag POS using english-left3words-distsim.tagger.
As per wiki, POS tagging is the process of marking up a word in a text (corpus) as corresponding to a particular part of speech, based on both its definition and its context—i.e., its relationship with adjacent and related words in a phrase, sentence, or paragraph. A simplified form of this is commonly taught to school-age children, in the identification of words as nouns, verbs, adjectives, adverbs, etc.
Following is the POS Tags with their corresponding meaning.
Following is the class that takes text as an input parameter and tags each word.Here is an example of Apache OpenNLP POS Tagger Example if you are looking for OpenNLP taggger.
MaxentTagger is the main class for users to run, train, and test the part of speech tagger.Here we are initialzing MaxentTagger with a constructor taking as argument the location of parameter file with a trained tagger as english-left3words-distsim.tagger
Following is the test class to test the tagger class.
I hope this article served you that you were looking for. If you have anything that you want to add or share then please share it below in the comment section.
Contact us: firstname.lastname@example.org