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 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 testPortmanteau() throws Exception { IWiktionaryPage page = parse("portmanteau.txt"); Iterator<? extends IWiktionaryEntry> entryIter = page.getEntries().iterator(); assertEntry(Language.ENGLISH, PartOfSpeech.NOUN, 1, entryIter.next()); assertEntry(Language.ENGLISH, PartOfSpeech.NOUN, 1, entryIter.next()); assertEntry(Language.ENGLISH, PartOfSpeech.ADJECTIVE, 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 testIt_s() throws Exception { /*BufferedReader r = new BufferedReader( new InputStreamReader(new FileInputStream( new File("src/test/resources/articles-en/it_s.txt")), "UTF-8")); String line; while ((line = r.readLine()) != null) System.out.println(line); r.close(); System.out.println(); System.out.println();*/ IWiktionaryPage page = parse("it_s.txt"); Iterator<? extends IWiktionaryEntry> entryIter = page.getEntries().iterator(); assertEntry(Language.ENGLISH, PartOfSpeech.CONTRACTION, 2, 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()); }