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

LSTM Feature engineering: using different Knowledge Graph data types

For a research project, I'm planning to use an LSTM to learn from sequences of KG entities. However, I have little experience using LSTMs or RNNs in general. During planning, a few questions ...
  • 1
0 votes
1 answer
25 views

Advantages of different tokenizers for NLP (specifically text generation)

What are the advantages of using different tokenizers? For example, let's take the sentence: "In Düsseldorf I took my hat off. But I can't put it back on." The treebank tokenizer yields: &...
0 votes
0 answers
11 views

Incremental semantic similarity with sentence embedding using sentence_transformers

I'm trying to find similar sentences to a given query sentence from a corpus. Also, I want to incrementally add new sentences to that corpus for future prediction without retraining the whole corpus ...
  • 1
1 vote
1 answer
24 views

Combine datasets of different domains to ehance generalizibility

so I try to implement an Emotion Classifier, which should detect several emotions from a text. There are several datasets for this (ISear, GoEmotions, etc.). However, a lot of them come from different ...
  • 13
0 votes
0 answers
16 views

is it possible to turn a list of sentences into paragraph?

I have a problem and seeks advise, I have a couple of sentences like: ...
  • 1
1 vote
1 answer
23 views

How do you train an ML algorithm to achieve a desirable clustering?

Most clustering examples on the net are unsupervised learning. There is a given vectorization into a 2D space and the algorithm discovers clusters. However, what if the input data that I want it to ...
  • 117
1 vote
1 answer
17 views

Newbie questions: real-time clustering of messages

I'm very much a newbie in NLP, so please accept my apologies if this is an obvious question, the wrong place to ask it or any other error I could be making. I am considering using NLP for some subset ...
  • 111
0 votes
1 answer
26 views

Increasing/Decreasing importance of feature/thing in ML/DL

I have 3 cases: I have a classification model that will be used to classify cats and dogs. On my train data dog pictures has a watermark on them, but cat pictures don't. The problem is: Whenever I ...
  • 89
0 votes
0 answers
28 views

Are there applications where you don’t need positional embeddings for transformers?

Are there applications where you don’t need positional embeddings for transformers? Applications using positional embeddings with transformers: machine translation, image classification, etc.
2 votes
1 answer
180 views

Is there a way to map words to their synonyms in tfidf?

I have the following code: ...
1 vote
1 answer
11 views

Why is max_features ordered by term frequency instead of inverse document frequency

In the docs: https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html it is explained that max_features is ordered by ...
0 votes
0 answers
10 views

Predicting whether or not text is of a specified topic (topic defined by key words and phrases)

I was looking into binary classification methods for classifying whether or not a given text is related to a topic that is defined by given key words and phrases (e.g. the topic is meals and key ...
1 vote
1 answer
43 views

Bertopic with embedding: unable to use find_topic

I've used BERTopic with success for the following tasks: get topics, visualise (topics, barcharts, documents ...) and DTM (extended to get area plot with considerable success). However, I am unable to ...
0 votes
1 answer
49 views

One word changes everything NLP

I have a classification model (BERT) that classifies sentences as either question or normal sentences. But whenever a sentence has "how" word, the model chooses "question" class. ...
  • 89
1 vote
0 answers
25 views

Extract categories from text (unsupervised)

I have a list of bank statements. They look pretty much like this: Received transaction. Reason[separator] invoice from [date][separator][number]. Counterparty[separator] [company name] Payment to ...
  • 155
1 vote
0 answers
20 views

How can I decide the threshold value for relevance score in a search problem?

I am using a LSA/TF-IDF/BM25/Ensemble models for text search and finally calculating similarity score to rank my search. I would like to decide a threshold value for the score, below which I would not ...
1 vote
1 answer
16 views

Effectiveness of tf-idf on documents with repeated keywords

I was doing some ML reading and came upon tf-idf. The tf portion counts the relative frequency of a relevant word in a document, while idf measures how common or rare a word is across the corpus. The ...
0 votes
1 answer
34 views

Fuzzy Classification in NLP

Is it possible to use use fuzzy classification models such as fknn, fsvm in nlp? I mean I've seen people use K-nn, SVM over textual feature datas extracted from twitter/reddit api to detect emotions ...
0 votes
0 answers
12 views

Degree of freedom for NLP DL models

How degree of freedom can be estimated for NLP use cases where put is high dimensional vector (let us say word2vec used and dim size is 500) say and RNN or 1D CNN is used for modeling?
11 votes
3 answers
1k views

Why use cosine similarity instead of scaling the vectors when calculating the similarity of vectors?

I'm watching a NLP video on Coursera. It's discussing how to calculate the similarity of two vectors. First it discusses calculating the Euclidean distance, then it discusses the cosine similarity. It ...
  • 253
1 vote
1 answer
40 views

Threshold determination / prediction for cosine similarity scores

Given a query sentence, we search and find similar sentences in our corpus using transformer-based models for semantic textual similarity. For one query sentence, we might get 200 similar sentences ...
1 vote
1 answer
20 views

Detect data (web textual content) age

This is a broad question and maybe does not have an answer but I will try. I have been thinking of some techniques to detect the date of publication of public data in the wild of the internet. Without ...
  • 453
0 votes
0 answers
13 views

Text mining technique for similarity index (account for spelling mistakes)

I only use Python Context: This is my first time ever doing this so I have no idea where to start. I have a list of 20,000 words. It can contain emotes or different languages. I need to find a way to ...
1 vote
0 answers
5 views

Issue with Relation Annotation (rel.manual) in Spacy's Prodigy tool

I am trying to build a relation extraction model via spacy's prodigy tool. NOTE: ner.manual, ner.correct, rel.manual are all recipes provided by prodigy. (ner.manual, ner.correct) The first step ...
0 votes
1 answer
22 views

Encoder Decoder model for parameter extraction from text input

I have an input as text from which I want to extract parameters as given in example below. Input: ...
0 votes
0 answers
8 views

When to use "contextual" embeddings from language models?

When we use Word2Vec, it's obviously a non-contextual embedding because every word has the same representation. When I pass it to my LSTM, we say the hidden states are the contextual embeddings of the ...
  • 109
1 vote
1 answer
22 views

How to fine-tune hyperameters of unsupervised training in fasttext?

I want train fasttext unsupervised model on my text dataset. However there are many hyperparameters in train_unsupervised method: ...
  • 163
1 vote
1 answer
18 views

How does machine learning algorithms process text?

I'm still new in machine learning and I've been trying to expand my knowledge about it. For my first project, I want to classify if a tweet is suicidal or not using the gradient boost algorithm. I do ...
  • 11
1 vote
1 answer
24 views

Is backpropagation applied every layer the same?

For example, I have layers that are pretrained. But while predicted, the loss is very high. But not because of pre-trained layers. Because of not pretrained layers. Will every layer be affected by ...
  • 89
0 votes
1 answer
16 views

What counts as a token for bpemb's encode_ids_with_eos()

I have probelms understanding bpemb's encode_ids_with_eos() or similar. When I run the following code i get none-word like segmentations (rather syllalbus based or ...
1 vote
1 answer
51 views

Avoid leakage in NLP extraction

What is best practice for applying traditional NLP extraction techniques a pre-processing for ML models? Given a pipeline: Collect raw data. Parse full data set with a variety of traditional NLP ...
  • 413
0 votes
0 answers
29 views

Dataset Format for fine tuning deepset/roberta-base-squad2 hugging face transformer model

I have been trying to fine tune the roberta model for QnA to my specific domain (healthcare). I am unable to find the correct way to provide the dataset format to the tokenizer in order to fine tune ...
0 votes
0 answers
21 views

Basic doubt on embeddings by BERT, LSTM

When we use Word2Vec, Its obviously a non contextual embedding because every word has a same representation. When I pass it to my LSTM, We say the hidden states are the contextual embeddings of the ...
  • 109
0 votes
0 answers
10 views

Role of segment length in NLP inside-outside algorithm

I encountered an issue with the algorithm used for finding the probability of a string in syntactic parsing in NLP, using the inside-outside algorithm. Here is a section from Christopher Manning and ...
0 votes
1 answer
21 views

Text cleaning when applying Sentence Similarity / Semantic Search

Do we need to apply text cleaning practices for the task of sentence similarity? Most models are being used with whole sentences that even have punctuation. Here are two example sentences that we wish ...
0 votes
0 answers
11 views

Paragraph numbering extraction

I am curious on how to tag a text paragraph with the designated paragraph numbering. The problem is the layout and numbering of the paragraphs of the pdf documents I am working with differ. For ...
0 votes
0 answers
11 views

Contextual Embeddings LSTM DOUBT

I have a simple doubt. When we use Word2Vec, Its obviously a non contextual embedding because every word has a same representation. When I pass it to my LSTM, We say the hidden states are the ...
  • 109
0 votes
0 answers
11 views

What does logits in Casual Language Modeling represent?

I am reading the docs for transformers by hugging face and I see that the logits produced by casual language models are of the shape (batch_size, sequence_length, config.vocab_size). I also read the ...
0 votes
0 answers
29 views

How Can I print the values of Tfidf vectorizer?

I have a code like this model = make_pipeline(TfidfVectorizer(),MultinomialNB()) Now I was giving data to the model like this ...
  • 11
0 votes
0 answers
139 views

FileNotFoundError: Unsuccessful TensorSliceReader constructor

I am trying to deploy my model. I am encountering the following problem: FileNotFoundError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ram://a603e930-4fda-4105-...
1 vote
1 answer
24 views

Normalize summary of customer feedback text / word-cloud /word-count

I am trying to make a first analysis on the interest of people feedback from their emails. For a first analysis I made with a simple wordcount to know the key words. I am facing the following problem: ...
0 votes
1 answer
13 views

What method/algorithm to use to extract information from project documents about objectives, activities, and other variables?

I'm more-or-less new to NLP so assume little existing knowledge! But I have strong coding skills in R and to a lesser extent Python. We're interested in extracting key information about objectives, ...
  • 1
0 votes
0 answers
12 views

ML architecture for returing multi-ouput text (NLP)

I'm trying to design a model that would resemble Named Entity Recognition but shows only one best fit. The simplified business side looks like this: I have multiple pdf documents (text + regions) I ...
0 votes
1 answer
29 views

Model for detecting contact information in text

Is there a SOTA solution for finding texts with contact information (phone numbers, social media links, etc.)? I know that this task is advised to solve by regular expressions, I've already tried it ...
1 vote
1 answer
13 views

Can you make Q&A language model stay on topic?

I’m thinking of fine-tuning a pre-trained language model for a Q&A task. More specifically, I’d like to fine-tune the model on a single chapter in a classic college textbook. Afterward, the reader ...
0 votes
1 answer
17 views

Questions on GLM: General Language Model Pretraining with Autoregressive Blank Infilling

For GLM: General Language Model Pretraining with Autoregressive Blank Infilling , May I ask how is the sampling for input division in step (b) being done ? why in step (c), the green ...
  • 283
0 votes
0 answers
10 views

Discover context in word alignement

I am using Facebook Muse to translate words from one language to another, and apparently it performs well (I set no metric though). Although I have very basic ML/Datascience/NLP knowledge, could you ...
  • 453
0 votes
0 answers
42 views

ValueError: Input 0 of layer lstm_1 is incompatible with the layer: expected ndim=3, found ndim=4. Full shape received: (1, 77, 110509, 200)

I have a text generation model. ...
0 votes
1 answer
14 views

Comparing encoders to same input of differnt output size

Let's say I have an input s1 and I pass it to two encoders e1 and e2. They output encodings ...
0 votes
1 answer
30 views

Is it normal for a model to perform worse with the use of word embeddings?

I have a multiclass text classification problem and I've tried different solutions and models, but I was not satisfied with the results. So I've decided to use GloVe ( Global Vectors for Word ...

1
2 3 4 5
49