Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [natural-language]

Natural Language Processing is a set of techniques from linguistics, artificial intelligence, machine learning and statistics that aim at processing and understanding human languages.

0
votes
0answers
7 views

Getting the document-per-topic loading using TextmineR package by passing term co-occurrence matrix

I am using TextmineR package to find the most similar documents to given document list. I used the following code to generate the tcm not dtm ...
0
votes
1answer
27 views

How to use last predicted value as feature? NLP NER mission

I'm performing NER (Named entity recognition) For example: Seq: When Donald Trump announced... Tags: O B-Person L-Person O When I'm predicting ...
0
votes
0answers
6 views

Is there any technique to detect invalid data or erroneous data in a fixed column of a table through natural language processing? [on hold]

I am very new to Natural language processing. A problem is buzzing in my mind. The sample scenario is that i have CSV format dataset where I have a column named "country". In this column, some entries ...
0
votes
1answer
23 views

Supervised Learning Model in Python with Addresses [on hold]

I'm having issues wrapping my head around how exactly to go about this project. I was given a list of about 5,000 addresses that were labeled as things like "factory" and "dealer". From that, I set ...
0
votes
0answers
37 views

LSTMs and Opening/Closing Brackets

I'm training a character-level LSTM to generate molecules using the SMILES system. Each molecule is represented as a string of characters, looking something like this: Cn1c(Nc2c(Cl)ccc(CNC(=O)C(C)(C)...
0
votes
0answers
10 views

Classifying company with financial transaction data

I am trying to classify a table of financial transaction data by company, but the data I will be using as a classifier can have a lot of variation from observation to observation for transactions that ...
0
votes
0answers
13 views

R Equivalent to sklearn/TfidfVectorizer? [closed]

I want to create a document-term-matrix with tf-idf weighting in R. So far, I use the cast_dtm() function for this. In Python / sklearn, I can use the TfidfVectorizer from sklearn the following way: ...
0
votes
1answer
39 views

Which model should I try first?

I think about appropriate modelling technique in the following task: I have news texts (around 50K), and I have news topics made from the texts (250) which have various number of texts that made them ...
-1
votes
0answers
9 views

Where should i start to deal with language processing [closed]

what should i need to implement in order to process translation simultanously from one language to english in NLP python
0
votes
0answers
9 views

Modeling words in a language based on their characters

I have different sets of strings, where I assume that each set follows some rules or patterns. For example, the first character must be a number, or the 3rd and the last characters must be the same, ...
0
votes
1answer
31 views

Assign sentences to their respective topics using LDA

Is there a way to find out what sentences fall under which topic detected using Latent Dirichlet Allocation (LDA)? Assume I have already used LDA to extract topics. Now I want to determine which ...
0
votes
0answers
13 views

Types of preprocessing for Deep Learning NLP tasks

I am doing some research with Deep Learning NLP tasks. There are many ways of text preprocessing. Some are removing stop words. Others convert to lower case, do stemming, or lemmazation. Others do ...
1
vote
1answer
22 views

Confusion Matrix for multiclass classification in R

I built a multiclass (11 classes) SVM model for text classification having generated a bigram from the given text. I am trying to build a confusion matrix. The output is something like this: ...
1
vote
1answer
37 views

How does nonlinearity in neural networks find meaningful features?

I'm currently reading through the book 'Neural Network Methods for Natural Language Processing' by Goldberg and I'm confused with the following statement: The nonlinearity of the classifier, as ...
2
votes
0answers
16 views

How does Inspirobot random insprational quote generator work

Inspirobot is a website that generates random inspirational quotes. I would like to understand how this was built (training data used, algorithms used to create the sentences, etc). Please reference ...
1
vote
1answer
33 views

Clarification: text2vec, embeddings, doc2vec

I am trying to grasp the concept of word / document embeddings; I am using R as coding language, and I try to understand the text2vec package. Are the following statements about text2vec correct? ...
1
vote
1answer
49 views

How does Word2Vec ensure that antonyms will be far apart in the vector space

Broadly speaking the training of word2vec is a process in which words that are often in the same context are clustered together in the vector space. We start by randomly shuffling the words on the ...
0
votes
1answer
25 views

Negative values in word vectorizations

I am currently in the middle of reading Applied Text Analysis with Python by Bengfort, Bilbro, and Ojeda, and encountered a sentence that I've struggled to wrap my head around. In the section ...
1
vote
0answers
21 views

Deep Learning Variable Length Sequence Handling

I am trying to understand the best practice for handling different lengths of sequences in NLP tasks. Lets consider an example of convolution on sequences followed by max pool layer. We can handle ...
1
vote
0answers
16 views

How many word2vec pretrained models are available?

In my experiments with pre-trained word2vec models for NLP tasks, I have so far come across two models - one trained on Google News dataset and another which has been trained on Wikipedia text corpus. ...
0
votes
1answer
74 views

R Naive Bayes and Laplace: Even turned off, works fine with unseen words in test data?

I'm trying to better understand Laplace+1 smoothing on Naive Bayes for text classification. Using the e1071 package in R, naiveBayes() function, I get some confusing results. If I fit a model using ...
0
votes
0answers
12 views

extracting excerpts/snippets from short text

I have a problem where I need to extract snippets from an article, and also assign a tag to it, it could have multiple tag(total 5 tags). i have a labeled dataset of around 700. what would relatively ...
0
votes
0answers
13 views

Factor Graphs for Distant Supervision

Are factor graphs the state-of-the-art for relation classification with distant supervision? It seems to be the original way (Riedel et al 2010) of dealing with wrong relation mentions. Is it still ...
0
votes
1answer
11 views

CMUDict normalized for word frequency

I am trying to train a neural grapheme to phoneme (G2P) model on CMUDict, but I find that pretty soon its loss is barely decreasing. Also, when I train the model on a different similar-sized dataset (...
0
votes
0answers
34 views
+100

Spectral Clustering of a skipgram model

I have a model where I'm applying Spectral Clustering to frequencies of words. My pipeline consists in TF-IDF, followed by a <...
0
votes
0answers
11 views

What is the best model for keyphrase extraction from super long text?

I’m working on a keyphrase extraction task. The biggest difficulty of this task is that the text is very long (5000-20000 words). I’ve tried several unsupervised algorithms such as Tf-idf and TextRank ...
0
votes
0answers
7 views

State of the art in feature extraction from review text

I am working on a sentiment review classification problem and so far i have explored POS tags, synsets, N-grams, word2vec, tf-idf, doc2vec, glove and fastext vectors as features. I am wondering what ...
1
vote
0answers
12 views

How to paraphrase and augment training data for a question answering ML model?

I have only 50 question, answer pairs in my training data, where each question represent a unique intent. However, the training data is too small to build any meaningful ML model. What are the ...
0
votes
0answers
10 views

Approach for differentiating “PEOPLE” in Named Entity Recognition

I am using Spacy's pertained model to identify people in the IMDB movie reviews dataset. While the model identifies people in the reviews, I want to find out people who are characters of the movie as ...
0
votes
0answers
18 views

Clustering as a method to find and label classes for supervised learning

I'm working on a text classification project. We have around 300k documents (small, 1~2 phrases) and we don't know the set of labels or how many labels there are. The recommended approach to me was ...
1
vote
0answers
22 views

Deep Learning sentiment analysis model always predicts same class [closed]

I'd really appreciate your help as I'm not an expert in Deep Learning for sentiment analysis and I'm a bit lost. I'm using the Sentiment140 dataset: http://help.sentiment140.com/for-students First ...
0
votes
0answers
16 views

How to obtain embedded representation of single test instance after training

The first layer of my RNN is embedded layer as follows. ...
0
votes
0answers
48 views

Can cosine similarity be used to measure similarity between words?

In text mining books, I generally see cosine similarity used as a way to assess the similarity in documents; however, by transposing a tf-idf matrix, one can also calculate cosine similarity between ...
0
votes
0answers
27 views

Can recursive neural networks be used for sentence representation instead of recurrent NN ?

I know that we can generate sentence representation using Bag of words (taking the summation of the word vectors) or using recurrent neural networks (LSTM or GRU). I am new to recursive NN and NLP. Is ...
2
votes
1answer
80 views

Why does Naive Bayes work better when the number of features >> sample size compared to more sophisticated ML algorithms?

According to this article Because of the class independence assumption, naive Bayes classifiers can quickly learn to use high dimensional features with limited training data compared to more ...
1
vote
0answers
10 views

What is an appropriate Evaluation Metric and corresponding Loss function which best optimize the metric for a classification based FAQ Chatbot?

I am developing a FAQ chatbot to display/return only one correct answer in a chat window for a given question from the user. I know MRR & MAP make sense as an evaluation metric for information ...
-1
votes
0answers
8 views

How to measure word similarity using wordnet for the information content definition as detailed in Resnik 1995?

Resnik 1995 equation 3 uses count(n) to define P(c). What is count(n)? Any solved example on actual calculation would be much appreciated. Please move the question to relevant site if this doesn't ...
0
votes
0answers
14 views

Can we combine deep learning with traditional NLP for text understanding?

Is there any work about combining deep learning with traditional NLP algorithms for text or question understanding? Excuse me if my question is weird or naive, I am new to those things :)
0
votes
0answers
10 views

Filter n-grams of different lengths coming from the same instance

I tokenize two documents into unigrams, bigrams and trigrams, then merge the resulting n-gram lists per document. Then, I assign a tf-idf weight to these n-grams and keep the top 30 n-grams in terms ...
0
votes
1answer
19 views

Language model in deep learning - hard time to understand the task

I'm having a hard time to understand the task of "language model". Translate, speech, Spelling, sentiment analysis, those I understand, but what does "language model" means?! is it just the action of ...
0
votes
0answers
8 views

Word Embeddings output from same algorithm has same vector representation?

I would like to know if output of word embeddings from same algorithm has same feature orientation or not. For example, if $V_1 = [1.924,2.323,3.456]$ and $V_2 = [1.987,3.212,7.676]$ are outputs of ...
0
votes
0answers
8 views

how to convert from parsed dependency tree to sentence?

I'm exploring the enhanced dependency parser provided through Stanford coreNLP lib. Now I can successfully parse sentence into the dependencies tree. However, I wonder if there is any lib/function ...
0
votes
0answers
19 views

Using TensorFlow sentence encoder and other parameters as features in SVM

I have 150K tagged samples of technical support chats between customers and technicians. The chats are classified into 2: “resolved”/ “unresolved” sessions (66.6% and 33.3% of the distribution ...
0
votes
1answer
19 views

How to make recognition of the important document's attributes

We have a set of PDFs with the different types of documents from the various companies. The goal: to predict which of them contain some important attributes (for example, document number, customer ...
0
votes
0answers
18 views

Any AI/ML approaches for analysis of competing hypotheses?

I know there are significant development about sentiment analysis in text e.g. "x is awful", "x is bad" or "y is fantastic". But are there similar approaches to compare hypotheses? e.g. given a ...
1
vote
1answer
66 views

How to use the transformer for inference

I am trying to understand the transformer model from Attention is all you need, following the annotated transformer. The architecture looks like this: Everything is essentially clear, save for the ...
0
votes
0answers
8 views

Spreadsheet segmentation

I work on an spreadsheet segmentation/ml-based-parsing project. Input spreadsheets vary in shape and formatting to some extend. Goal is to transform any given spreadsheet into normalized database ...
0
votes
0answers
7 views

How do I perform classification on instances that are sets of chronologically ordered texts?

I hope the question gives a bit of information regarding my goal. Let me first clarify a few things by giving some background. My goal is to perform classification on a set of texts at a time, ...
0
votes
0answers
80 views

text classification: when to split into train and test

I am working on text classification model. Should I split data sets into train and test AFTER data sets is vectorized or BEFORE data sets is vectorized?? I am guessing it would be leakage if it is ...
1
vote
0answers
27 views

how can I get the probability of a given output sequence in Tensorflow Seq2Seq? [closed]

In Tensorflow seq2seq how can I calculate the probability of generation of a certain output sequence, given the seq2seq model and an input sequence? I can only get the final answer while not the ...