报错:没有为类型 WordAlert 定义方法 isEnglish(String)
源码如下:
public static List recognition(List words, int offe) {
List terms = new ArrayList(words.size());
int tempOffe = 0;
String[] params = null;
for (String word : words) {
// 获得词性 , 先从系统辞典,再从用户自定义辞典
AnsjItem ansjItem = DATDictionary.getItem(word);
TermNatures tn = null;
if ((params = UserDefineLibrary.getParams(word)) != null) {
tn = new TermNatures(new TermNature(params[0], 1));
} else if (ansjItem.termNatures != TermNatures.NULL) {
tn = ansjItem.termNatures;
} else if(WordAlert.isEnglish(word)){
tn = TermNatures.EN ;
} else if(WordAlert.isNumber(word)){
tn = TermNatures.M ;
} else{
tn = TermNatures.NULL ;
}
terms.add(new Term(word, offe + tempOffe, tn));
tempOffe += word.length();
}
new NatureRecognition(terms).recognition();
return terms;
}