@Test public void nounAttributesTest() { List<ItemAttrPair> testList = Lists.newArrayList( testPair("takat [A:NoVoicing, InverseHarmony]", NoVoicing, InverseHarmony), testPair("nakit [A: LastVowelDrop]", Voicing, LastVowelDrop), testPair("ret [A:Voicing, Doubling]", Voicing, Doubling) ); for (ItemAttrPair pair : testList) { DictionaryItem item = TurkishDictionaryLoader.loadFromString(pair.str); Assert.assertEquals(Noun, item.primaryPos); Assert.assertEquals("error in:" + pair.str, pair.attrs, item.attributes); } }
public static DictionaryItem loadFromString(String dictionaryLine) { String lemma = dictionaryLine; if (dictionaryLine.contains(" ")) { lemma = dictionaryLine.substring(0, dictionaryLine.indexOf(" ")); } return load(dictionaryLine).getMatchingItems(lemma).get(0); }
TurkishDictionaryLoader { public static DictionaryItem loadFromString(String dictionaryLine) { String lemma = dictionaryLine; if (dictionaryLine.contains(" ")) { lemma = dictionaryLine.substring(0, dictionaryLine.indexOf(" ")); } return load(dictionaryLine).getMatchingItems(lemma).get(0); } }
TurkishDictionaryLoader { public static DictionaryItem loadFromString(String dictionaryLine) { String lemma = dictionaryLine; if (dictionaryLine.contains(" ")) { lemma = dictionaryLine.substring(0, dictionaryLine.indexOf(" ")); } return load(dictionaryLine).getMatchingItems(lemma).get(0); }  }
TurkishDictionaryLoader { public static DictionaryItem loadFromString(String dictionaryLine) { String lemma = dictionaryLine; if (dictionaryLine.contains(" ")) { lemma = dictionaryLine.substring(0, dictionaryLine.indexOf(" ")); } return load(dictionaryLine).getMatchingItems(lemma).get(0); }  static RootLexicon loadDefaultDictionaries(); static RootLexicon loadFromResources(String... resourcePaths); static RootLexicon loadFromResources(Collection<String> resourcePaths); static RootLexicon load(File input); static RootLexicon loadInto(RootLexicon lexicon, File input); static DictionaryItem loadFromString(String dictionaryLine); static RootLexicon load(String... dictionaryLines); static RootLexicon load(Iterable<String> dictionaryLines); }
TurkishDictionaryLoader { public static DictionaryItem loadFromString(String dictionaryLine) { String lemma = dictionaryLine; if (dictionaryLine.contains(" ")) { lemma = dictionaryLine.substring(0, dictionaryLine.indexOf(" ")); } return load(dictionaryLine).getMatchingItems(lemma).get(0); }  static RootLexicon loadDefaultDictionaries(); static RootLexicon loadFromResources(String... resourcePaths); static RootLexicon loadFromResources(Collection<String> resourcePaths); static RootLexicon load(File input); static RootLexicon loadInto(RootLexicon lexicon, File input); static DictionaryItem loadFromString(String dictionaryLine); static RootLexicon load(String... dictionaryLines); static RootLexicon load(Iterable<String> dictionaryLines); static final List<String> DEFAULT_DICTIONARY_RESOURCES; }