Skip to main content

Questions tagged [text-classification]

For questions about text classification, the task of assigning predefined categories (or classes) to free-text documents.

Filter by
Sorted by
Tagged with
71 votes
4 answers
95k views

What is purpose of the [CLS] token and why is its encoding output important?

I am reading this article on how to use BERT by Jay Alammar and I understand things up until: For sentence classification, we’re only only interested in BERT’s output for the [CLS] token, so we ...
user3768495's user avatar
9 votes
2 answers
5k views

Effect of Stop-Word Removal on Transformers for Text Classification

The domain here is essentially topic classification, so not necessarily a problem where stop-words have an impact on the analysis (as opposed to, say, sentiment analysis where structure can affect ...
Andy's user avatar
  • 650
6 votes
1 answer
3k views

How to use ndcg metric for binary relevance

I am working on a ranking problem to predict the right single document based on the user query and use the NDCG metric to measure the model. Given the details : Queries ( Q ), Result Document ( D ),...
kannandreams's user avatar
6 votes
2 answers
7k views

What are the exact differences between Word Embedding and Word Vectorization?

I am learning NLP. I have tried to figure out the exact difference between Word Embedding and Word Vectorization. However, seems like some articles use these words interchangeably. But I think there ...
Nahid 's user avatar
  • 63
6 votes
1 answer
6k views

Using Trainable=True in Keras Embedding obtained better performance

It is suggested by the author of Keras [1] to use Trainable=False when using the embedding layer in Keras to prevent the weights from being updated during training. ...
sugab's user avatar
  • 163
5 votes
1 answer
941 views

How to preprocess with NLP a big dataset for text classification

TL;DR I've never done nlp before and I feel like I'm not doing it in the good way. I'd like to know if I'm really doing things in a bad way since the beginning or ...
gabriel garcia's user avatar
5 votes
1 answer
2k views

Text classification based on n-grams and similarity

I have tried to cluster hundred texts using k-means clustering. I would like to consider other algorithms to group text based on their content and try to spot news not related to other news (topic ...
Val's user avatar
  • 51
4 votes
1 answer
124 views

How to include categorical fields to enhance a text classification

I would have a question on how to add more categorical fields in a classification problem. My dataset had initially 4 fields: ...
Math's user avatar
  • 161
4 votes
0 answers
190 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 ...
Peter's user avatar
  • 7,526
3 votes
4 answers
2k views

How to automatically classify a sentence or text based on its context?

I have a database of sentences which are about different topics. I want to automatically classify each sentence with the one or more relevant tags based on the context of the sentence as shown below: ...
SageMaker's user avatar
  • 185
3 votes
4 answers
2k views

Accuracy is getting worse after text pre processing

I'm working a multi-class text classification project. After splitting the dataset into train and test datasets, I've applied the below function on the train dataset (AKA pre processing): ...
Ben's user avatar
  • 209
3 votes
1 answer
9k views

Overfitting with text classification using Transformers

I am trying to make a binary text classification model by using the encoder part of the transformer and then using its output to feed into an LSTM network. However, I am not able to achieve good ...
Khobaib Alam's user avatar
3 votes
2 answers
792 views

Over-sampling: is my model over-fitting?

I would like to ask you some questions on how to consider (good or not) the following results: ...
V_sqrt's user avatar
  • 295
3 votes
1 answer
972 views

Performing a text classification based on a dictionary

I have been given a kind of dictionary which maps a category with a set of certain strings. A sample of the dictionary is given below: This is all I have, there is no other data. There are around 46 ...
Tanishq Kureel's user avatar
3 votes
1 answer
49 views

Predictive output with your own model built

I would need to better understand how can be created a machine learning algorithm from scratch using an own model developed based on boolean values, for example # of words in a text, # of punctuation, ...
LdM's user avatar
  • 165
3 votes
1 answer
281 views

use genetic algorithm as a feature selection for text classification

how to apply the genetic algorithm as a feature selection for text classification in python I need to use GA to select most relevant feature in text classification
Ahmed's user avatar
  • 31
3 votes
2 answers
2k views

Is there any way to plot ROC curve for Ensemble hard voting classifier?

I am working on a multi-class text classification problem and performing an Ensemble learning for text classification. I chose hard voting as ensemble technique. I tried to plot ROC curve for my ...
Muneeb's user avatar
  • 73
3 votes
1 answer
26 views

Doubt on scope of text classification problem

I have a dataset that describes the sellers who are selling various brands. I need to identify the source (where did he buy those brands he is selling from) of those sellers. (Dimension of dataset 11,...
asspsss's user avatar
  • 75
3 votes
1 answer
57 views

Classifying one particular class of documents from the rest

I am trying to build a classifier that would classify if a document is a document about sports or not. I have enough samples of sports document to train a classifier on, however I can't imagine how I ...
Pastrami's user avatar
3 votes
0 answers
41 views

Weird behaviour when using RobERTA for text classification

I have a dataset with around 70 classes and the dataset is largely balanced ~150 samples per class. I am finetuning RoBERTA-base for 4 epochs with a ...
user1274878's user avatar
3 votes
3 answers
130 views

Classification when the classification of the previous itens matter

I have a classification problem to solve, that seems to be common but I am struggling to find the name of this task and the best way to model this problem. Suppose I have a series of events that are ...
bratao's user avatar
  • 31
3 votes
1 answer
43 views

Text vectorizer that capture feature offset in the text?

I'm using sklearn Tfifdfvectorizer to extract feature from text towards text classification. I believe the information I need tends to be in the beginning of the document, so I would like to somehow ...
R Sorek's user avatar
  • 53
2 votes
2 answers
109 views

Improve text classification accuracy

Task: I am building a text classification for salary prediction for data science jobs. I want to achieve at least 70 percent accuracy. Data: Features: Consists of job descriptions of data science, ...
Sendhan's user avatar
  • 21
2 votes
2 answers
205 views

Best approach for text classification of phrases with little syntactic difference

So I have the task of classifying sentences based on their level of 'change talk' shown. Change talk is a psychology term used in counseling sessions to express how much the client wants to change ...
caaax's user avatar
  • 73
2 votes
2 answers
320 views

classification of similar text input features with text output label

I hope somebody can provide guidance/input/advice on my project, where I believe AI can help. I have a general understanding of AI, but I lack a formal training. I've never built a neural net from ...
andrea's user avatar
  • 73
2 votes
3 answers
132 views

Classification - get some label value to check how close to another class (Python)

I am doing text classification in python with 3 alghoritms: kNN, Naive Bayes and SVM. I have 3 classes - easy, medium and hard. The accuracy is quite fine. Is there a way to check for new text its ...
marcus-linmarkson's user avatar
2 votes
2 answers
3k views

Text classification into thousands of classes

Could somebody point me to a paper or code that is about classifying texts into potentially thousands of categories (topics)? I do have data based on Wikipedia and the number of categories is really ...
Peter Krejzl's user avatar
2 votes
1 answer
29 views

Newbie questions: real-time clustering of messages

I'm very much a newbie in NLP, so please accept my apologies if this is an obvious question, the wrong place to ask it or any other error I could be making. I am considering using NLP for some subset ...
Yoric's user avatar
  • 121
2 votes
2 answers
865 views

Extend BERT or any transformer model using manual features

I have been doing a thesis in my citation classifications. I just implemented Bert model for the classification of citations. I have 4 output classes and I give an input sentence and my model returns ...
Ryan Mclaren's user avatar
2 votes
2 answers
116 views

How to stop a text-classification model from depending on only couple of the words from input text instead of entire sentence?

I have a text classification deep-learning model, which takes in a text and outputs a softmax probability. I am using glove embeddings to represent my input text in numerical form for the DL model. ...
Naveen Reddy Marthala's user avatar
2 votes
1 answer
1k views

sklearn models Parameter tuning GridSearchCV

Dataframe: ...
SaNa's user avatar
  • 129
2 votes
2 answers
2k views

Multi-class classification with extremely small dataset

I am working on a text classification task that contains 216 labeled paragraphs. The distribution of tags is as follows: {0: 17, 1: 15, 2: 16, 3: 9, 4: 10, 5: 18, 6: 24, 7: 9, 8: 33, 9: 38, 10: 27}. ...
Cheleeger Ken's user avatar
2 votes
1 answer
45 views

Bug in sentiment analysis and classification for unlabeled text [closed]

I'm working on the transcript of Trump and Biden's debate and want to analyze the sentences and classify negative, positive, or neutral comments, but I ran into one problem. I used both TextBlob and ...
mitra mirshafiee's user avatar
2 votes
2 answers
108 views

Text Classification : Classifying N classes vs rest of the classes

Apologies if this is naive, I am fairly new to the domain. I have a requirement where I am trying to classify 2 types of text data, i.e, I have got 2 classes to classify my data upon. I am able to get ...
Avneet Singh's user avatar
2 votes
1 answer
80 views

Classify text as logical/ not logical

Can some one advise me direction where to look in.Or some resources. Here is a task: User leaves feed back-text with min 50 characters. I need to check if it's normal human sentences/ word ...
Serhiy's user avatar
  • 123
2 votes
1 answer
22 views

Text Classification with unlimited labels, Text Extraction?

I'm looking to use ML to read in a blob of text, and extract a name from that text blob. (The blob is from an OCR result from an iPhone) The text blob varies in size, but the name is always present in ...
Matthew Knippen's user avatar
2 votes
1 answer
348 views

Handling of readability scores for short texts

I have a classification problem using emails as my dataset. I would like to use scores from various readability formulas as features for the classification. However, most of them are defined for ...
liakoyras's user avatar
  • 636
2 votes
1 answer
239 views

Is there anyway to classify the category on give amazon reviews using python

I am trying to find a model or way to classify text which falls into a category and its a positive or negative feedback. For ex. we have three columns Review : Camera's not good battery backup is not ...
Sanjay Chintha's user avatar
2 votes
2 answers
662 views

what make intent detection/classification different than random text classification?

I'm trying to understand what makes intents detection / classification different than random text classification. I always see examples of intents detection using a json file with the intent as a key ...
Ngoc Thao LY's user avatar
2 votes
1 answer
790 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 ...
jonnyf's user avatar
  • 121
2 votes
1 answer
38 views

Detecting low-quality, user-created text content

I run a website that allows visitors to publish text content. It is very similar to a forum in terms of functionality. I'd like to automatically exclude or flag, submitted text content that is "spammy"...
Bruce's user avatar
  • 121
2 votes
2 answers
71 views

Which kind of model is better for keyword-set classification?

There exists a similar task that is named text classification. But I want to find a kind of model that the inputs are keyword set. And the keyword set is not from a sentence. For example: ...
CoderOnly's user avatar
  • 711
2 votes
0 answers
134 views

how Can we add extra word embedding to the pytorch funnel transformer?

i was approaching NLP sequence classification problem (3 classes) using huggingface transformers (funnel-transformer/large) and tensorflow. first i created laserembedding like this : ...
Syed Mobassir's user avatar
2 votes
0 answers
76 views

sentence type classification

I want to classify the sentences in my dataset as declarative, interrogative, imperative and ...
Mohsen Mahmoodzadeh's user avatar
2 votes
0 answers
74 views

Multi-Class Document Classification with both known and un-known classes

Currently, I am building a multi-class document classifier which has to classify either 3 known classes, namely "Financial Report", "Insurance_Sheet", "Endorsement", and ...
Quan Nguyen Ha's user avatar
2 votes
1 answer
86 views

A multi label text classification problem

I'm looking to solve a multi label text classification problem but I don't really know how to formulate it correctly so I can look it up.. Here is my problem : Say I have the document ...
Yassine's user avatar
  • 35
2 votes
0 answers
62 views

Best practices to train a transformer text classifier to predict/handle unseen labels

I fine-tuned a RoBERTa sequence classifier to classify paragraphs of certain documents using labeled paragraphs only (and skipping paragraphs with no label given). The model was validated and tested ...
Arthuro's user avatar
  • 101
2 votes
0 answers
54 views

Classification Texte with naive bayes complement

Currently I am on a text classification project, the goal is to classify a set of CVs according to 13 classes. I use the bayes algorithm (ComplementNB), in my tests it is the model that gives the ...
amroun lysa's user avatar
2 votes
0 answers
350 views

Creating a Sentiment dictionary from scratch

I am analyzing Arabic textual data from a social media forum discussing economic issues such as labor unions. I am using a package that classifies as negative, positive, or neutral. For instance, the ...
maldini425's user avatar
2 votes
1 answer
1k views

How to use pre-trained word2vec model generated by Gensim with Convolutional neural networks (CNN)

I have generated a pre-trained word2vec model using the Gensim framework (https://radimrehurek.com/gensim/auto_examples/index.html#documentation). The dataset has 507 sentiments(sentences) which are ...
Angelica's user avatar

1
2 3 4 5 6