当前位置: 首页>>代码示例>>Java>>正文


Java IWiktionaryPage.getEntry方法代码示例

本文整理汇总了Java中de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage.getEntry方法的典型用法代码示例。如果您正苦于以下问题:Java IWiktionaryPage.getEntry方法的具体用法?Java IWiktionaryPage.getEntry怎么用?Java IWiktionaryPage.getEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage的用法示例。


在下文中一共展示了IWiktionaryPage.getEntry方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testKiefer

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testKiefer() throws Exception {
	IWiktionaryPage page = parse("Kiefer.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryWordForm> actualIter = entry.getWordForms().iterator();
	assertWordFormNoun("die Kiefer", GrammaticalCase.NOMINATIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("die Kiefern", GrammaticalCase.NOMINATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("der Kiefer", GrammaticalCase.GENITIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("der Kiefern", GrammaticalCase.GENITIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("der Kiefer", GrammaticalCase.DATIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("den Kiefern", GrammaticalCase.DATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("die Kiefer", GrammaticalCase.ACCUSATIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("die Kiefern", GrammaticalCase.ACCUSATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertFalse(actualIter.hasNext());
	entry = page.getEntry(1);
	actualIter = entry.getWordForms().iterator();
	assertWordFormNoun("Kiefer", null, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("Kiefer", null, GrammaticalNumber.PLURAL, actualIter.next());
	assertFalse(actualIter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:21,代码来源:DEWordFormHandlerTest.java

示例2: testWater

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testWater() throws Exception {
	IWiktionaryPage page = parse("water.txt");
	IWiktionaryEntry entry;

	entry = page.getEntry(0);
	assertEquals(Language.ENGLISH, entry.getWordLanguage());
	assertEquals(PartOfSpeech.NOUN, entry.getPartOfSpeech());
	assertEquals("{{PIE root|en|wed}}\n" +
		"From {{etyl|enm|en}} {{m|enm|water|sc=Latn}}, from {{etyl|ang|en}} {{m|ang|wæter||water|sc=Latn}}, from " +
		"{{etyl|gem-pro|en}} {{m|gem-pro|*watōr||water}}, from {{etyl|ine-pro|en}} {{m|ine-pro|*wódr̥||water}}.\n" +
		"{{rel-top|cognates}}\n" +
		"Cognate with {{etyl|sco|-}} {{m|sco|wattir|sc=Latn}}, {{m|sco|watir||water|sc=Latn}}, " +
		"{{etyl|frr|-}} {{m|frr|weeter||water|sc=Latn}}, {{etyl|stq|-}} {{m|stq|woater||water|sc=Latn}}, " +
		"{{etyl|fy|-}} {{m|fy|wetter||water|sc=Latn}}, {{etyl|nl|-}} {{m|nl|water||water|sc=Latn}}, " +
		"{{etyl|nds|-}} {{m|nds|Water||water|sc=Latn}}, {{etyl|de|-}} {{m|de|Wasser|sc=Latn}}, {{etyl|sv|-}} " +
		"{{m|sv|vatten||water|sc=Latn}}, {{etyl|is|-}} {{m|is|vatn||water|sc=Latn}}, {{etyl|sga|-}} coin " +
		"{{m|sga|fodorne||otters|lit=water-dogs|sc=Latn}}, {{etyl|la|-}} {{m|la|unda||wave|sc=Latn}}, " +
		"{{etyl|lt|-}} {{m|lt|vanduõ||water|sc=Latn}}, {{etyl|ru|-}} {{m|ru|вода́||water}}, {{etyl|sq|-}} " +
		"{{m|sq|ujë||water|sc=Latn}}, {{etyl|grc|-}} {{m|grc|ὕδωρ||water}}, {{etyl|hy|-}} {{m|hy|գետ||river}}, " +
		"{{etyl|sa|-}} {{m|sa|उदन्|tr=udán||wave, water|sc=Deva}}, {{etyl|hit|-}} " +
		"{{m|hit|\uD808\uDE7F\uD808\uDC00\uD808\uDEFB|wa-a-tar|sc=Xsux}}.\n" +
		"{{rel-bottom}}",
		entry.getWordEtymology().getText());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:26,代码来源:ENEtymologyHandlerTest.java

示例3: testPlant

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testPlant() throws Exception {
	IWiktionaryPage page = parse("plant.txt");		
	IWiktionaryEntry entry;
	
	entry = page.getEntry(0);
	assertEquals(Language.ENGLISH, entry.getWordLanguage());
	assertEquals(PartOfSpeech.NOUN, entry.getPartOfSpeech());
	assertEquals("From {{etyl|la}} {{term|planta|lang=la}}, later influenced by French {{term|plante}}.", entry.getWordEtymology().getText());
	
	entry = page.getEntry(1);
	assertEquals(Language.ENGLISH, entry.getWordLanguage());
	assertEquals(PartOfSpeech.VERB, entry.getPartOfSpeech());
	assertEquals("{{etyl|la}} {{term|plantare|lang=la}}, later influenced by Old French {{term|planter}}.", entry.getWordEtymology().getText());
	
	entry = page.getEntry(2);
	assertEquals("Danish", entry.getWordLanguage().getName());
	assertEquals(PartOfSpeech.VERB, entry.getPartOfSpeech());
	assertNull(entry.getWordEtymology());
	
	entry = page.getEntry(3);
	assertEquals("Dutch", entry.getWordLanguage().getName());
	assertEquals(PartOfSpeech.NOUN, entry.getPartOfSpeech());
	assertEquals("{{etyl|fr|nl}} ''[[plante]]'', from {{etyl|la|nl}} ''[[planta]]''", entry.getWordEtymology().getText());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:26,代码来源:ENEtymologyHandlerTest.java

示例4: testAbate

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testAbate() throws Exception {
	IWiktionaryPage page = parse("abate.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWikiString> actualIter = entry.getReferences().iterator();
	assertEquals("{{R:OneLook}}", actualIter.next().getText());
	assertEquals("{{R:Webster 1913}}", actualIter.next().getText());
	assertFalse(actualIter.hasNext());
	
	entry = page.getEntry(1);
	actualIter = entry.getReferences().iterator();
	assertEquals("{{R:OneLook}}", actualIter.next().getText());
	assertEquals("{{R:Webster 1913}}", actualIter.next().getText());
	assertFalse(actualIter.hasNext());
	
	entry = page.getEntry(2);
	actualIter = entry.getReferences().iterator();
	assertFalse(actualIter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:20,代码来源:ENReferenceHandlerTest.java

示例5: testSynonymsShutUp

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testSynonymsShutUp() throws Exception {
	IWiktionaryPage page = parse("shut_up.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryRelation> iter = entry.getSense(6).getRelations(SYNONYM).iterator();
	assertRelation(SYNONYM, "be quiet", iter.next());
	assertRelation(SYNONYM, "be silent", iter.next());
	assertRelation(SYNONYM, "fall silent", iter.next());
	assertRelation(SYNONYM, "hush", iter.next());
	assertRelation(SYNONYM, "quieten down", iter.next());
	assertRelation(SYNONYM, "shush", iter.next());
	assertRelation(SYNONYM, "be quiet!", iter.next());
	assertRelation(SYNONYM, "can it!", iter.next());
	assertRelation(SYNONYM, "hush!", iter.next());
	assertRelation(SYNONYM, "put a sock in it!", iter.next());
	assertRelation(SYNONYM, "quiet!", iter.next());
	assertRelation(SYNONYM, "sh!", iter.next());
	assertRelation(SYNONYM, "shush!", iter.next());
	assertRelation(SYNONYM, "shut it!", iter.next());
	assertRelation(SYNONYM, "shut your face!", iter.next());
	assertRelation(SYNONYM, "shaddap", iter.next());
	assertRelation(SYNONYM, "silence!", iter.next());
	assertRelation(SYNONYM, "st!", iter.next());
	assertRelation(SYNONYM, "STFU", iter.next());
	assertFalse(iter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:27,代码来源:ENSemanticRelationHandlerTest.java

示例6: testSynonymsHead

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testSynonymsHead() throws Exception {
	IWiktionaryPage page = parse("head.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryRelation> iter = entry.getSense(13).getRelations(SYNONYM).iterator();
	assertRelation(SYNONYM, "headmaster", iter.next());
	assertRelation(SYNONYM, "headmistress", iter.next());
	assertRelation(SYNONYM, "principal", iter.next());
	assertFalse(iter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:11,代码来源:ENSemanticRelationHandlerTest.java

示例7: testRuettelstreifen

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testRuettelstreifen() throws Exception {
	IWiktionaryPage page = parse("Ruettelstreifen.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryExample> exampleIter = entry.getSense(1).getExamples().iterator();
	assertEquals("„Eine wirksame Maßnahme die Verkehrssicherheit zu steigern, sind z.B.: profilierte Fahrbahnmarkierungen oder ''Rüttelstreifen'' auf der Standspur.“", exampleIter.next().getText());
	assertEquals("„''Rüttelstreifen'' am Fahrbahnrand von Autobahnen können die Zahl übermüdungsbedingter Verkehrsunfälle deutlich reduzieren.“", exampleIter.next().getText());
	assertEquals("„Schwere Autobahn-Unfälle können mit Hilfe von sogenannten ''Rüttelstreifen'' deutlich verringert werden.“", exampleIter.next().getText());
	assertFalse(exampleIter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:11,代码来源:DESenseExampleHandlerTest.java

示例8: testAberration

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testAberration() throws Exception {
	IWiktionaryPage page = parse("Aberration.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryWordForm> actualIter = entry.getWordForms().iterator();
	assertWordFormNoun("Aberration", null, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("Aberrationen", null, GrammaticalNumber.PLURAL, actualIter.next());
	assertFalse(actualIter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:10,代码来源:DEWordFormHandlerTest.java

示例9: testSynonymsAbdominal

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testSynonymsAbdominal() throws Exception {
	IWiktionaryPage page = parse("abdominal.txt");
	IWiktionaryEntry entry = page.getEntry(1);
	Iterator<IWiktionaryRelation> iter = entry.getSense(1).getRelations(SYNONYM).iterator();
	assertRelation(SYNONYM, "Cypriniformes", iter.next());
	assertFalse(iter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:9,代码来源:ENSemanticRelationHandlerTest.java

示例10: testStaat

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testStaat() throws Exception {
	IWiktionaryPage page = parse("Staat.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryWordForm> actualIter = entry.getWordForms().iterator();
	assertWordFormNoun("der Staat", GrammaticalCase.NOMINATIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("die Staaten", GrammaticalCase.NOMINATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("die Stäte", GrammaticalCase.NOMINATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("die Staat", GrammaticalCase.NOMINATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("die Staate", GrammaticalCase.NOMINATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("des Staates", GrammaticalCase.GENITIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("des Staats", GrammaticalCase.GENITIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("der Staaten", GrammaticalCase.GENITIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("der Stäte", GrammaticalCase.GENITIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("der Staat", GrammaticalCase.GENITIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("der Staate", GrammaticalCase.GENITIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("dem Staate", GrammaticalCase.DATIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("dem Staat", GrammaticalCase.DATIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("den Staaten", GrammaticalCase.DATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("den Stäten", GrammaticalCase.DATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("den Staaten", GrammaticalCase.DATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("den Staaten", GrammaticalCase.DATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("den Staat", GrammaticalCase.ACCUSATIVE, GrammaticalNumber.SINGULAR, actualIter.next());
	assertWordFormNoun("die Staaten", GrammaticalCase.ACCUSATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("die Stäte", GrammaticalCase.ACCUSATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("die Staat", GrammaticalCase.ACCUSATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertWordFormNoun("die Staate", GrammaticalCase.ACCUSATIVE, GrammaticalNumber.PLURAL, actualIter.next());
	assertFalse(actualIter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:30,代码来源:DEWordFormHandlerTest.java

示例11: testFindMatchingSenseWithMatch

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
public void testFindMatchingSenseWithMatch() throws Exception {
	IWiktionaryPage page = parse("casa.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	final WiktionarySense sense = findMatchingSense((WiktionaryEntry) entry, "home");
	assertNotNull(sense);
	assertEquals("{{l/en|home}} {{gloss|one’s own dwelling place}}", sense.getGloss().getText());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:8,代码来源:ENSemanticRelationHandlerTest.java

示例12: testLodka

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testLodka() throws Exception {
	IWiktionaryPage page = parse("lodka.txt", "лодка");
	IWiktionaryEntry entry;
	
	assertEquals(1, page.getEntryCount());
	entry = page.getEntry(0);
	assertEquals(PartOfSpeech.NOUN, entry.getPartOfSpeech());
	assertEquals(1, entry.getSenseCount());
	assertEquals("водное транспортное средство, небольшое судно, идущее на вёслах, под парусом или на моторной тяге", entry.getSense(1).getGloss().getPlainText());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:12,代码来源:WikokitParserTest.java

示例13: testGut

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testGut() throws Exception {
	IWiktionaryPage page = parse("gut.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryWordForm> actualIter = entry.getWordForms().iterator();
	assertWordFormAdjective("gut", GrammaticalDegree.POSITIVE, actualIter.next());
	assertWordFormAdjective("besser", GrammaticalDegree.COMPARATIVE, actualIter.next());
	assertWordFormAdjective("am besten", GrammaticalDegree.SUPERLATIVE, actualIter.next());
	assertFalse(actualIter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:11,代码来源:DEWordFormHandlerTest.java

示例14: testSynonymsDrink

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testSynonymsDrink() throws Exception {
	IWiktionaryPage page = parse("drink.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	Iterator<IWiktionaryRelation> iter = entry.getSense(2).getRelations(SYNONYM).iterator();
	assertRelation(SYNONYM, "gulp", iter.next());
	assertRelation(SYNONYM, "imbibe", iter.next());
	assertRelation(SYNONYM, "quaff", iter.next());
	assertRelation(SYNONYM, "sip", iter.next());
	assertRelation(SYNONYM, "Wikisaurus:drink", iter.next());
	assertFalse(iter.hasNext());
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:13,代码来源:ENSemanticRelationHandlerTest.java

示例15: testLiter

import de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage; //导入方法依赖的package包/类
/***/
public void testLiter() throws Exception {
	IWiktionaryPage page = parse("Liter.txt");
	IWiktionaryEntry entry = page.getEntry(0);
	assertEquals(GrammaticalGender.NEUTER, entry.getGender());
	assertEquals(2, entry.getGenders().size());
	assertEquals(GrammaticalGender.NEUTER, entry.getGenders().get(0));
	assertEquals(GrammaticalGender.MASCULINE, entry.getGenders().get(1));
}
 
开发者ID:dkpro,项目名称:dkpro-jwktl,代码行数:10,代码来源:DEPartOfSpeechHandlerTest.java


注:本文中的de.tudarmstadt.ukp.jwktl.api.IWiktionaryPage.getEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。