Questions tagged [stanford-nlp]
Questions on the open source natural language processing software from the Stanford University NLP Group, in Java, Python, and C, including Stanford CoreNLP, Stanza, and GloVe.
3,309
questions
-1
votes
0
answers
8
views
How to install stanford NLP to use it in C++ project?
I want to use stanford NLP library in one of my C++ project. But I do not understand how to install it, the guidance given in the page is confusing, please can anyone give me some guidance, I really ...
0
votes
0
answers
20
views
Error while loading a tagger (probably missing model file)
I am creating an Android App in Android Studio where I use Stanford Core NLP and Jetpack Compose. I have been looking for hours in this platform to see if someone has a similar problem like me, but I ...
0
votes
0
answers
11
views
How to get Enhanced++ dependency labels with a java command line in the terminal?
I don't really know java, but I was just trying to use the documentation of the Stanford NLP parser to get the Enhanced++ dependency labels. This is the line I ran:
java -cp "*" -Xmx2g edu....
0
votes
1
answer
31
views
pip install glove-python-binary not working
I encountered an error when I am trying to run the code for the GloVe package in Python3.
I'm currently using Windows 10 with Anaconda3. And I'm looking for assistance with this issue.
Here's the code ...
0
votes
0
answers
27
views
Is there a way to load Word2Vec embeddings to ChromaDB?
I want to query for similar words using ChromaDB. For example, 'great' should return all the words that are similar to 'great', in most cases, it would be synonyms. For this, I would like to upload ...
-1
votes
0
answers
8
views
Predicting new data with Top2vec model
How to predict a new document/data with top2vec model to get the possible Topic number that data will fall under?
My prediction dataset contains 10 different rows.
I need to predict for the new ...
0
votes
0
answers
48
views
Pre-trained word embeddings in R with GloVe
I am trying to use pre-trained word embeddings in R using GloVe. I have a small corpus with just 40,000 tokens. There are 30 texts, with 3 docvars: speaker, party, number of years in government. The ...
0
votes
1
answer
24
views
Can't use retrained sentiment analysis model
Not getting an error at all, the output is just using the regular corenlp sentiment analysis rather than my retrained version.
public static String filePath8 = "src/retraining/trees/model-0009-80....
0
votes
0
answers
44
views
Why am I facing an InvalidArgumentError while training a GLOVE model?
I am trying to train a GLOVE model for sarcasm detection. The error says that during the execution of the the graph computation, there was an invalid index value in the embedding layer.
Am I doing ...
0
votes
0
answers
55
views
How to speed up Stanza lemmatizer by excluding reduntant words
Given:
I have a small sample document with limited number of words as follows:
d ='''
I go to school by the school bus everyday with all of my best friends.
There are several students who also take ...
0
votes
0
answers
16
views
Retraining Sentiment Analysis Annotator: Changing File to a Binarized Tree Issues
I am trying to retrain the Sentiment Analysis Annotator. I am struggling with trying to change my file to a binarized tree with the following call:
$ java -mx5g edu.stanford.nlp.sentiment....
1
vote
0
answers
41
views
Stanford CoreNLP Help -- Cannot import edu.stanford.nlp.pipeline
I am trying to build an application in eclipse IDE for my resume (my first) and have ran into a problem in my main file, where I am trying to import edu.stanford.nlp.pipeline.*; and have been playing ...
0
votes
1
answer
41
views
Calculating similarity score in contexto.me clone
I am currently trying to clone the popular browser game contexto.me and I am having trouble with as to how to calculate the similarity score between two words (the target word and the user inputted ...
0
votes
0
answers
30
views
Stanza has non-deterministic results
I started using multiple documents processing and found out I start receive different results for single documents, depending on the documents batch I put them in.
A code which can illustrate it (I ...
0
votes
0
answers
17
views
Stanford Corenlp MentionDetectionClassifier not found
I am trying to do some co-referencing using Stanford Corenlp version 4.5.4 using Python with the library Stanza latest version (1.5.0), Stanza turns on the server with the properties that I choose, ...
-1
votes
1
answer
38
views
Best libraries to classify misclassified categories?
I have a datset of over 50k rows and around 40% of the categories are misclassified categories and I want to use natural language processing to re-classify them using variables that are mostly binary ...
1
vote
0
answers
30
views
Can't Get CoreNLP October 2022 Update to run in R on Mac
I've been trying to use the most recent update of CoreNLP on my mac and I keep getting the following error message when I run the code below.
library(coreNLP)
Error: package or namespace load failed ...
0
votes
0
answers
69
views
PHP Open Information extraction (relation extraction) to retrieve subject verb object triples by loading JAR file and passing arguments
I have searched for PHP based information extraction approach but I could not find. Several inquiries by others remain unanswered. For example: https://www.codeproject.com/Questions/996885/how-to-...
0
votes
1
answer
161
views
My gpt2 code generates a few correct words and then goes into a loop of generating the same sequence again and again
The following gpt2 code for sentence completion generates a few good sentences and then ends in a loop of repetitive sentences.
from transformers import GPT2LMHeadModel, GPT2Tokenizer ...
0
votes
0
answers
7
views
Depict a NLTK CoreNLPParser output visually using NLTK Tree or another method
I'm using CoreNLPParser from NLTK to get an Stanford NLP Parser output. The code
parser = CoreNLPParser(url='http://localhost:9000')
result = list(parser.raw_parse(sentence))
print(result)
Results in
...
0
votes
3
answers
72
views
Java NLP - Insight from Text Data
We would like to do a POC that uses Java based NLP libraries like Stanford Core NLP and/or Deeplearning4J to train/use models that can extract insight / meaning / summary and provide answers to user ...
0
votes
0
answers
18
views
Looking for a pre-trained word vector with an embedding dimension of 500d (similar to glove.6B.300d)
I'm looking for a pre-trained word vector with an embedding dimension of 500 (something similar to glove.6B.300d), but I haven't been able to find one. Could anyone point me in the right direction or ...
3
votes
1
answer
235
views
How can I find the cosine similarity between two song lyrics represented as strings?
My friends and I are doing an NLP project on song recommendation.
Context: We originally planned on giving the model a recommended song playlist that has the most similar lyrics based on the random ...
0
votes
0
answers
31
views
Getting an error when I try the Python wrapper for Stanford OpenIE
I am trying to run the wrapper given here. However, when I run the code given in the example I get:
OSError: [WinError 740] The requested operation requires elevation
I am using Windows 10 and ...
0
votes
0
answers
54
views
GloVe anomalies with embeddings: cosine similarity for synonyms is too great
Working with GloVe embeddings, I am receiving odd output (and consistently different from a colleague) for words that are definitely synonyms. I receive a value closer to zero than one, which seems ...
0
votes
0
answers
29
views
Split text into sentences with Stanford NLP containing periods in text
I am trying to split a complex sentence with location text that contains multiple periods in "string numbers"
For example:
val text = "First sentence 24-18.07N. Next sentence."
val ...
0
votes
1
answer
57
views
What is Stanford CoreNLP's recipe for tokenization?
Whether you're using Stanza or Corenlp (now deprecated) python wrappers, or the original Java implementation, the tokenization rules that StanfordCoreNLP follows is super hard for me to figure out ...
0
votes
0
answers
71
views
ValueError: cannot compute mean with no input
import spacy
nlp = spacy.load("en_core_web_lg") # if this fails then run "python -m spacy download en_core_web_lg" to download that model
def preprocess_and_vectorize(text):
# ...
0
votes
0
answers
316
views
Caseless Stanford Named Entity Recognition in Python or Stanza
I want to check whether a URL has people's names, e.g. /team does not and /joseph-conrad does. I found the Stanford Named Entity Recognition tagger and it seems to work well.
The issue is that URLs ...
0
votes
0
answers
13
views
What is the key difference between graph-based QA and QA by semantic parsing?
Folowing D. Jurafsky handbook, i struggle with the chapter on QA.
It defines 2 paradigms of QA knowledge based which are:
graph-based QA (1)
QA by semantic parsing (2)
For (1) it takes the exemple: &...
0
votes
1
answer
77
views
Named Entity Recognition by dictionary in text
I need to extract keywords from text. I have a dictionary of keywords, let's say
apache-spark
java
pathon
amazon-web-services
apache-kafka
and I have a job post for example:
Design, develop and ...
0
votes
1
answer
55
views
Can someone explain how to create a PTB Dataset And/Or Train my own model using StanfordNLP?
I'm learning about sentiment analysis and I can't seem to find anything online that outlines how to create a PTB Dataset. I'm using StanfordNLP with Java. I've downloaded the test, dev and validate ...
0
votes
0
answers
64
views
Unable to get SVO Triples when using a different unit of measure
I am experiencing something that I think should work in CoreNLP. I am using openjdk 11.0.18 2023-01-17 LTS on CentOS and a very simple OpenIE example. I wired up corenlp 4.5.2, as show in my build....
0
votes
0
answers
47
views
Calculating Syntactic Similarity between two sentences using Stanford Parser
I'm calculating syntactic similarities between two sentences by generating a parse tree and calculating the difference between two trees and using Stanford Parser. It's working well. But the thing is, ...
0
votes
2
answers
93
views
Stanza based auto-py-to-exe GUI app throws exception (Windows 10)
I am building a Window based .exe for a python script using auto-py-to-exe. It uses Stanza. I am able to build and run the Console based version of the app (the GUI + Console). But the GUI only .exe (...
2
votes
1
answer
40
views
Identify and correct mistakes in Q&A datasets for natural language processing (NLP)
How do you identify and correct mistakes in Q&A datasets that contain errors, such as incorrect answers or missing information, and ensure the accuracy of the dataset?
Let's say I got thousands of ...
0
votes
0
answers
40
views
getting error for the Sandford nlp lib as couldn't find the jar file
I was trying this lib in python
from nltk.parse import stanford
import os
# Set the path to the Stanford Parser JAR file and models
os.environ['CLASSPATH'] = '/path/to/stanford-parser.jar'
os.environ[...
1
vote
1
answer
77
views
How to see if one Nokogiri::XML::Node contains parts of another Nokogiri::XML::Node?
Using ruby Nokogiri I have a Nokogiri::XML::Node object (ConstituencyXMLNode inherits from Nokogiri::XML::Node) that is a tree object like such:
#(ConstituencyXMLNode:0xc3c8 {
name = "PP",
...
0
votes
0
answers
92
views
Stanza Visualizations using SpaCy Interface
The attached code comes from the stanza library and from what I’ve gathered converts a stanza object to space to visualize a NER object. The code returns nothing if I run it in a notebook but using ...
0
votes
0
answers
116
views
Why can't i load stanza models?
I'm trying to use the python packages stanza and when i'm simply trying to download a model (french or english)
using : stanza.download('en')
I get an error when i'm around 5/6 %
I'm expecting to be ...
0
votes
1
answer
67
views
How to store Stanza Span in MongoDB collection?
I am trying to add a list of dictionaries (whose name is stanzanerlist) like the following:
stanzanerlist = [{
"text": "Harry Potter",
"type": "PER",
&...
0
votes
1
answer
58
views
How do I merge rows of data with the same ID but different data in other columns and remove duplicate contiunous words?
I have a set of data in a pandas dataframe
ID
Date
Location
Text
123456
01/01/23
Paris
Reported Problem:
123456
01/01/23
Paris
Reported Problem: One Plus One Is Not Three
123456
01/01/23
Paris
...
0
votes
0
answers
59
views
Eclipse edu.stanford.nlp Error: Could not find or load main class
Been working on this error since 2 days and cant find a solution: I'm trying to run edu.stanford.nlp. in my java project in Eclipse.
Done so far:
Installed maven, extracted the latest stanfordnlp-...
0
votes
0
answers
33
views
Stanford CoreNLP in R: adding Italian language
I would like to use the Stanford CoreNLP package in R for processing text in Italian, but the Italian language is not included:
coreNLP::downloadCoreNLP(type="italian") Error in match.arg(...
1
vote
1
answer
207
views
Challenging problem: How to find near duplicates for string?
I have a dataset that consists of over 50000 names. There are a lot of near duplicates inside because of how these names were entered into the system.
The ideal solution should flag clusters of ...
0
votes
0
answers
47
views
Suggested approaches to Named Entity Linking of PERsons after Stanford's STANZA NER (NLP)
I am using a Stanza pipeline to do NER on news article in Italian and am satisfied with the PERsons spans that it detects.
How would you suggest I attempt linking the identified PERson entities with ...
1
vote
0
answers
31
views
Ratios of co-occurrence probabilities can encode meaning components
I'studying NLP these days through CS224N, which is NLP lecture in Stanford, and I had a question of co-occurrence probability.
I can understand that each first row and second row shows co-occurrence ...
0
votes
0
answers
11
views
Nouns with hyphens or slashes in coreNLP
The code below works well for full nouns but I have text where a single noun can have hyphens or slashes in them. What should I do to accommodate that?
c/h, for instance, is a valid abbreviation as in ...
0
votes
0
answers
26
views
How to Detect Present Simple Tense in English Sentences using a Rule-Based Approach?
I have a straightforward task of determining the sentence structure, specifically to identify if a sentence written in plain English is in the "present simple" tense. I am aware of a couple ...
0
votes
0
answers
92
views
Where do I find Stanford NLP Tagger training files for: english-left3words-distsim.tagger
I am trying to understand how to train my own tagger in Stanford NLP. How do I get the training files for:
english-left3words-distsim.tagger
It lists these files in the props file, but not too sure on ...