public void testRomajiReadingsHalfWidth() throws IOException {
Analyzer a = new Analyzer() {
@Override
protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
Tokenizer tokenizer = new JapaneseTokenizer(newAttributeFactory(), reader, null, true, JapaneseTokenizer.Mode.SEARCH);
TokenStream stream = new CJKWidthFilter(tokenizer);
return new TokenStreamComponents(tokenizer, new JapaneseReadingFormFilter(stream, true));
}
};
assertAnalyzesTo(a, "今夜はロバート先生と話した",
new String[] { "kon'ya", "ha", "robato", "sensei", "to", "hanashi", "ta" }