How to use POS tags as the features
2 views (last 30 days)
Show older comments
Hi
I am looking forward to know how could I use POS tags as the features. Adding partOfSpeechDetails after tokenizing the document has tagged every word with its respective POS. But how could I take these tags as the features to fed into a classifier?
As an example, for the sentence, "hello. how are you?", I got the POS details as the following:
Token DocumentNumber SentenceNumber LineNumber Type Language PartOfSpeech
_______ ______________ ______________ __________ ___________ ________ ______________
"hello" 1 1 1 letters en interjection
"." 1 1 1 punctuation en punctuation
"how" 1 2 1 letters en adverb
"are" 1 2 1 letters en auxiliary-verb
"you" 1 2 1 letters en pronoun
"?" 1 2 1 punctuation en punctuation
Now, how could I take the PartOfSpeech columns as a feature for the sentence? And do u shed some light on how many part of speeches are avilable in Matlab?
I am looking for your advice in this regard.
Thanks,
0 Comments
Answers (0)
See Also
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!