我正在使用OpenNLP进行POS标记,我发现这非常慢。
posTagger = PosModelFactory.getPosModel("en");
String sent[] = new String[]{"Most", "large", "cities", "in", "the", "US", "had",
"morning", "and", "afternoon", "newspapers", "."};
String tags[] = posTagger .tag(sent);
我使用此代码获取5个句子的样本,这是我在几分钟内获得PoS的时间。
Time taken to pos 27
Time taken to pos 11
Time taken to pos 10
Time taken to pos 11
Time taken to pos 113
有没有办法提升这一点。 任何帮助将不胜感激。