try?{
IKAnalyzer?ikAnalyzer?=?new?IKAnalyzer();
TokenStream?ts?=?ikAnalyzer.tokenStream("f",?"中华人民***和国");
ts.addAttribute(CharTermAttribute.class);
ts.reset();
while(ts.incrementToken())?{
System.out.println(ts.getAttribute(CharTermAttribute.class));
}
ts.close();
ikAnalyzer.close();
}?catch?(IOException?e)?{
e.printStackTrace();
}
我的不报错