クラスパスにjarとしてダウンロードされるドイツ語モデルのコアnlpサーバーを提供するには次のコマンドを使用しますが、ドイツ語のタグを出力したり解析しませんが、英語のモデルのみを読み込みます。英語のモデルにデフォルトのドイツ語のcorenlpモデル
java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -props ./german.prop
german.prop内容:
annotators = tokenize, ssplit, pos, depparse, parse
tokenize.language = de
pos.model = edu/stanford/nlp/models/pos-tagger/german/german-hgc.tagger
ner.model = edu/stanford/nlp/models/ner/german.hgc_175m_600.crf.ser.gz
ner.applyNumericClassifiers = false
ner.useSUTime = false
parse.model = edu/stanford/nlp/models/lexparser/germanFactored.ser.gz
depparse.model = edu/stanford/nlp/models/parser/nndep/UD_German.gz
クライアントコマンド:
wget --post-data ' Meine Mutter ist aus Wuppertal' 'localhost:9000/?properties"="{"tokenize.whitespace":"true","annotators":"tokenize, ssplit, pos, depparse, parse","outputFormat":"text","tokenize.language" :"de" ,
"pos.model":" edu/stanford/nlp/models/pos-tagger/german/german-hgc.tagger",
"depparse.model" : "edu/stanford/nlp/models/parser/nndep/UD_German.gz",
"parse.model" : "edu/stanford/nlp/models/lexparser/germanFactored.ser.gz"
}' -O -
私は、次の取得誤った出力:
{"dep":"dep","governor":4,"governorGloss":"aus","dependent":5,"dependentGloss":"Wuppertal"}],"openie":[{"subject":"Wuppertal","subjectSpan":[4,5],"relation":"is ist aus of","relationSpan":[2,4],"object":"Meine Mutter","objectSpan":[0,2]}],"tokens":[{"index":1,"word":"Meine","originalText":"Meine","lemma":"Meine","characterOffsetBegin":1,"characterOffsetEnd":6,"pos":"NNP","ner":"PERSON","speaker":"PER0","before":" ","after":" "},{"index":2,"word":"Mutter","originalText":"Mutter","lemma":"Mutter","characterOffsetBegin":7,"characterOffsetEnd":13,"pos":"NNP","ner":"PERSON","speaker":"PER0","before":" ","after":" "},{"index":3,"word":"ist","originalText":"ist","lemma":"ist","characterOffsetBegin":14,"characterOffsetEnd":17,"pos":"NN","ner":"O","speaker":"PER0","before":" ","after":" "},{"index":4,"word":"aus","originalText":"aus","lemma":"aus","characterOffsetBegin":18,"characterOffsetEnd":21,"pos":"NN","ner":"O","speaker":"PER0","before":" ","after":" "},{"index":5,"word":"Wuppertal","originalText":"Wuppertal","lemma":"Wuppertal","characterOffsetBegin":22,"characterOffsetEnd":31,"pos":"NNP","ner":"LOCATI100%[==========================================================================>] 2,
サーバーログには、私が見るそれは起動時にドイツのモデルを示しています本家の英語のモデルをロードします。
pos.model=edu/stanford/nlp/models/pos-tagger/ge...
parse.model=edu/stanford/nlp/models/lexparser/ger...
tokenize.language=de
depparse.model=edu/stanford/nlp/models/parser/nndep/...
annotators=tokenize, ssplit, pos, depparse, parse
Starting server on port 9000 with timeout of 5000 milliseconds.
StanfordCoreNLPServer listening at /0:0:0:0:0:0:0:0:9000
[/203.:61563] API call w/annotators tokenize,ssplit,pos,depparse
Die Katze liegt auf der Matte.
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator tokenize
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.TokenizerAnnotator - TokenizerAnnotator: No tokenizer type provided. Defaulting to PTBTokenizer.
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator ssplit
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator pos
Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... done [1.5 sec].
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator depparse
Loading depparse model file: edu/stanford/nlp/models/parser/nndep/english_UD.gz ...
PreComputed 100000, Elapsed Time: 1.396 (s)
もフランス語モデルの点で同じエラーのため、次の質問同じ問題にもかかわらず、それはサーバーケースの問題を解決していない、私はサーバを使用せずに正しい出力を得ることができるとedu.stanford.nlp.pipeline.StanfordCoreNLP command
を使用して、 French dependency parsing using CoreNLP
おかげで、そのさえ公表されたバージョンでは今、新しいものは、ここで「pipelineLanguage」される作業:「ドイツ語」corenlpサーバーもどこにも!、文書化されています正しい視覚表現が得られるようにインターフェースも変更する必要があります – stackit