Questions tagged [bag-of-words]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
3 views

Combining a BoW vector with other features: effectivity and feature value ranges

I am working with a Support Vector Machine to predict class prevalence in a binary classification problem. The model will take a sparse representation of an instance as input, where the number of the ...
user avatar
0 votes
0 answers
11 views

Choosing an explainable embedding and classifier when each document only have one sentence

I have dataset with corpus of 20K documents. Each document is a short 1 sentences. I need to classify each sentence in 0/1 classes as well as being able to point exactly what words are responsible for ...
user avatar
  • 111
0 votes
0 answers
10 views

TF-IDF to find technical terms

I have some sentences and I want to see whether or not they contain words that are technical terms. I was thinking of working with Wikipedia texts: finding the most common words in a certain article, ...
user avatar
0 votes
1 answer
45 views

Getting context-word pairs for a continuous bag of words model and other confusions

Suppose I have a corpus with documents: ...
user avatar
  • 133
2 votes
1 answer
136 views

Should bag of words in training set include test set data when doing text classification?

I'm doing text classification to identify 'attacks' from Wikipedia comments using a simple bag of words model and a linear SVM classifier. Because of class imbalance, I'm using the F1 score as my ...
user avatar
  • 21
2 votes
1 answer
37 views

Usage of KL divergence to improve BOW model

For a university project, I chose to do sentiment analysis on a Google Play store reviews dataset. I obtained decent results classifying the data using the bag of words (BOW) model and an ADALINE ...
user avatar
  • 23
1 vote
2 answers
490 views

How to decide to go with BOW or TFIDF

I know that there are methods that help in selecting features such as Matual Info, and Info Gain, etc. But for datasets with thousands of records and thousands of features it is time consuming to ...
user avatar
  • 497
0 votes
2 answers
99 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 ...
user avatar
  • 497
1 vote
1 answer
17 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 ...
user avatar
  • 111
1 vote
2 answers
118 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. ...
user avatar
0 votes
1 answer
81 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-...
user avatar
  • 1
1 vote
1 answer
664 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-...
user avatar
1 vote
1 answer
79 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 ...
user avatar
  • 113
0 votes
1 answer
124 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=...
user avatar
1 vote
1 answer
79 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 ...
user avatar
0 votes
2 answers
651 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) ...
user avatar
  • 23
1 vote
3 answers
899 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' ...
user avatar
  • 23
2 votes
1 answer
83 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 ...
user avatar
3 votes
0 answers
102 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 ...
user avatar
  • 6,872