For questions about the concept of an n-gram in the context of natural language processing and other AI sub-fields.
Questions tagged [n-gram]
2 questions
1
vote
1 answer
Bag of Tricks: n-grams as additional features?
I've been playing with PyTorch's nn.EmbeddingBag for sentence classification for about a month. I've been doing some feature engineering, playing with different tokenizers, etc. I'm just trying to get the best performance out of this simple model as…

rocksNwaves
- 143
- 4
0
votes
1 answer
Why would adding all the possible embeddings be "worse" than using 1D-convolutions?
Suppose we are using word2vec and have embeddings of individual words $w_1, \dots, w_{10}$. Let's say we wanted to analyze $2$ grams or $3$ grams.
Why would adding all the possible embeddings, $\binom{10}{2}$ or $\binom{10}{3}$, be "worse" than…

aiguy123
- 31
- 4