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
0answers
11 views

Is there a way to train pre-trained speech recognition models?

I want to use a pre-trained speech to text recognition model and train the model for audios that are conducted by the always same person having some dialect. If I correct the words in the transcript, ...
0
votes
1answer
18 views

How can I tokenize a text file with BERT or something similar?

I want to use the twitter datasets in a project and the tweet contents look something like this: ...
0
votes
0answers
15 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: ...
0
votes
0answers
13 views

Have a Large Data-set of Real-Word Cover Letters [closed]

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 ...
0
votes
1answer
13 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
14 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 ...
1
vote
2answers
34 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 ...
0
votes
0answers
16 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
0answers
16 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: ...
0
votes
0answers
9 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
votes
1answer
33 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 ...
1
vote
1answer
16 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

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
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 ...
0
votes
0answers
11 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
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
22 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
2answers
38 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
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 ...
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 ...
0
votes
0answers
30 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 ...
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 ...
1
vote
0answers
12 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
1answer
55 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 ...
0
votes
1answer
13 views

Split text into phrases of a person and an operator

I have about 5,000 texts without punctuation marks. Each text is a conversation between an operator and a person. For example: "Hello hello how can I help you how can I find out how much money I have ...
2
votes
1answer
22 views

What are machine learning/deep learning models for generating contextually related words and synonyms?

I have a task to work on models for finding synonyms and contextually related words. For example, if I enter: 'car' it should generate -> 'vehicle' 'sun' and 'sea' could generate 'beach', or some ...
0
votes
0answers
15 views

How to find out what each of the layers in NN does?

I have a very simplified view of Neural Networks - you give it input and expected output, and all the rest is a black box. Is it possible to find out, especially in language models, what each layer ...
0
votes
0answers
10 views

Calculating only document frequency or only term frequency from TF-IDF

I have a large corpus of documents (multiple sentences per document), and am trying to find words that appear in some majority of documents (to then filter them out of a future analysis). Since I'm ...
0
votes
0answers
16 views

Convert a pandas df with text to embedding matrix efficiently

What is the most efficient way of converting a pandas data frame with approx 5 000 000 rows, where there exists short texts in one of the columns to an embedding matrix? I am using the HuggingFace ...
0
votes
0answers
34 views

why does adding an LDA document vector with a word2vec word vector work well in LDA2vec?

In LDA the document weight vector represents the "weights" of each topic in the document. I think it's also valid to say, each row in the document vector corresponds to a word in the document, the ...
1
vote
0answers
23 views

Remove subwords from BERT output

I'm trying to build a multilingual WSD system with BERT on top as the embedding layer. In order to have better performances, after BERT finishes its job (and performs Transfer Learning), I need to ...
1
vote
0answers
11 views

Featurization for Relation Extraction using Support Vector Machine(SVM)

Regarding Relation Extraction using SVM paper(https://www.researchgate.net/publication/225671271_Relation_Extraction_Using_Support_Vector_Machine)I am looking for any code references on how to make ...
1
vote
0answers
13 views

Practical example and working of Laplace Smoothing or Linear Interpolation in Natural Language Processing (NLP)

Let us suppose we have a document where total_words = 50 (for example -> is,the,now,is,am,here,now) total_unique_words = 40 (for example -> is,the,am,here,now) How can we apply the ...
0
votes
0answers
6 views

How to use regularizer in AllenNLP?

Apology if this sounds a bit lame. I am trying to use Allennlp for my NLP tasks and would like to use regularization to reduce overfitting. However from all the online tutorials, all the regularizers ...
0
votes
1answer
17 views

Split into test and train set before or after generating document-term matrix?

I'm working on simple machine learning problems and I trying to build a classifier that can differentiate between spam and non-spam SMS. I'm confused as to whether I need to generate the document-term ...
1
vote
0answers
17 views

Real-life applications/examples of transfer learning approaches

I recently read a nice, informative paper titled 'A Survey on Transfer Learning'. It mentions 3 settings of transfer learning - inductive, transductive, and unsupervised. At the same time, it states ...
0
votes
1answer
26 views

Use embeddings to find similarity between documents

I need to find cosine similarity between two text documents. I need embeddings that reflect order of the word sequence, so I don't plan to use document vectors built with bag of words or TF/IDF. ...
0
votes
1answer
28 views

Select best answer from several existing ones for a question

After analyzing questions on a forum, a human support team has created a set of general answers, that can be used to provide basic answers on the forum. I am trying to build a system that: Selects ...
0
votes
0answers
13 views

What algorithm to use for finding artists/bands in text and differentiating between artists that share the same name

Here's the data I have: Text from articles from various music blogs & music news sites (title, summary, full content, and sometimes tags). I used a couple different NLP/NER tools (nltk, ...
1
vote
0answers
19 views

Character-level embeddings in python

I'm working on an NLP task that requires the use of character level embeddings, and I've been trying to use Spacy. However, it seems that spacy uses word-level embeddings for the word vectors, and I ...
0
votes
1answer
11 views

How to identify new job descriptions/postings from a set of documents when I have a set of already labeled job descriptions/postings

Suppose I have a set of already labeled documents -- some of them are job descriptions/postings (these are documents of interest), and some of them are not. I wonder what kind of method would allow me ...
0
votes
0answers
24 views

Short text data set for classification & active learning project

I am looking for datasets that contains sentences/ very short documents for a project in the field of active learning in text classification. I've looked on yelp / imdb reviews dataset but the ...
4
votes
2answers
73 views

Why does vanilla transformer has fixed-length input?

I know that in the math on which the transformer is based there is no restriction on the length of input. But I still can’t understand why we should fix it in the frameworks (PyTorch). Because of this ...
1
vote
1answer
23 views

Attention to multiple areas of same sentence

Lets consider some sentences below: "Datascience exchange is a wonderful platform to get answers to datascience related queries and it helps to learn various concepts too" "Can company1 buy company2? ...
1
vote
0answers
14 views

Seq2Seq for sentence correction

I have a task in hand where I get a dirty formed sentence and need to correct it. Examples are, "StackOverflow best question answering platform" to be converted to "StackOverflow is best question ...
3
votes
2answers
192 views

Building a tag-based recommendation engine given a set of user tags?

Basically, the idea is to have users following tags on the site, so each users has a set of tags they are following. And then there is a document collection where each document in the collection has a ...
1
vote
2answers
40 views

Degree of Profanity in a Sentence [closed]

Given a comment or a sentence and a list of profane words, How do I write a program to print the degree of profanity in that sentence?

1
2 3 4 5
26