2022 Developer Survey is open! Take survey.

Questions tagged [nltk]

NLTK is a free, open-source natural language processing toolkit for python. It is used primarily for text processing applications and includes libraries specifically made for classification, tokenization, stemming, tagging, parsing, and semantic reasoning.

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

Looking for a generalized (extended) lemmatizer

Whenever I lemmatize a compound word in English or German, I obtain a result that ignores the compound structure, e.g. for 'sidekicks' the NLTK WordNet lemmatizer returns 'sidekick', for '...
user avatar
0 votes
0 answers
19 views

Using VADER Sentiment Analysis makes distributions overlap : how to improve my model

I use VADER Sentiment Analysis on a "customer reviews" dataset. VADER breaks down feelings of satisfaction and dissatisfaction into neutral and positive negative components. Plotting the ...
user avatar
1 vote
0 answers
9 views

Which Pointers from WordNet are Used for Synset in NLTK

I'm trying to create a custom parser for wordnet and hit a roadblock. I see that there are tons of different pointer_symbols and lots of them seem almost like synonyms but not exactly synonyms. I'm ...
user avatar
0 votes
0 answers
13 views

How to find syntactic dependencies in text using unsupervised method and context information?

I know there are ready libraries to find syntactic dependencies and besides supervised methods, I have studied some of the unsupervised dependency parsing which uses POS tags and other mathematical ...
user avatar
  • 111
1 vote
1 answer
39 views

Natural language processing [closed]

I am new to NLP. I converted my JSON file to CSV with the Jupyter notebook. I am unsure how to proceed in pre-processing my data using techniques such as tokenization and lemmatization etc. I ...
user avatar
  • 11
3 votes
1 answer
60 views

Compare Books using book categories list NLP

I have a database of books. Each book has a list of categories that describe the genre/topics of the book (I use Python models). The categories in the list most of the time are composed of 1 to 3 ...
user avatar
0 votes
0 answers
23 views

chat bot nfL6.json training data

I am experimenting with chatterbot and the nfL6.json training data set. The data looks like this below, should I be using an nbestanswers or ...
user avatar
  • 359
0 votes
0 answers
22 views

Keyword Imputation Using Machine Learning and NLP

I am fairly new to machine learning and data imputation so forgive me if I am using wrong words or not feasible ideas. I have a table as follows, with text in the Headline column and a list of ...
user avatar
1 vote
1 answer
96 views

Converting to lowercase while creating dataset for NER using spacy

I am trying to make a custom entity model for an NER application using spacy. In several NLP projects, I have converted all the data to lowercase and applied several ML techniques. For NER also should ...
user avatar
1 vote
2 answers
61 views

Need help to increase classification accuracy for classified ads posting

I have to predict the category under which ad was posted using the provided data; I cannot gain accuracy more than 74% for my model. I am not sure what I am missing. What I have done so far: Cleaned ...
user avatar
  • 21
0 votes
0 answers
17 views

Adding additional classes in stanford NLP NER or Spacy

For stanford NER 3 class model, Location, Person, Organization recognizers are available. Is it possible to add additional classes to this model. For example : Sports as one class to tag sports names. ...
user avatar
0 votes
1 answer
111 views

Stemming/lemmatization for German words

I have a huge dataset of German words and their frequency in a text corpus (so words like "der", "die", "das" have a very high frequency, whereas terminology-like words ...
user avatar
0 votes
0 answers
27 views

Replacing in german text "Sie" with "Du" and changing also the sentence

I have a lot of german text like Examples "Stelle Sie die Pflanze an einen sonnigen Platz." "Achten Sie bei der Umstellung darauf, das bisherige Präparat allmählich durch NEWPRODUCT zu ...
user avatar
  • 1
0 votes
1 answer
102 views

Trying to compress text with NLP

For a university project, I need to send text in Spanish via SMS. As these have a cost, I am trying to compress this text in an inefficient way. This consists of first generating a permutation of ...
user avatar
  • 1
0 votes
1 answer
40 views

WordNetLemmatizer not lemmatizing the word "promotional" even with POS given

When I do wnl.lemmatize('promotional','a') or wnl.lemmatize('promotional',wordnet.ADJ), I get merely ...
user avatar
  • 133
1 vote
0 answers
15 views

How to find the related columns between column?

Suppose I have a data frame with columns car_id,number_car,bike_id,number_bike. ...
user avatar
1 vote
1 answer
50 views

How do I split contents in a text that would include two or more different themes (context) in NLP?

For example, a text: "The airlines have affected by Corona since march 2020 a crime has been detected in Noia village this morning" the output should be: The airline companies have affected ...
user avatar
2 votes
0 answers
151 views

Text preprocessing on corpus in pipeline before Gensim word2vec training

I have a large compressed corpus, about 30gb in .txt.gz format. In raw format it can be used as input to word2vec like this: ...
user avatar
5 votes
1 answer
2k views

Is there an NLP corpus that contains common medical terms?

I am trying to use the NLTK library to extract keywords denoting medical symptoms from medical reports of patients. For example, I have a medical report as follows: s:a 33 year old female ...
user avatar
3 votes
2 answers
207 views

Is there any package in python that can identify similarity between alphanumeric alias names of a parameter?

For example: for a parameter like input voltage, Alias names : V_INPUT, VIN etc. Now, I want the software to recognize each of the alias names as same. Is ...
user avatar
  • 71
1 vote
1 answer
219 views

train NER using NLTK with custom corpora (non-english) must use StanfordNER?

I have searched about customization NER corpora for trainig the model using NLTK library from python, but all of the answer direct to nltk book chapter 7 and honestly makes me confuse how to train the ...
user avatar
  • 21
2 votes
1 answer
43 views

What is the more natural parsing, the one that leads to the preferred reading of the sentence

I have those rules: and those two possible parse trees: I am asked for the next question: What is the more natural parsing, the one that leads to the preferred reading of the sentence? Can anyone ...
user avatar
  • 157
2 votes
0 answers
562 views

improve NER model accuracy with spaCy dependency tree

I have search at lot, was not able to find a solution for my problem... I am training a NER model, that should detect two types of words: Instructions and Conditions. This is not the standard use-case ...
user avatar
  • 21
1 vote
0 answers
69 views

For short sentences(max length 10 ), which Name entity recognition algorithm is good?

My Training data look like this . I have to recognize 4 class for each sentence. Any algorithm , which have some learning parameters Means not rule based approach . So which method is good for my ...
user avatar
  • 11
2 votes
2 answers
53 views

Summing three lexicon based approach methods for sentiment analysis?

I'm doing sentiment analysis using a lexicon based approach and I have a bunch of news headlines that needs to be categorized as negative, positive and neutral or within a scale ranging from -1 (very ...
user avatar
  • 55
3 votes
1 answer
236 views

Smart sentence segmentation not splitting on abbreviations

Sentencer from SpaCy and NLTK does not catch the fact that typical abbreviations (e.g. Mio. for Million in German) and the ...
user avatar
  • 207
1 vote
1 answer
191 views

How to properly compare these two confusion matrix?

I have used Vader, a sentiment analysis tool for social media, on a database of movie reviews. These two confusion matrices differ in the vader.py algorithm, as the first one is from nltk: The second ...
user avatar
  • 81
1 vote
1 answer
172 views

How to create a table to display relative frequencies of selected words (eg. with, can, will) from any text corpus in nltk package in python [closed]

Interested words are ['with', 'can', 'will'] gutenberg corpus is the corpus we would like to search on. Expected output is ...
user avatar
1 vote
1 answer
184 views

How to add a new column with labels in a dataframe?

I have thousands of sentences that I would need to label based on their sentiment. An example is ...
user avatar
  • 165
1 vote
1 answer
61 views

Text comparison: spot the differences

I would like to know what would be the best approach to compare two texts and see the differences between them. For example: ...
user avatar
  • 141
1 vote
1 answer
35 views

Which insights a data scientist could derive from text-analysis? [closed]

I have many texts and I am trying to analyse them. After tokenising them, studying words frequency, spotting any typos, studying punctuations, I have been working on POS tagging. Since it is my first ...
user avatar
  • 165
0 votes
1 answer
24 views

Text analysis: structure and sentiment

I would need to analyse the structure of texts like this: ...
user avatar
  • 141
0 votes
1 answer
161 views

BLEU_SCORE gives bad scores - what am I doing wrong?

I want to calculate the BLEU_SCORE but it gives me bad results I don't know why? For example, this is my reference and predicted sentences: ...
user avatar
2 votes
1 answer
188 views

Weighting of words in lexicon based sentiment analysis

I have a a question regarding my current project, i am trying to do a lexicon based sentiment analysis on my data, where i calculate the sentiment score as following: $$ Score = \frac{\sum_{i}{word_i}...
user avatar
  • 31
3 votes
1 answer
66 views

NER and context mapping

I want to extract various amounts and tenure of contracts from different contract documents that we have. For example : Mr xyz, this contact is valid for 3 Months and has to be executed within 1 ...
user avatar
  • 514
1 vote
1 answer
111 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: ...
user avatar
1 vote
0 answers
62 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 ...
user avatar
0 votes
1 answer
295 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. ...
user avatar
  • 476
0 votes
1 answer
130 views

Where does spacy, nltk, prodigy, sklearn fit in the AI project?

Where does tools like spacy, sklearn, prodigy, nltk fit in the below AI project architecture and what are some common alternatives to these:
user avatar
  • 175
3 votes
1 answer
906 views

find bigrams in pandas

I have a DataFrame with 4 columns: 'Headline', 'Body_ID', 'Stance', 'articleBody', with 'Headline' and 'articleBody containing cleaned and tokenized words. I want to find bi-grams using nltk and have ...
user avatar
  • 71
1 vote
2 answers
623 views

Difference between packaged sentiment analysis tools (TextBlob/NLTK) and training your own classifier?

I'm new to ML and training classifiers in practice, so I was just wondering what the difference was between the built-in sentiment tools of packages such as NLTK and TextBlob as compared to manually ...
user avatar
1 vote
3 answers
948 views

Detect if word is «common English» word or slang word

I have a huge list of short phrases, for example: ...
user avatar
  • 113
5 votes
3 answers
199 views

Chunking Sentences with Spacy

I have a lot of sentences (500k) which looks like this: ...
user avatar
  • 153
0 votes
1 answer
286 views

NLP techniques to label unlabeled data in a dataset [closed]

So I have a .xls file with negative and neutral reviews of a medicine. However, this dataset does not have labels. I converted this .xls into a dataframe and I am using the Spacy Lib. I have to use ...
user avatar
4 votes
3 answers
2k views

TFIDF for very short sentences

I'm trying to build a regression model, in which one of the features contains text data. I was thinking in using scikit-learn's ...
user avatar
  • 273
1 vote
1 answer
27 views

nltk measure the accuracy of the new features

I have been playing around the NLTK algorithm for some data prediction. Starting from this gib, I started my understanding process. However, there are some bits that don't make sense. If I have a ...
user avatar
1 vote
0 answers
528 views

Manipulate the nltk.word_tokenize to remove the stopwords and assign to two dataframe

I'm trying to manipulate an imported list of keywords with about 1000 factors from a CSV, tokenizing the list while, at the same time, removing the stop words. A dedicated function, returning a tuple, ...
user avatar
1 vote
1 answer
200 views

How do I use NLTK Text object with Re library?

I am working on to build a bag of words model from my text file. I I want to use the re.sub function from the re library. I am getting the following error; ...
user avatar
0 votes
0 answers
40 views

Error while using NLTK/ How should I read paragraph using NLTK?

I am a total newbie. I have a custom text document which is a paragraph. I am trying to read it and display using NLTK. following is my code; ...
user avatar
1 vote
1 answer
213 views

What is ChunkParserI in nltk.chunk ? What exactly it has been called for?

...
user avatar