Questions tagged [bag-of-words]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

How to decide which method to use TFIDF, or BOW

In a huge dataset for NLP it is taking very long time to classify my dataset therefore, trying each feature extraction method separetly is time consuming and not effecient. Is there a way that can ...
0
votes
0answers
18 views

The TF-IDF is not matching with the bags of words

I am creating the information gains of all the words present in the vocabulary. However, when I check for feature names of the vectorizer it is different. For bag of words I am using: ...
1
vote
1answer
15 views

Which phrase should be returned in case of multiple matches when comparing text?

I want to compare one sentence to some other sentences using the Bag of Words model. Suppose that my comparing sentence is: I am playing football and there are three more sentences that I want to ...
1
vote
2answers
36 views

Bag-of-words and Spam classifiers

I implemented a spam classifier using Bernoulli Naive Bayes, Logistic Regression, and SVM. Algorithms are trained on the entire Enron spam emails dataset using the Bag-of-words (BoW) approach. ...
0
votes
1answer
33 views

How to use scikit-learn to extract features from text when I only have positive and unlabeled data?

I'm looking for something similar to this https://scikit-learn.org/stable/auto_examples/text/plot_document_classification_20newsgroups.html#sphx-glr-auto-examples-text-plot-document-classification-...
0
votes
1answer
73 views

Why I would use TF-IDF after Bag-of-Words (CountVectorizer)?

In my recent studies over Machine Learning NLP tasks I found this very nice tutorial teaching how to build your first text classifier: https://towardsdatascience.com/machine-learning-nlp-text-...
1
vote
1answer
25 views

One-hot vector for fixed vocabulary

given a vocabulary with $|V|=4$ and V = {I, want, this, cat} for example. How does the bag-of-words representation with this vocabulary and one-hot encoding look like regarding example sentences: You ...
0
votes
1answer
48 views

Machine learning algorithms for forming Homophones from input dataset word

https://www.google.com/search?sxsrf=ALeKk01_SgA8G4UfNm4rOqku4yJBFvKhLw%3A1600154854621&source=hp&ei=5mxgX8ztI6KZ4-EPq-mL8Ak&q=homophones+example&oq=Homophones&gs_lcp=...
1
vote
1answer
44 views

Machine learning algorithms for correct words formation from jumbled words

https://www.google.com/search?q=jumbled+words&oq=jumbled&aqs=chrome.1.69i57j0l4.3399j0j9&client=ms-android-lava&sourceid=chrome-mobile&ie=UTF-8 Can Machine learning algorithms ...
0
votes
1answer
38 views

Is it good practice to remove the numeric values from the text data during preprocessing?

Im doing preprocessing on a text dataset. I have certain numerics in it like: date(1st July) year(2019) tentative values (3-5 years/ 10+ advantages). unique values (room no 31/ user rank 45) ...
1
vote
3answers
212 views

How to process the hyphenated english words for any nlp problem?

Im doing preprocessing on english text dataset. I encounter hyphenated words like 'well-known'. Will it be useful if I remove the hyphen as special character and treat it as a single word 'wellknown' ...
2
votes
1answer
36 views

Word representation that gives more weight to terms frequent in corpus?

The tf-idf discounts the words that appear in a lot of documents in the corpus. I am constructing an anomaly detection text classification algorithm that is trained only on valid documents. Later I ...
3
votes
0answers
60 views

Bag of words: Prediction on new (out-of-sample) data

I'm working with a bag of words in R: library(tm) corpus = VCorpus(textsource) dtm = DocumentTermMatrix(corpus) dtm = as.matrix(dtm) I use the matrix ...