Questions tagged [text]

Text is a type of data often used in data science projects involving natural language processing.

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

Predicting whether or not text is of a specified topic (topic defined by key words and phrases)

I was looking into binary classification methods for classifying whether or not a given text is related to a topic that is defined by given key words and phrases (e.g. the topic is meals and key ...
0 votes
0 answers
15 views

Unstructured Text Prediction

I have a question regarding a real-world problem on medical data. I have an input and output dataset which looks like this: Input Output Patient is sick with fever Prescribe Panadol and tylenol ...
0 votes
0 answers
13 views

Text analysis - "interpret" bag of words

I wanted to try to create a machine learning tarot card reader. Setting up a simulated draw of tarot cards and their associated meanings is straight-forward enough. However, the listed applications I ...
0 votes
1 answer
11 views

Using relative or absolute frequencies to estimate group differences in texts

My objective is to estimate differences between how five political parties use moral words in their tweets and speeches. To that end, I have a dictionary that I pass to each tweet text / audio ...
1 vote
1 answer
23 views

Next-word Generation in Tabular Dataset

I'll build next-word generation using Tensorflow to predict address mapping. But, I saw many tutorial, next-word generation use long-text narration for its training dataset. But, I have dataset ...
  • 41
2 votes
2 answers
499 views

Suggestions for guided NLP online courses - Beginner 101

I would like to know from the data science community here for suggestions on nlp courses. I am new to NLP area and would like to take up a course which covers from basic to advanced concepts such as ...
  • 2,337
0 votes
0 answers
8 views

Article extraction from newspapers

Currently I'm working on a task that involves having a page of a news paper and putting bounding boxes around each individual article.The first approach I thought of was using visual features to ...
1 vote
1 answer
39 views

How to calculate Pointwise Mutual Information (PMI) when working with multiple ngrams

Pointwise Mutual Information or PMI for short is given as Which is the same as: Where BigramOccurrences is number of times bigram appears as feature, 1stWordOccurrences is number of times 1st word ...
0 votes
0 answers
13 views

Can I get un-normalized vectors from the TF USE model?

I'm using this Universal Sentence Encoder (USE) model to get embeddings of a set of texts, each text corresponding to a newspaper article. In order to build a Recommender System, I generate user ...
1 vote
1 answer
22 views

What is the logic/algorithm behind 'did you mean' suggestion by search engines, command suggestion in command prompt like git?

For eg. https://stackoverflow.com/questions/307291/how-does-the-google-did-you-mean-algorithm-work this is the logic behind google's did you mean algorithm - used for spell correction suggestion. What ...
  • 11
3 votes
1 answer
34 views

NLP text representation techniques that preserve word order in sentence?

I see people are talking mostly about bag-of-words, td-idf and word embeddings. But these are at word levels. BoW and tf-idf fail to represent word orders, and word embeddings are not meant to ...
  • 359
0 votes
0 answers
22 views

How to convert a string variable containing comments to a variable with integers to be used in neural networks?

I am working with data contains comment variable like imdb data. ...
1 vote
1 answer
42 views

How to down\up sample text?

I have data set of 5566 samples - one column is the text of the recipe description and the other is what tax class is it. I wish to make a classifier that would classify receipts using ML only. I have ...
0 votes
0 answers
8 views

Removing footers from text scraped from news sites

I am wondering if anyone knows of libraries out there that will remove footer material from text scraped from news sites, like the material in italics below: “Go, I’ll catch up with you,” the woman ...
  • 101
1 vote
1 answer
68 views

Find best features for text classification with Countvectorizer Python

I'm facing a text classification problem where the algo is human-made but impacted by keywords. Hence I can't use any ML model but I certainly can take a data-science driven approach to find the best ...
  • 113
1 vote
1 answer
15 views

Partially labelled open-class classification problem with heavy overlap

Let's say we have a corpus of text, including discussions about movies and about sports. Unsupervised clustering would typically cluster into the two topics of discussion. However, we are interested ...
1 vote
1 answer
65 views

Matching 2 keywords list using NLP

I have two lists and I want to identify which elements are common (same or similar in meaning or context) in the list. Which NLP algorithm we should use. ...
0 votes
2 answers
568 views

How to set vocabulary size, padding length and embedding dimension in LSTM network?

Usually in a LSTM network, we have certain parameters that need to be set before the model can begin training. I am specifically talking about vocabulary size, padding length and embedding dimension. ...
  • 1,293
0 votes
1 answer
75 views

Keywords extraction for business rule text classification

I would like to classify texts without using any ML model. My idea is to find a list of keywords that I would assign to each class. Then when I need to classify a new text, I can compare it with my ...
  • 113
1 vote
1 answer
131 views

Why not rule-based semantic role labelling?

I have recently found some interest in automatic semantic role labelling. Most introductory texts (e.g. Jurafsky and Martin, 2008) present approaches based on supervised machine learning, often using ...
0 votes
0 answers
10 views

How to generate syntactically correct text for CRNN-CTC text model?

Disregarding the image creation and labeling details, is there a way to generate syntactically correct text examples? As of my current understanding of the CTC model, it takes into consideration the ...
  • 101
0 votes
0 answers
114 views

Text classification length

I have a set of text examples I need to learn as class A, and they are of varying lengths, say 10 sentences to 1 sentence long. I have to parse a document to find those strings of text that match one ...
  • 115
0 votes
0 answers
29 views

Fake News Detection Classifier approach

I have the dataset related to any domain like sports, entertainment, politics, etc. I just want to know that the approach I am using for fake news detection is valid or not. As I do not want to use ...
  • 219
0 votes
0 answers
13 views

Handwritten Text Recognition with different char set

I was trying to understand how Handwritten Text Recognition works but here I am. I did a lot of research but still, I couldn't exactly understand how will HTR architectures work even with different ...
0 votes
0 answers
73 views

NLP conversation data - Pre-processing steps

I have text data, so data that has been transcribed from conversations from employees to customers. So each call has a recording that has been transcribed to text. I am looking to do some analytics ...
5 votes
1 answer
777 views

How to evaluate the similarity of two columns containing strings?

I am new to text processing and stuck on a problem to identify the similarity of columns. To detail the problem, consider we have two columns with string values: ...
0 votes
0 answers
26 views

Problem Direction - Text Data - Conversation Classification

The problem I have a problem where I have text data that has been transcribed from a conversation. These conversations have been marked as a pass or fail in terms of compliance by a person, ie they ...
0 votes
0 answers
29 views

How do I work with noisy real world text data for text classification?

I have a topic classification model built upon Bert, when I deploy my model people input strings of a random nature like : "aaaaaa" "aaa bbb" "ab ab ab" and so on. My ...
0 votes
1 answer
37 views

Working with three types of data: numeric (integer, floats), images, and text for prediction

So I have three types of data (in title) and am wondering how I can combine the data. The target is numeric (price). My idea is to perform feature extraction on both the images and text, which would ...
1 vote
1 answer
54 views

Topic modelling on long documents: intra document clustering first

I have a collection (around 1000) of very noisy, similar documents, that are each very long (>10 pages - 600 paragraphs) with multiple subsections - I want to perform topic modelling across the ...
2 votes
0 answers
23 views

Classifying short strings of text with additional context

I have a list of short strings each identifying a city. Misspellings are very common. The example below shows some of these short strings, along with the correct city they're supposed to match. ...
  • 165
2 votes
1 answer
1k views

How to impute missing text data?

Lets say I have a dataframe consisting of two text columns. By text, I mean the values in those columns are either sentences/paragraphs. In such a case, how do I handle missing 'NaN' values? If it ...
1 vote
1 answer
50 views

How to find the probability of a word to belong to a dataset of text

I have two text datasets, one with people that have a certain medical condition and another of random patients. I want to figure out what words are more likely to show up in the dataset with that ...
  • 261
1 vote
1 answer
21 views

Performance measurement of an event extraction system

I have developed an event extraction system from text documents. It first clusters the data corpus and extracts answers for what, when and where questions. Final answers are determined by using a ...
0 votes
1 answer
658 views

ValueError: Layer model expects 2 input(s), but it received 3 input tensors using generator

I am trying to fit a model using generator function and I get the following error: ...
4 votes
1 answer
55 views

encoding of text data in NLP

I'm getting data using web scraping to create a dataset. I have a 'company' column that contains the names of the companies. I would like to encode this column but i don't know how to find the ...
  • 43
1 vote
1 answer
352 views

Cluster words into groups of similar meaning (synonyms)

How can words be clustered into groups of similar meaning (synonyms)? I started with pre-trained word embeddings (e.g., Google News), which is great, but not perfect - a limitation arises because the ...
  • 131
0 votes
0 answers
38 views

Effective way to find similarity between utterance(short text) and question(long text)

The challenge I have is a bunch of questions(long text) that are closely matching with an user utterance (short text). I have tried cosine similarity & Tf-iDF, BM25,Jaccard similarity, etc., but ...
0 votes
1 answer
269 views

Advantages of CNN vs. LSTM for sequence data like text or log-files

When do you tend to use CNN rather than LSTM (or the other way round) in classification or generation tasks of sequential data like text or log-data? What are the reasons for the decision and what ...
0 votes
1 answer
55 views

How to identify the feature that make the model misclassifed in text classification

Hi I am working on social media financial THAI text classification, the problem with this one is the confused classes, the misclassified prediction has a pattern that consistent as a pair. and I want ...
0 votes
0 answers
22 views

text elaboration with neural network non natural language

I'm trying to understand if it's possible to elaborate with the neural network 2 input strings and predict a result string. I'm doing this job manually and it's really time consuming: basically i have ...
0 votes
1 answer
141 views

Word embedding for a single word

I want to tackle email similarity with a word embedding approach, not an expert in embedding text but it is possible to embed emails where similar emails have similar vectors? is that okay?. I know ...
0 votes
1 answer
84 views

How to remove irrelevant text data from a large dataset

I am working on a ML project where data were coming from a social media, and the topic about the data should be depression under Covid-19. However, when I read some of the data retrieved, I noticed ...
3 votes
1 answer
486 views

Extract date/duration from text

The text and output to be extracted are similar to the following : "Check it every two weeks" - two weeks "Check it on day 1 and day 14" - day 1 and day 14 "day 19 and day ...
0 votes
0 answers
1k views

Excel error may be caused by pandas writing or big data? advise needed

I am reading multiple xml files extracting some data then forming a pandas Dataframe with my data. These are the main steps that I do: open an xml file extract some elements create a pandas dataframe ...
  • 1
-1 votes
1 answer
42 views

How to specify a location for text in a graph plotted by Python?

I would like to plot a graph of actual and predicted values with Python after doing a regression. I used the following codes. However, the text "R^2=0.91" is placed on the right hand side ...
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 ...
  • 111
1 vote
1 answer
25 views

How to Identify Repeating Data Entries when the Repeated Entries are Spelled or Constructed Differently

I have a dataset of entries and a variable for the owner of the entry. Some of these people occur more than once. However, the names are sometimes written differently. I want to eventually be able to ...
  • 13
1 vote
1 answer
20 views

Model to detect specific semantic content without labeled data

I want to build a model that can detect sentences that discuss requests for communication - like 'email me', 'phone us', 'contact us', etc. However, I do not have any labeled data which I can use to ...
  • 149
0 votes
1 answer
52 views

Python to clean miswritten words with repetitive letters such as "wwwwooorrrrddss" to "words"

When cleaning text-data in Python3 for NLP, are there are any 'common practices' when it comes to addressing repetitive letters in words such as "wwwwooorrds" to "words", or "...
  • 113