与本地 MaxentTagger 标签不同的在线解析器标签
Online parser tags different to local MaxentTagger tags
我是运行 MaxentTagger 直接这样:
private void test() {
MaxentTagger tagger = new MaxentTagger(modelsdir + "wsj-0-18-bidirectional-distsim.tagger");
String input = "Someone will trip over that cable.";
System.out.println(tagger.tagString(input));
}
并获得以下输出:
Someone_NN will_NN trip_NN over_IN that_DT cable_NN ._.
但是当使用在线解析器时,我得到了这个输出:
Your query
Someone will trip over that cable.
标记
Someone/NN will/MD trip/VB over/RP that/DT cable/NN ./.
我尝试使用不同的模型:
MaxentTagger tagger = new MaxentTagger(models + "english-left3words-distsim.tagger");
Someone_NN will_MD trip_NN over_IN that_DT cable_NN ._.
但我似乎无法获得与在线版本相同的结果。
为什么我在使用 MaxentTagger 时得到的单词标签与在线版本不同?
我应该在初始化 MaxentTagger 时使用参数吗?
"online parser" 你指的是 CoreNLP 演示还是 Stanford Parser 演示?后者将从句子的解析树中分配词性标记,这可能与词性标记器分配的不同。
我是运行 MaxentTagger 直接这样:
private void test() {
MaxentTagger tagger = new MaxentTagger(modelsdir + "wsj-0-18-bidirectional-distsim.tagger");
String input = "Someone will trip over that cable.";
System.out.println(tagger.tagString(input));
}
并获得以下输出:
Someone_NN will_NN trip_NN over_IN that_DT cable_NN ._.
但是当使用在线解析器时,我得到了这个输出:
Your query
Someone will trip over that cable.
标记
Someone/NN will/MD trip/VB over/RP that/DT cable/NN ./.
我尝试使用不同的模型:
MaxentTagger tagger = new MaxentTagger(models + "english-left3words-distsim.tagger");
Someone_NN will_MD trip_NN over_IN that_DT cable_NN ._.
但我似乎无法获得与在线版本相同的结果。
为什么我在使用 MaxentTagger 时得到的单词标签与在线版本不同?
我应该在初始化 MaxentTagger 时使用参数吗?
"online parser" 你指的是 CoreNLP 演示还是 Stanford Parser 演示?后者将从句子的解析树中分配词性标记,这可能与词性标记器分配的不同。