Questions tagged [nlp]

Natural language processing (NLP) is a field of computer science, artificial intelligence, and linguistics concerned with the interactions between computers and human (natural) languages. As such, NLP is related to the area of human–computer interaction. Many challenges in NLP involve natural language understanding, that is, enabling computers to derive meaning from human or natural language input, and others involve natural language generation.

Filter by
Sorted by
Tagged with
0
votes
2answers
31 views

Does the transformer decoder reuse previous tokens' intermediate states like GPT2?

I recently read Jay Alammar's blogpost about GPT-2 (http://jalammar.github.io/illustrated-gpt2/) which I found quite clear appart from one point : He explains that the decoder of GPT-2 processes input ...
0
votes
1answer
40 views

Getting error when trying retrieve polarity from russian sentence Polyglot(Python)

I trying to retrieve polarity from Russian sentence, using this code: from polyglot.text import Text as T print(T("ты не понимаешь").polarity) But I get the ...
0
votes
0answers
11 views

Transformers and BERT: dealing with possessives and apostrophes when encode

Let's consider two sentences: "why isn't Alex's text tokenizing? The house on the left is the Smiths' house" Now let's tokenize and decode: ...
2
votes
1answer
51 views

How to compute unseen bi-grams in a corpus (for Good-Turing Smoothing)

Consider a (somewhat nonsensical) sentence - "I see saw a see saw" The observed bi-grams would be: "I see""see saw""saw a"and,"a see". My aim is to smoothen out the probability mass of the bi-gram ...
0
votes
0answers
13 views

Have a Large Data-set of Real-Word Cover Letters

I recently launched a web app that does a basic analysis of cover letters. Not linking it here because I don't want this question to be about promotion. I use very basic NLP to tell users insights ...
1
vote
2answers
22 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 ...
3
votes
1answer
87 views

Is it a red flag that increasing the number of parameters makes the model less able to overfit small amounts of data?

I'm training a deep network (CNN-LSTM-CRF) for Named Entity Recognition. Is there a reason that increasing the number of parameters would make the network less able to overfit a small training set (~...
0
votes
0answers
6 views

What should return doc.ents if the doc have no entities, in spacy?

I want to answer this question: "How many sentences contain named entities given a doc?" and I have this piece of code as solution ...
1
vote
0answers
13 views

Preparing text for modeling in dialogue structure

I'm working on implementing the DialogueGCN code from this paper. Its a model that classifies the 'emotion' from utterances of text within a conversation. As this model takes into account speaker ...
0
votes
1answer
47 views

When one model is superior in real world use?

I have an NLP neural network that I have developed with Keras for multi-label classification. I have fit the model several times and save the best results (via best validation accuracy score) after ...
3
votes
2answers
5k views

What are useful evaluation metrics used in machine learning

I am using CNN in order to predict codes after analyzing text. As an example, I will write "I am crazy" .. the model will predict some code " X321". All this based on CNN. I want to evaluate my ...
0
votes
0answers
15 views

All the classifiers have the same score

I'm trying to implement a classifier for text analytics but all the classifiers get the same accuracy_score. All of these are sklearn implementations. What am I doing wrong ? ...
0
votes
1answer
103 views

The memorisation capacity of an LSTM (real numbers)

My question is the following: It is known that a LSTM can remember sequences of one-hot encodings which represent integers (i.e. output $x_1, ... x_n$ after receiving $x_1, ... x_n$ as inputs, $x_k \...
0
votes
0answers
12 views

NLP - Simple approach to identify commonalities in text comments between people

For something we are working on, we were looking for a simple way to compare from review/feedback data against a question (for which there are multiple responses from multiple people), the following: ...
-1
votes
1answer
27 views

Why does backtranslation work for Neural Machine Translation whereas it decreases for Statistical Machine Translation? [closed]

I trained both of the systems SMT and NMT. In the first case(SMT), it decreases translation quality over baseline and it increases in the second one(NMT). I've also gone through some of the works and ...
0
votes
1answer
13 views

Using MultiLabelBinarizer for SMOTE

This is my first NLP project. I'm trying to use SMOTE for a classifier with 14 classes. I need to convert the classes into an array before using SMOTE. I tried using MultiLinearBinarizer but it does ...
0
votes
1answer
35 views

Identify specify areas in the text

I'd be interested in identifying various areas in the text message. Let's say I have a text containing some introduction, then there is a poem and at the end there are some urls to some web pages. I'...
0
votes
1answer
50 views

How to deal with name strings in large data sets for ML?

My data set contains multiple columns with first name, last name, etc. I want to use a classifier model such as Isolation Forest later. Some word embedding techniques were used for longer text ...
0
votes
1answer
31 views

What model is recommended: I am using text features in a regression and want to interpret coefficients

I am using the text of comments on a forum to predict how many upvotes it will get. I want to be able to say, "Reviews with X, Y, Z words are more upvoted". So to do this, I want to use text features ...
0
votes
0answers
8 views

How should we cut the long text into different sections for GPT-2 ? Do we use [PAD] to ensure the complete sentence included?

For GPT-2 model (I believe same for BERT) we need to cut the long text into fixed length for pre-training. Just wondering the details of how this should be implemented. Do we need to cut the text ...
1
vote
1answer
14 views

Can you use two different datasets as train and test sets with countVectorizer and test_train_split?

So I managed to run my code on a combination of train data and validation data, but now I need to create a text file that contains the predictions for the test data and I just don't understand how. Is ...
0
votes
1answer
16 views

Changing word inflections

This might be an unusual question. I have a situation where I am creating paraphrases with a rule based system. One transformation that I'd like to implement would one that gets rid of light verbs, ...
0
votes
0answers
10 views

How effective would this pseudo-LDA2Vec implementation be?

For my site I'm working on a chat recommender that would recommend chats to users. Each chat has a title and description and my corpus is composed of many of these title and description documents. I ...
1
vote
1answer
380 views

Memory error - Hierarchical Dirichlet Process, HDP gensim

I am running Hierarchical Dirichlet Process, HDP using gensim in Python but as my corpus is too large it is throwing me following error: ...
0
votes
0answers
10 views

Difference between using BERT as a 'feature extractor' and fine tuning BERT with its layers fixed

I understand that there are two ways of leveraging BERT for some NLP classification task: BERT might perform ‘feature extraction’ and its output is input further to another (classification) model ...
0
votes
0answers
6 views

to train a NER model Would you make corpus case-sensitive or not? [closed]

to train a NER model Would you make corpus case-sensitive or not?
0
votes
0answers
7 views

Are there any question/answering dataset besides Squad 2.0 which have 'no answer'/'impossible' questions?

I am looking at training models to detect if a question cannot be answered from the context. Are there any datasets besides squad 2.0 which does this? Edit: So far I found NewsQA https://www....
0
votes
1answer
19 views

Word2Vec Implementation

In word2vec why is the implementation of likelihood function multiplication of probabilities of finding a neighbouring word given a word? I didnt get why the probabilities should be multiplied.Is ...
0
votes
0answers
12 views

How to detokenize a BertTokenizer output?

For example, let's tokenize a sentece "why isn't Alex' text tokenizing": ...
0
votes
0answers
11 views

What are the advantages of combining BiLSTM and CRF?

BiLSTM-CRF is a common model for sequence tagging (POS tagging, NER, ect.). What are the advantages of combining BiLSTM and CRF? What is the role of each one of the parts in this combination?
0
votes
0answers
15 views

Further Classification by function [closed]

I am a bit confuse and stuck at a problem, may be someone can guide me in right direction I am doing an analysis and have 3 datasets, supporting, against and neutral, or in simple say negative, ...
0
votes
1answer
20 views

What is the best way to encode an arbitrary collection of strings into int categorical variables?

I have a bunch of categorical labels which I want to transform into int categorical features for an ML algorithm. The problem is I don't have a prior list of the categories, so that I can't just ...
2
votes
2answers
102 views

Using nlp to analyze accident report

I want to use Natural Language Processing to analyze traffic accident reports and from the text determine two things: Direction of vehicle travel (just compass directions like north, southeast, etc.)...
0
votes
1answer
383 views

Knowing Feature Importance from Sparse Matrix

I was working with a dataset which had a textual column as well as numerical columns, so I used tfidf for textual column and created a sparse matrix, similarly for the numerical features I created a ...
1
vote
1answer
38 views

Build text complexity model based on complex examples

I try to build the user specific model which predicts whether arbitrary English text is complex for particular user or not. Having the complex and easy text samples allows to build such model but what ...
0
votes
0answers
7 views

Looking for suggestions on performing Sementic Analysis of ASR text

Currently I am working on a project where I have ASR on which I am performing semantic analysis to extract meaning out of it. The ASR text contains huge amount of vague conversational text which needs ...
0
votes
1answer
38 views

How to utilize dictionary data set for text classification?

I have a dataset similar to newsgroup20 for classification. With the training dataset, I have a dictionary data set that explains some jargons in the training dataset. These both are different data ...
1
vote
1answer
18 views

Determining number of clusters in high dimensions

I am doing KMeans clustering for sentence embeddings and my problem is the number of clusters. In general, feature size is an order of a few hundreds (in this case 768) and my concern is the sparsity ...
21
votes
5answers
23k views

How can I get a measure of the semantic similarity of words?

What is the best way to figure out the semantic similarity of words? Word2Vec is okay, but not ideal: ...
0
votes
0answers
29 views

Multiple choice gap-fill question (with distractors) dataset for evaluating NLP algorithms

I am looking for a standard gap-filling multiple-choice exercise (with distractors) dataset that can be used to evaluate the NLP gap-filling ML algorithms. I expect the dataset to contain questions ...
2
votes
1answer
52 views

Predicting the missing word using fasttext pretrained word embedding models (CBOW vs skipgram)

I am trying to implement a simple word prediction algorithm for filling a gap in a sentence by choosing from several options: Driving a ---- is not fun in London streets. Apple Car Book King With ...
1
vote
0answers
18 views

Semi-Supervised Learning using NLP

I am working on a drug reaction problem in which I need to extract tweets and label the tweets (binary-reaction due to drug or not). But since I don't have domain knowledge, and clustering would also ...
0
votes
1answer
43 views

How can I find synonyms and antonyms for a word?

I found some code online where I can feed in a word, and find both synonyms and antonyms for this word. The code below does just that. ...
0
votes
1answer
39 views

Accessing Flask WS APIs over intranet -

I have 2 scripts - A.py and B.py, and both are Flask apps. A.py renders a web page and acts as my UI taking inputs from user. B.py is hold the main logic and has a web service API being called by A.py....
1
vote
0answers
11 views

Using NLP in already analysed text,

I have serveral text files. These files has been analysed through some analytical tool and provided main features There each feature extracted has one repetition I know to use predictive modeling ...
2
votes
0answers
622 views

Preprocessing for Text Classification in Transformer Models (BERT variants)

This might be silly to ask, but I am wondering if one should carry out the conventional text preprocessing steps for training one of the transformer models? I remember for training a W2V or Glove, ...
1
vote
1answer
24 views

Computer science corpus for training a language model

I am looking for a domain specific computer science corpus of at least 20M words (preferable >50M words), for the purpose of training a language model in it. Is there anything out-of-the box that I ...
0
votes
1answer
43 views

Clause type classification

We would like identify similar text (clauses) on a contract based on a trained corpus. For instance: Contract - small sample ...
0
votes
1answer
55 views

NLP: Mapping Penn treebank and Brown corpus, to Universal PoS Tags

I am experimenting with NLP and PoS tagging. I wish to build a large corpus, composed of Penn Treebank and Brown corpus, and possibly even more. Unfortunately, their PoS tags are not compatible. Is ...

1
2 3 4 5
26