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.

0
votes
1answer
6 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
0answers
14 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
21 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 ...
2
votes
0answers
24 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
24 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
12 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? ...
0
votes
0answers
9 views

NLP text one-hot encoding with mapping dataset

I am wondering if I can make NLP model to compute word similarity with using data consisting of mapping data. I think I can make a model learn with vectorized words by one-hot encoding. Is is possible?...
1
vote
2answers
24 views

Does it make sense to concatenate datasets to improve accuracy of model?

I'm planning on training an NER model, I already do have a large corpus but I did find one more large corpus and I'm quite confident that I can source even more corpora and format its data to my needs....
3
votes
2answers
37 views

What is the difference between and Embedding Layer and an Autoencoder?

I'm reading about Embedding layers, especially applied to NLP and word2vec, and they seem nothing more than an application of Autoencoders for dimensionality reduction. Are they different? If so, what ...
0
votes
0answers
17 views

Data extraction from documents using NLP and ML [closed]

How do you extract data from documents? As an example, consider an application form which I would like to extract data from. Such as applicant name, application number, etc. The thing is, I wasn't ...
0
votes
2answers
23 views

I have a word2vec embedding - now what?

I've always relied on the Keras embedding layer for my NLP work. But for my latest project I want to use a custom embedding layer. I have gone through the steps to create a word2vec file but now what? ...
1
vote
2answers
26 views

Word Embedding for Item Names(integer, one-hot encoding)

I am looking for the way to get the similarity between two item names using integer encoding or one-hot encoding. For example, "lane connector" vs. "a truck crane". I have 100,000 item names ...
0
votes
0answers
16 views

Feature selection or Dimension reduction in unsupervised learning

I'm trying to do Embedded clustering using kmeans. This is customer data, so it involves a lot of sentences, so I'm using the universal sentence encoder before clustering. But I should be doing a ...
0
votes
0answers
6 views

Looking for approaches to large scale NER train test split without overlaps

I would like to train test split a list of texts with the associated entities so there are no entities overlapping splits. Ensuring no overlaps is challenging: I currently achieve it with 2 groupby ...
1
vote
1answer
23 views

Using doccano for Aspect Based Sentiment Analysis annotation

Currently looking for a good tool to annotate sentences regarding aspects and their respective sentiment polarities. I'm using SemEval Task 4 as a reference. The following is an example in the ...
0
votes
1answer
27 views

Which libraries in Python are there in NLP to tokenize the Hindi sentence?

For English language there are libraries like NLTK, CoreNLP which are used for Text Normalization, Word Tokenization and Detokenization, Sentence Splitting etc. Like English, is there any library to ...
0
votes
1answer
22 views

How does Byte Pair Encoding work?

I am using https://github.com/rsennrich/subword-nmt to do some Byte Pair Encoding (BPE). My corpus looks like: https://gist.github.com/shamoons/4bf9e78cd92624bcb120644fb995454a When I run the ...
0
votes
1answer
23 views

Understanding Layers in Recurrent Neural Networks for NLP

In convolution neural networks, we have a concept that inner layers learn fine features like lines and edges, while outer layers learn more complex shapes. Do we have any such understanding for ...
1
vote
1answer
22 views

Can word embedding be used for text classification on a mix of English and non-English text?

I'm doing text classification on text messages generated by consumers and just realized even though most of the replies provided by consumers are in English, some are in French. I've used Keras word ...
1
vote
1answer
127 views

What is whole word masking in the recent BERT model?

I was checking BERT GitHub page and noticed that there are new models built from a new training technique called "whole word masking". Here is a snippet describing it: In the original pre-...
1
vote
0answers
27 views

Pytorch: How to implement nested transformers: a character-level transformer for words and a word-level transformer for sentences?

I have a model in mind, but I'm having a hard time figuring out how to actually code it in Pytorch, especially when it comes to training the model (e.g. how to define mini-batches, etc.). First of all ...
1
vote
1answer
15 views

Which approach to select category based on keywords

I want to assign a certain category to a group of keywords. So i.e. people can upload images or videos, when they do this they can set keywords for this. These keywords are free to type so words can ...
0
votes
1answer
22 views

How can I use all possible spelling correction of documents before clustering those documents?

I have the data set with many documents of 50 to 100 words each. I need to clean those data by correcting misspelled words in those documents. I have an algorithm which predicts possible correct ...
1
vote
1answer
25 views

Get long answers from BERT

We are using Google BERT for question and answering. We are using vanialla bert-base-uncased as well as squad trained checkpoints. The answers from BERT are very short and crisp. For example, if ...
0
votes
1answer
21 views

NLP: robust ways to handle morphological variations in words (e.g. plurals, verb conjugations, hyphens, etc.)?

I need to process natural language sentences in which words can appear with morphological variations: car -> cars; play -> playing, played; etc. There might be hyphens also, e.g. "dog-friendly hotel", ...
1
vote
0answers
12 views

Neural net classifier outputting extreme probabilities

I am training a multi-label neural network text classifier (i.e. a given sample can have more than one label; most samples have exactly 1 label though): Single-layer BiLSTM producing a sequence of (...
0
votes
1answer
9 views

I want to know what are all the features that MAUI key phrase extraction tool uses?

I have been trying out keyphrase extraction for a while and I want to know what are all the features that MAUI MAUI github uses for training the keyphrase extraction? https://www.airpair.com/nlp/...
2
votes
1answer
21 views

Metrics for Name Entity Recognition

Working on a NER project, I have been facing the problem of evaluating my model during training. I cannot be using the accuracy metrics or f1 score or any other metrics to evaluate my model on runtime ...
2
votes
1answer
22 views

In the Keras Tokenizer class, what exactly does word_index signify?

I'm trying to really understand Tokenizing and Vectorizing text in machine learning, and am looking really hard into the Keras Tokenizer class. I get the mechanics of how it's used, but I'd like to ...
0
votes
0answers
18 views

How can I recognize if a dot is an abbreviation of a word or the end of a sentence?

I have a text and I need to recognize if the end of a sentence is reached. As dots are used for abbreviations as well I can not do a simple check for a dot. How can I recognize this, maybe with an ...
1
vote
0answers
17 views

Learning Embeddings for One Word

I have a non-conventional NLP task. I am looking to develop a sequence to a vector model. Instead of employing one-hot encoding ...
0
votes
0answers
15 views

Doc2vec model.docvecs giving varying output

I am using doc2vec to vectorize input text. I am converting my input dataset to tagged data and giving it as input. Initially I tried with a data of 27 input text: ...
0
votes
1answer
22 views

Incorrect Text Classification, But Accurate Model. Do I Perform Manual Text Classification For A Data Set?

I'm currently using Google's BERT pre-trained sentiment analysis model that is trained on an IMDb pos/neg review dataset. I'm using this model to predict whether tweets are positive (bullish) or ...
0
votes
1answer
47 views

nltk's stopwords returns “TypeError: argument of type 'LazyCorpusLoader' is not iterable”

While trying to remove stopwords using the nltk package, the following error occurred: ...
0
votes
1answer
27 views

What is the best approach to perform information extraction from tourist reviews using NLP, DL?

I am interested in performing some information extraction from tourist reviews about different places. I have data of 50 different places and around 300-400 reviews about each of them and I would ...
0
votes
1answer
32 views

Does it make sense to use TF-IDF to extract most important tokens from a corpus?

I have a collection of documents and I'd like to extract the most important words and phrases from the entire corpus. My understanding of TF-IDF is that it is calculated per token per document, so ...
0
votes
2answers
33 views

How to tackle a multilabel classification problem

I am trying to build a LSTM model for a multiclass classification problem on textual data. Until now, I have only built a model when one input belongs to one of the categories. What do I do when one ...
2
votes
1answer
19 views

Where can I learn the complete mathematics involved in LDA?

I have come across Latent Dirichlet Allocation (LDA) on multiple occasions while reading about sentiment analysis and recommender systems. Where can I find good reading material which explains the ...
0
votes
0answers
10 views

How do I generate text responses that take the context of an input into consideration without the use of defined templates?

tldr: I have pairs of paragraphs (reviews and responses). Given a set of sentences as an input, what are some methods to output appropriate response sentences contingent on the context and sentiment ...
1
vote
0answers
18 views

What is the best technique to transform documents into vectors?

What is the best algorithm between doc2vec and Singular Value Decomposition (SVD) to transform a set of 600 documents of around 1000 words each into vectors ?
1
vote
0answers
16 views

Back-Translation model for German and English

Do you know of any pre-trained models for back translation between German and English? I am aware that there are ways to include a monolingual corpus into the training of a machine translation model (...
1
vote
1answer
15 views

Embedding Values in word2vec

Are the embedding values for a particular word using word2vec Skipgram model the weights of the first layer or the softmax output of the function? Does the embedding value change according to the ...
0
votes
0answers
12 views

Linking LDA topics to the input documents

I am new to LDA topic modelling. I am using gensim and am able to generate topics that make sense. Using 25k of documents, I can also print them using print_topics. ...
0
votes
0answers
22 views

Judging Keywords with Benchmark Dataset

I successfully extract keywords from documents in my corpus in a variety of different ways (like running pagerank on an cooccurance matrix, or textrank, or using a similarity matrix, or generating my ...
1
vote
1answer
28 views

Fewer observations & larger documents vs More observations & smaller documents

Let's suppose that I have a dataset of 1000 documents. Each document is a restaurant review (so relatively short text) and it has labels {Negative, Indifferent, Positive}. Let's suppose that the ...
1
vote
0answers
30 views

Character-level seq2seq with LSTM in Keras for language declension

I am trying to create sequence to sequence mapping of words on Croatian language, to automatize declension (https://en.wikipedia.org/wiki/Declension). English language is fairly simple in that regard,...
1
vote
0answers
14 views

Write way to add samples to torch TabularDataset

I have a TabularDataset and i would like to add some examples to the dataset. ...
0
votes
1answer
23 views

Classify documents using a set of known vocabularies

I have a bunch of documents that I want to classify which ones talk about soccer (unsupervised learning, I do not want to manually label the documents). One way I am thinking about is to go online ...
0
votes
1answer
17 views

What is this called by gathering the meaning from a sentence?

What would this process of gathering the meaning of a sentence be called? What would the segments derived from the sentence be called? ...
0
votes
0answers
5 views

Can we achieve higher accuracy for a probability parser by changing POS TAGs?

I guess we can change the granularity of POS tags and achieve higher accuracy, when we have not a large training data. Are there any other scenarios that it can help us?