@Test public void shouldCreateLexemesFromMasterDictionary() { final HashSet<Lexeme> lexemes = DictionaryLoader.loadDefaultMasterDictionary(); assertThat(lexemes.size() > 1, equalTo(true)); for (Lexeme immutableLexeme : lexemes) { assertThat(immutableLexeme.getLemma(), not(isEmptyOrNullString())); assertThat(immutableLexeme.getLemmaRoot(), not(isEmptyOrNullString())); assertThat(immutableLexeme.getPrimaryPos(), notNullValue()); assertThat(immutableLexeme.getPrimaryPos(), not(equalTo(PrimaryPos.Numeral))); assertThat(immutableLexeme.getSecondaryPos(), not(isIn(SecondaryPos.NUMERAL_APPLICABLE))); assertThat(immutableLexeme.getAttributes(), notNullValue()); } }
public static HashSet<Lexeme> loadDefaultMasterDictionary() { final CharSource charSource = Resources.asCharSource(Resources.getResource("master-dictionary.dict"), Charset.forName("utf-8")); return new DictionaryLoader().load(charSource); }
DictionaryLoader { public static HashSet<Lexeme> loadDefaultMasterDictionary() { final CharSource charSource = Resources.asCharSource(Resources.getResource("master-dictionary.dict"), Charset.forName("utf-8")); return new DictionaryLoader().load(charSource); } }
DictionaryLoader { public static HashSet<Lexeme> loadDefaultMasterDictionary() { final CharSource charSource = Resources.asCharSource(Resources.getResource("master-dictionary.dict"), Charset.forName("utf-8")); return new DictionaryLoader().load(charSource); }  }
DictionaryLoader { public static HashSet<Lexeme> loadDefaultMasterDictionary() { final CharSource charSource = Resources.asCharSource(Resources.getResource("master-dictionary.dict"), Charset.forName("utf-8")); return new DictionaryLoader().load(charSource); }  static HashSet<Lexeme> loadDefaultMasterDictionary(); static HashSet<Lexeme> loadDefaultNumeralMasterDictionary(); HashSet<Lexeme> load(CharSource charSource); }
DictionaryLoader { public static HashSet<Lexeme> loadDefaultMasterDictionary() { final CharSource charSource = Resources.asCharSource(Resources.getResource("master-dictionary.dict"), Charset.forName("utf-8")); return new DictionaryLoader().load(charSource); }  static HashSet<Lexeme> loadDefaultMasterDictionary(); static HashSet<Lexeme> loadDefaultNumeralMasterDictionary(); HashSet<Lexeme> load(CharSource charSource);  }