0

我正在尝试使用斯坦福标记器将复数替换为单数(例如从女孩到女孩)。

private static final String vbnTag = "VBN";
private static final String vbdTag = "VBD";
private static final String jjTag = "JJ";
private static final String edSuff = "ed";
private static final String enSuff = "en";
private static final String oneSt = "1";
private static final String naWord = "NA";

private static final Pattern stopper = Pattern.compile("(?i:and|or|but|,|;|-|--)");
private static final Pattern vbnWord = Pattern.compile("(?i:have|has|having|had|is|am|are|was|were|be|being|been|'ve|'s|s|'d|'re|'m|gotten|got|gets|get|getting)"); // cf. list in EnglishPTBTreebankCorrector

我做得对吗?

4

1 回答 1

0

我认为您可以借助斯坦福核心 NLP 中提供的词形还原注释来做到这一点。

于 2013-08-14T18:33:12.290 回答