-
Notifications
You must be signed in to change notification settings - Fork 2.7k
-
After I downloaded the stanford-corenlp-4.4.0-models-italian.jar, I tried to run the Italia model with Stanford CoreNLP API in python:
from pycorenlp import StanfordCoreNLP params = {'outputFormat': 'json', 'outputDirectory': outputDir, 'replaceExtension': True} CoreNLP_nlp = subprocess.Popen( ['java', '-mx' + str(5) + "g", '-cp', os.path.join(CoreNLPdir,'*'), 'edu.stanford.nlp.pipeline.StanfordCoreNLPServer','-props', 'italian', '-timeout', '999999']) nlp = StanfordCoreNLP('http://localhost', port=9000) CoreNLP_output = nlp.annotate(text, properties=params)
However, it seems that the dependencies in the output is different from the dependencies annotated in the online demo (https://corenlp.run)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
All reactions
-
In this example sentence:
Ci sono tanti, più giovani di te o meno giovani, che vivono in attesa d'esperienze straordinarie; dai libri, dalle persone, dai viaggi, dagli avvenimenti, da quello che il domani tiene in serbo. Tu no. Tu sai che il meglio che ci si può aspettare è di evitare il peggio.
The syntactical head / governor of the token "sono" is "tanti", and the dependency relation is "cop". However, in the output of Stanford CoreNLP running on API in python, "sono" is the ROOT.
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Actually, while I happened to notice the annotator issue and have been working on fixing it, when I run that particular example I still get the expected head.
From the basic dependencies:
edge {
source: 3
target: 2
dep: "cop"
isExtra: false
sourceCopy: 0
targetCopy: 0
language: UniversalEnglish
}
and down at the bottom:
root: 3
I suppose labeling the language "UniversalEnglish" also needs fixed.
Beta Was this translation helpful? Give feedback.