/** Creates a new JapaneseKatakanaStemFilterFactory */ public JapaneseKatakanaStemFilterFactory(Map<String,String> args) { super(args); minimumLength = getInt(args, MINIMUM_LENGTH_PARAM, JapaneseKatakanaStemFilter.DEFAULT_MINIMUM_LENGTH); if (minimumLength < 2) { throw new IllegalArgumentException("Illegal " + MINIMUM_LENGTH_PARAM + " " + minimumLength + " (must be 2 or greater)"); } if (!args.isEmpty()) { throw new IllegalArgumentException("Unknown parameters: " + args); } }
@Override public void init(Map<String, String> args) { super.init(args); minimumLength = getInt(MINIMUM_LENGTH_PARAM, JapaneseKatakanaStemFilter.DEFAULT_MINIMUM_LENGTH); if (minimumLength < 2) { throw new IllegalArgumentException("Illegal " + MINIMUM_LENGTH_PARAM + " " + minimumLength + " (must be 2 or greater)"); } }
public KuromojiKatakanaStemmerFactory(IndexSettings indexSettings, Environment environment, String name, Settings settings) { super(indexSettings, name, settings); minimumLength = settings.getAsInt("minimum_length", JapaneseKatakanaStemFilter.DEFAULT_MINIMUM_LENGTH); }
@Override public TokenStream create(TokenStream tokenStream) { return new JapaneseKatakanaStemFilter(tokenStream, minimumLength); }
public KuromojiKatakanaStemmerFactory(final IndexSettings indexSettings, final Environment environment, final String name, final Settings settings) { super(indexSettings, name, settings); minimumLength = settings.getAsInt("minimum_length", JapaneseKatakanaStemFilter.DEFAULT_MINIMUM_LENGTH); }
@Override public TokenStream create(final TokenStream tokenStream) { return new JapaneseKatakanaStemFilter(tokenStream, minimumLength); }
@Override public TokenStream create(TokenStream input) { return new JapaneseKatakanaStemFilter(input, minimumLength); }