public void testDid() throws Exception { IWiktionaryPage page = parse("did.txt"); Iterator<? extends IWiktionaryEntry> entryIter = page.getEntries().iterator(); assertEntry(Language.findByName("Translingual"), PartOfSpeech.NUMBER, 1, entryIter.next()); assertEntry(Language.ENGLISH, PartOfSpeech.VERB, 1, entryIter.next()); assertEntry(Language.findByName("Old Welsh"), PartOfSpeech.NOUN, 1, entryIter.next()); assertFalse(entryIter.hasNext()); }
public void testAbele() throws Exception { IWiktionaryPage page = parse("abele.txt"); Iterator<? extends IWiktionaryEntry> entryIter = page.getEntries().iterator(); assertEntry(Language.ENGLISH, PartOfSpeech.NOUN, 1, entryIter.next()); assertEntry(Language.findByName("Novial"), PartOfSpeech.NOUN, 1, entryIter.next()); assertFalse(entryIter.hasNext()); }
public void testBass() throws Exception { IWiktionaryPage page = parse("bass.txt"); Iterator<? extends IWiktionaryEntry> entryIter = page.getEntries().iterator(); assertEntry(Language.ENGLISH, PartOfSpeech.ADJECTIVE, 1, entryIter.next()); assertEntry(Language.ENGLISH, PartOfSpeech.NOUN, 5, entryIter.next()); assertEntry(Language.ENGLISH, PartOfSpeech.NOUN, 1, entryIter.next()); assertEntry(Language.findByName("Romansch"), PartOfSpeech.ADJECTIVE, 1, entryIter.next()); assertFalse(entryIter.hasNext()); }
public void testMay() throws Exception { IWiktionaryPage page = parse("may.txt"); Iterator<? extends IWiktionaryEntry> entryIter = page.getEntries().iterator(); /*while (entryIter.hasNext()) { IWiktionaryEntry e = entryIter.next(); System.out.println(e.getWord() + ":" + e.getPartOfSpeech() + "/" + e.getWordLanguage()); for (IWiktionarySense s : e.getSenses()) System.out.println(" " + s.getIndex() + ": " + s.getGloss()); }*/ assertEntry(Language.ENGLISH, PartOfSpeech.VERB, 4, entryIter.next()); assertEntry(Language.ENGLISH, PartOfSpeech.NOUN, 1, entryIter.next()); assertEntry(Language.ENGLISH, PartOfSpeech.VERB, 1, entryIter.next()); assertEntry(Language.findByName("Crimean Tatar"), PartOfSpeech.NOUN, 1, entryIter.next()); assertEntry(Language.findByName("Kurdish"), PartOfSpeech.NOUN, 1, entryIter.next()); assertEntry(Language.findByName("Mapudungun"), PartOfSpeech.ADVERB, 1, entryIter.next()); assertEntry(Language.findByName("Tagalog"), PartOfSpeech.VERB, 1, entryIter.next()); assertEntry(Language.findByName("Tatar"), PartOfSpeech.NOUN, 1, entryIter.next()); assertFalse(entryIter.hasNext()); }