我正在尝试使用德语的StanfordNamedEntityRecognizer。我从dkpro加载了一个模型。不幸的是,该模型不被识别。相反,NER尝试使用任何地方都不提供的不同模型。
我如何告诉AE使用哪个模型?例如,用"model-ner-de-Person“代替"model-ner-de-nemgp”。
这是我的主ruta文件:
PACKAGE org.apache.uima.ruta.novel;
IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.lexmorph.type.pos FROM desc.type.POS AS pos;
IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Sentence FROM desc.type.LexicalUnits AS sentence;
IMPORT PACKAGE de.tudarmstadt.ukp.dkpro.core.api.ner.type.NamedEntity FROM desc.type.NamedEntity;
UIMAFIT de.tudarmstadt.ukp.dkpro.core.opennlp.OpenNlpSegmenter;
UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordPosTagger;
UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordParser;
UIMAFIT de.tudarmstadt.ukp.dkpro.core.stanfordnlp.StanfordNamedEntityRecognizer;
uima.tcas.DocumentAnnotation{-CONTAINS(pos.POS)} -> {
uima.tcas.DocumentAnnotation{-> SETFEATURE("language", "de")};
EXEC(OpenNlpSegmenter);
EXEC(StanfordPosTagger, {pos.POS});
EXEC(StanfordNamedEntityRecognizer);
};发布于 2019-08-22 17:05:59
检查相应的descriptor.xml时,我发现了configurationParameter "modelVariant“。我在Ruta脚本中添加了以下几行代码,从而解决了我的请求。
这会将StanfordNamedEntityRecognizer的modelVariant设置为我首选的名为"germeval2014.hgc_175m_600.crf“的模型。
Document{-> CONFIGURE(StanfordNamedEntityRecognizer, "modelVariant" = "germeval2014.hgc_175m_600.crf")};https://stackoverflow.com/questions/57252687
复制相似问题