Package morfologik.stemming.PolishStemmer

Examples of morfologik.stemming.PolishStemmer.DICTIONARY


  public void init(Map<String,String> args) {
    super.init(args);
    String dictionaryName = args.get(DICTIONARY_SCHEMA_ATTRIBUTE);
    if (dictionaryName != null && !dictionaryName.isEmpty()) {
      try {
        DICTIONARY dictionary = DICTIONARY.valueOf(dictionaryName.toUpperCase(Locale.ROOT));
        assert dictionary != null;
        this.dictionary = dictionary;
      } catch (IllegalArgumentException e) {
        throw new IllegalArgumentException("The " + DICTIONARY_SCHEMA_ATTRIBUTE + " attribute accepts the "
            + "following constants: " + Arrays.toString(DICTIONARY.values()) + ", this value is invalid: " 
View Full Code Here


  }

  /** */
  public final void testKeywordAttrTokens() throws IOException {
    final Version version = TEST_VERSION_CURRENT;
    final DICTIONARY dictionary = DICTIONARY.COMBINED;

    Analyzer a = new MorfologikAnalyzer(version, dictionary) {
      @Override
      protected TokenStreamComponents createComponents(String field, Reader reader) {
        final CharArraySet keywords = new CharArraySet(version, 1, false);
View Full Code Here

  public MorfologikFilterFactory(Map<String,String> args) {
    super(args);
    String dictionaryName = get(args, DICTIONARY_SCHEMA_ATTRIBUTE);
    if (dictionaryName != null && !dictionaryName.isEmpty()) {
      try {
        DICTIONARY dictionary = DICTIONARY.valueOf(dictionaryName.toUpperCase(Locale.ROOT));
        assert dictionary != null;
        this.dictionary = dictionary;
      } catch (IllegalArgumentException e) {
        throw new IllegalArgumentException("The " + DICTIONARY_SCHEMA_ATTRIBUTE + " attribute accepts the "
            + "following constants: " + Arrays.toString(DICTIONARY.values()) + ", this value is invalid: " 
View Full Code Here

TOP

Related Classes of morfologik.stemming.PolishStemmer.DICTIONARY

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.