Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error on Italian Model (stanford-corenlp-4.4.0-models-italian.jar) #1258

ClaudeHu started this conversation in General
Discussion options

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)

You must be logged in to vote

Replies: 3 comments 1 reply

Comment options

Would you give an example where the output is different?
...
On Mon, Mar 14, 2022 at 10:53 AM ClaudeHu ***@***.***> wrote: 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 StanfordCoreNLPparams = {'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'])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) — Reply to this email directly, view it on GitHub <#1258>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA2AYWKMGNXBGLOGSMRSOO3U754IXANCNFSM5QWJGH2A> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
You must be logged in to vote
1 reply
Comment options

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.

Comment options

Got it. It seems the python client is accidentally adding a few annotators which aren't appropriate for Italian. I'll look into it
...
On Mon, Mar 14, 2022 at 3:14 PM ClaudeHu ***@***.***> wrote: In the 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. — Reply to this email directly, view it on GitHub <#1258 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AA2AYWKD2VMUO5YBGG5FBOLU7625ZANCNFSM5QWJGH2A> . Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. You are receiving this because you commented.Message ID: ***@***.***>
You must be logged in to vote
0 replies
Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /