alyssaeliyah
alyssaeliyah

Reputation: 2244

Unigram vs Bigram vs Posgram in Natural Language Processing

I want to know what is the meaning and difference between unigram, bigram and posgram. I have searched the Internet but I could not find a comprehensive answer. Any help would be very much appreciated.

Upvotes: 2

Views: 849

Answers (1)

Evan Mata
Evan Mata

Reputation: 612

"This is an example sentence"

Unigram: Considering one word at a time -> "This" or "is" or "an"...

Bigram (or n-gram): Considering n-word combinations (bi -> n=2) -> "This is", "is an", "an example", "example sentence"

Posgram (not as sure about this one): Considering the part of speech context as well (the example is "Noun" "verb" ...) to predict further information. More formally, it reduces the dimensionality of what is being chosen from (reduce to picking a word from the set of nouns instead of the larger set of all words kinda thing).

Upvotes: 5

Related Questions