Questions tagged [ngrams]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
1answer
46 views

N-grams for RNNs

Given a word $w_{n}$ a statistical model such a Markov chain using n-grams predicts the subsequent word $w_{n+1}$. The prediction is by no means random. How is this translated into a neural model? I ...
2
votes
1answer
26 views

FastText Model Explained

I was reading the FastText paper and I have a few questions about the model used for classification. Since I am not from NLP background, some I am unfamiliar with the jargon. In the figure, what ...
0
votes
1answer
26 views

Why is n-grams language independent?

I don't understand how n-grams are language independent. I've read that by using character n-grams of a word than the word itself as dimensions of a vector space model, we can skip the language-...
1
vote
1answer
24 views

Is the search for a specific n-gram the same like a string search?

Is the result of a search for a specific n-gram like sherlock+holmes equal to the result of a regex search for "sherlock holmes" in the same document corpus? So if i read about n-grams for certain ...
0
votes
0answers
23 views

Probability Mass Function of Trigrams of DevSet in Linear Interpolation

I am reading the text on page 12-13, the A linearly interpolated trigram model is derived is defined in terms of the trigram, bigram, and unigram maximum-likelihood estimates $q(w|u,v)=λ_1 ×q_{ML}(w|...
0
votes
1answer
73 views

How to feed data for ngram model?

I want to train an ngram language model Let's say I have the following corpus: ...
2
votes
1answer
25 views

Artificially increasing frequency weight of word ending characters in word building

I have a database of letter pair bigrams. For example: ...
1
vote
0answers
36 views

Dealing with missing n-grams in Naive Bayes classifier

I am doing sentiment analysis on code-mixed text data, i.e English used interchangeably with another language. The dataset I currently have is very small in size, approx 3.5k samples. I am sure that ...
1
vote
0answers
96 views

Skip-thought models applied to phrases instead of sentences

My goal is to build a statistical model with domain specific phrase embeddings. To do this, I am doing research on how to build a model using skip-thought vectors, where instead of using sentence ...
0
votes
2answers
161 views

Discarding rare words when comparing texts - per text, per comparison, or per codex?

I'm trying to compare texts (read: books) using KL divergence of N-gram usage frequency. first I have to calculate the frequency of N-grams, and I see (perhaps unsurprisingly) that many of the words ...
2
votes
1answer
2k views
2
votes
1answer
3k views

How to improve Naive Bayes?

I am solving a problem that address this question "What are the Actions that lead to high or low score?" I have the following Data that consist of text and score , I want to derive the words or ...
1
vote
1answer
651 views

What affect will replacing words with bigrams have on TfIDF?

Say I have a corpus of text documents on which I have calculated each documents TfIDF vector. With this sparse matrix representation of the corpus, I can calculate similarities between documents by ...
1
vote
1answer
36 views

Predicting interactions [closed]

First off, I don't really know much about machine learning. In a virtual world, such as a video game like minecraft or an application like Google Street view, a user can navigate the world using the ...
1
vote
0answers
45 views

What does NIST information weights refer to?

NIST is a metric used to measure the goodness of translation. In the paper, Doddington (2002) introduce the notion of "Information weights" Information weights were computed using N-gram counts ...
6
votes
2answers
3k views

Clustering or classifing n-gram-based text categories

I have large set of data records looking like this: "text", "category" I extract n-grams from text (2-, 3- and 4-grams) and store count of each n-gram per ...
9
votes
0answers
353 views

ngram and RNN prediction rate wrt word index

I tried to plot the rate of correct predictions (for the top 1 shortlist) with relation to the word's position in sentence : I was expecting to see a plateau sooner on the ngram setup since it ...