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
1answer
127 views

Spacy Text classification (Binary Classification)

I have a dataset of two folders. One of them contains the documents(text, pdfs) related to personal information (like name,email,address etc), the other contains non-personal information. I have to ...
0
votes
0answers
11 views

Encoding numbers and words

I am fairly new to seq2seq models in nlp and just really learned about them. Anyway, in many of the examples, I have seen there has been to approaches to providing a model with data. One in which is ...
0
votes
0answers
14 views

What is the impact of <unk> token to quality of machine translation (BLEU)

i've read some papers about machine translation. Authors usually define a threshold to limit vocabulary to minimum rare words and replace rare words into token. So the question is if we increase the ...
1
vote
1answer
52 views

Word2Vec - document similarity

Lets say I have text data for different documents from 2005 - 2015. I want to compare the similarity between $t$ and $t-1$ documents. So I take the document at 2006 and compare it with the document at ...
0
votes
1answer
28 views

real word dataset on company full name with commonly used short name

I am involved in a work where i have to recognize company when user does not provides its full legal name. Database only has full legal name which is rarely used by human user. Like no body calls ...
0
votes
0answers
381 views

Facing this issue while predicting “CountVectorizer - Vocabulary wasn't fitted”

#these are classifier and vectorizer vectorizer = CountVectorizer(tokenizer = spacy_tokenizer, ngram_range=(1,1)) classifier = LinearSVC() I have created a ...
0
votes
0answers
10 views

Not able to sentence encode a list of sentences using multiprocessing technique - pool.map() function in python

I am trying to embed a text data which is in the form of list, since its a huge data I wanted to embed it using the multiprocessing Pool map() function. The embedding technique I'm using is google's ...
1
vote
0answers
261 views

In a Transformer model, why does one sum positional encoding to the embedding rather than concatenate it?

While reviewing the Transformer architecture, I realized something I didn't expect, which is that : the positional encoding is summed to the word embeddings rather than concatenated to it. ...
2
votes
1answer
1k views

How to train a spacy model for text classification?

Can i know the way or steps to train a spacy model for text classification. (binary classification in my case) Please help me with the process and way to approach.
1
vote
1answer
26 views

Why is hard for neural machine translation model to learn rare words?

i'm kinda new with neural machine translation. I've read some papers, authors usually limit the size of vocabulary by replace rare words by unk token. In this paper, they said that "...NMT model ...
2
votes
0answers
30 views

pros and cons of lexical vs machine learning methods for text mining

I wanted to know what are the pros and cons are of using lexical methods and machine learning methods for classifying texts based topic. I have used a simple method of mining documents related to a ...
0
votes
1answer
17 views

Does the mean/median of a set sentence embedded vectors represent anything?

Please bear with me as I am new to NLP. I am specifically using tensorflow's universal sentence encoder: https://tfhub.dev/google/universal-sentence-encoder-large/3 I am clustering text based on the ...
0
votes
1answer
116 views

Does gensim use Negative sampling in Word2vec?

When I train a word2vec model in Gensim on a huge amount of words/data (let's say hundreds of thousands of word vectors), is gensim using negative sampling automatically? Alternatively, is there a ...
1
vote
0answers
29 views

Grouping paragraphs of text by type

I'm trying to parse some text, and extract data from it. Typical NLP problem. However the text contains different sections, and I know that the keywords of interest are in specific sections, but all ...
0
votes
1answer
17 views

Is it normal when BLEU score on filtered data by length is greater than BLEU score on whole data

I am creating 2 neural machine translation model (model A and B with different improvements each model) with fairseq-py. When I evaluate model with bleu score, model A BLEU score is 25.9 and model C ...
1
vote
1answer
28 views

n-gram Model - Why Smoothing?

I am creating an n-gram model that will predict the next word after an n-gram (probably unigram, bigram and trigram) as coursework. I have seen lots of explanations about HOW to deal with zero ...
0
votes
0answers
63 views

Test case generation from user stories using NLP and NLG

I have an existing database with User stories (with multiple text fields like Description with Use cases, acceptance criteria etc) and corresponding test cases with steps for each test case. I am ...
0
votes
1answer
16 views

Extract Domain related words

I am doing a research regarding on automatic text summarizing. So in order to weighting sentences I need to get words related to a particular field or domain like shown below. ...
2
votes
0answers
150 views

SpaCy vs AllenNLP?

I have used a little of both spaCy and allenNLP in my NLP projects. I like them both as they work very well with PyTorch (my DL framework choice!). But, I still cannot decide which one to master in a ...
4
votes
1answer
395 views

Autocomplete with deep learning

I got interested in autocompletion using deep learning and tutorials that I found where conditioned always on specific number of characters (given 40 characters predict the next character or the whole ...
1
vote
1answer
60 views

NLP - Identify Tagged Words

Please pardon me as the title might not be very accurate I am trying to create a model that learns the word representation and then is able to predict word representation in another piece of text. An ...
0
votes
0answers
410 views

BERT or ELMo for Document Similarity

Does anyone use BERT or ELMo language models to determine the similarity between two text documents? My question aims to collect all possible ways for combining the contextual word embeddings ...
0
votes
0answers
80 views

Document similarity over years: TF-IDF Word2Vec, gensim

I have two documents one at time $t$ and the other at time $t+1$. I individually calculate the TF-IDF of both documents and store my results into a document term matrix. I can load both the document ...
0
votes
0answers
18 views

How to train a language model with bi lstm layers?

I am trying to understand how to train a LM using bi-LSTM in the case with "stack of bi LSTM". In the case of forward LSTM, we just need to add a classification layer on the top of the last hidden ...
0
votes
0answers
31 views

Why gpt-2 could apply to other tasks without fine-tune?

Language Models are Unsupervised Multitask Learners https://github.com/openai/gpt-2
0
votes
0answers
54 views

Advice for making word vectors from a custom corpus

I'm working to train custom word vectors on a corpus built from my company's support tickets (using gensim). I've made some strides in getting that corpus to consist primarily of natural language (...
1
vote
0answers
23 views

Android: NLP library for date recognition in string

I am currently working on an android app which should make appointments automatically by reading the incoming messages from your mobile phone. I've managed to create a service which monitors the ...
0
votes
0answers
16 views

NLP - focus on area of interest in document

I am looking to find some areas of interest in a document. I have one sentence which I need to compare with all paragraphs in the document and based on the most near match I need to choose those ...
1
vote
1answer
17 views

Extracting information with corresponding fields

I have large pool of scanned county documents. I need to extract information like document title, borrower name&address, lender name&address etc. The text is like this Eg: the deed of trust,...
0
votes
1answer
21 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
1answer
29 views

Ways of filtering erronous email addresses using NLP?

Background: I have a database of user information, in which they registered through a website. Objective: I would like to filter out erroneous emails, not by if it is malformed (i.e. it's missing ...
0
votes
0answers
27 views

How is tokenization done in pretrained word2vec models supplied by Google

I came across the pre-trained word2vec supplied by google at https://code.google.com/archive/p/word2vec/ (https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit?usp=sharing) this gives a ...
2
votes
0answers
56 views

Predicting word from a set of words

My task is to predict relevant words based on a short description of an idea. for example "SQL is a domain-specific language used in programming and designed for managing data held in a relational ...
2
votes
1answer
104 views

Data Extraction from images using NLP and ML [closed]

Hi i'm trying to extract data like name, planType, phone#, .. from images like insurance cards or licence cards with GoogleVision / Textract using some conditions but it does not extract the correct ...
1
vote
3answers
117 views

Word embedding of a new word which was not in training

Let's say I trained a Skip-Gram model (Word2Vec) for my vocabulary of size 10,000. The representation allows me to reduce the dimension from 10,000 (one-hot-encoding) to 100 (size of hidden layer of ...
1
vote
1answer
34 views

Predicting similarity between nouns like university names and tech companies?

I am trying to extract entities like university studied at and tech companies from resumes , I have a list of popular universities and companies and I want to find out which university best matches ...
0
votes
1answer
61 views

Transformer for neural machine translation: is it possible to predict each word in the target sentence in a single forward pass?

I want to replicate the Transformer from the paper Attention Is All You Need in PyTorch. My question is about the decoder branch of the Transformer. If I understand correctly, given a sentence in the ...
1
vote
0answers
15 views

Weight of Vectors - doc2vec

Let's assume I have a number of different documents. I used doc2vec to generate a vector per document. So after plotting it with ...
2
votes
1answer
70 views

Xgboost multiple class predictive performance beats one versus rest

I have an NLP task I'm tackling with xgboost (R implementation). Before describing my doubt I'll give you some background: I have a corpus of documents for which I did topic discovery, using a term ...
1
vote
1answer
37 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 ...
1
vote
0answers
18 views

Is there a python library for reformatting names?

I have a list of several hundred thousand electrical assets named in multiple databases which I am trying to reformat to fit into a universal naming convention. I know I could solve this problem ...
2
votes
2answers
68 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
33 views

Is there any library available for balancing imbalanced text dataset?

I have a text dataset similar to newsgroup dataset, the problem with the dataset is that it is highly imbalanced. So is there any readily built library that will do upsampling or downsampling with a ...
0
votes
0answers
70 views

training decoder only transformer for text generation

i have been trying to figure out a way to use the decoder for next word prediction tasks (given a sequence of tokens). For this purpose i modified the existing tutorial to ignore encoder inputs in the ...
0
votes
1answer
31 views

Do word embeddings help with out of vocab tokens?

I am performing sentiment analysis on a custom dataset of text with Keras but am a little confused about word embeddings. I have been able to train an "Embedding" layer and have also learned to load ...
0
votes
1answer
31 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
0answers
88 views

Embedding dimension size for a custom Word2Vec?

Are there any guidelines for choosing the embedding dimension size value in a custom Word2Vec embedding? I know that the default is 100 and that seems just as good as any. But I'm wondering if there ...
3
votes
1answer
387 views

How to add a CNN layer on top of BERT?

I am just playing with bert (Bidirectional Encoder Representation from Transformer) Research Paper Suppose I want to add any other model or layers like Convolutional Neural Network layers (CNN), Non ...
0
votes
0answers
30 views

Text classifiaction for large datasets using Transfer learning

I am trying to do text classification on a very large set of documents using the pretrained GPT model. The problem is GPT takes max sequence length $\le$ 1024. I can't truncate the data as I need to ...
0
votes
0answers
13 views

How to decode text output in autoencoders?

I have made an autoencoder for text based input, and fitted it to the data. Now I want to see the output text. Is there any way to decode the numbers to text? ...