de.tudarmstadt.ukp.jwktl.api
Interface IWiktionaryEntry

All Known Implementing Classes:
WiktionaryEntry

public interface IWiktionaryEntry

A IWiktionaryEntry corresponds to a lexical entry. That is, a word defined by the language it is used in, its part of speech, its etymology and all information encoded for this word. The word "plant" has, for instance, separate entries for the English noun, the English verb, and the Dutch noun. The meaning of an entry is expressed by multiple IWiktionarySenses. Each IWiktionaryEntry belongs to exactly one IWiktionaryPage.

Author:
Christian M. Meyer

Method Summary
 String getEntryLink()
          Some lexical entries refer to other pages rather than encoding all information on the entry again.
 String getEntryLinkType()
          Returns the type of the getEntryLink(), for example, denoting that the entry is an old spelling variant of the linked entry.
 List<IWikiString> getExamples()
          Returns a list containing all sense definitions of the entry's senses (including the unassigned sense).
 GrammaticalGender getGender()
          Returns the grammatical gender of this lexical entry, which can be one of masculine, feminine, neuter.
 List<IWikiString> getGlosses()
          Returns a list containing all sense definitions of the entry's senses (including the unassigned sense).
 String getHeader()
          Returns the header of the lexical entry.
 long getId()
          Returns an ID of this entry that is unique for all entries of the containing IWiktionaryPage.
 int getIndex()
          Returns the index of this entry.
 String getKey()
          Returns a unique ID for this lexical entry.
 IWiktionaryPage getPage()
          Returns a reference to the IWiktionaryPage that contains this entry.
 long getPageId()
          Returns the ID of the IWiktionaryPage that contains this entry.
 PartOfSpeech getPartOfSpeech()
          Returns the first part of speech tag encoded for this lexical entry.
 List<PartOfSpeech> getPartsOfSpeech()
          Returns all part of speech tags encoded for this lexical entry.
 List<IPronunciation> getPronunciations()
          Returns a list of pronunciations for this lexical entry.
 List<IQuotation> getQuotations()
          Returns a list containing all quotations of the entry's senses (including the unassigned sense).
 List<IWikiString> getReferences()
          Returns a list containing all references of the entry's senses (including the unassigned sense).
 List<IWiktionaryRelation> getRelations()
          Returns a list containing all semantic relations of the entry's senses (including the unassigned sense).
 List<IWiktionaryRelation> getRelations(RelationType relationType)
          Returns a list containing all semantic relations of the entry's senses (including the unassigned sense) of the given type.
 IWiktionarySense getSense(int index)
          Returns the IWiktionarySense with the given index.
 int getSenseCount()
          Returns the number of IWiktionarySenses encoded for this lexical entry.
 Iterable<IWiktionarySense> getSenses()
          Returns the list of all IWiktionarySenses.
 Iterable<IWiktionarySense> getSenses(boolean includeUnassignedSense)
          Returns the list of all IWiktionarySenses.
 List<IWiktionaryTranslation> getTranslations()
          Returns a list containing all translations of the entry's senses (including the unassigned sense).
 List<IWiktionaryTranslation> getTranslations(ILanguage language)
          Returns a list containing all translations of the entry's senses (including the unassigned sense) to the given language.
 IWiktionarySense getUnassignedSense()
          Returns a dummy IWiktionarySense that contains all information that has not been assigned to a particular sense.
 String getWord()
          Returns the lemma of this lexical entry denoted by the page title.
 IWikiString getWordEtymology()
          Returns the etymology of this lexical entry as a IWikiString.
 List<IWiktionaryWordForm> getWordForms()
          Returns a list of word forms for this lexical entry.
 ILanguage getWordLanguage()
          Returns the language of this lexical entry.
 

Method Detail

getKey

String getKey()
Returns a unique ID for this lexical entry. The ID is unique for all IWiktionaryEntrys of the IWiktionaryEdition. Note however that the ID of an entry may differ between different software versions or dump dates.


getId

long getId()
Returns an ID of this entry that is unique for all entries of the containing IWiktionaryPage. Depending on the parsing mode, the ID may be a running number of entries or a sense index. Use getKey() for a globally unique identifier. Note however that the ID of an entry may differ between different software versions or dump dates. IMPORTANT: The entry ID is unstable w.r.t. to different API versions and dump files. Better rely on page IDs and eventually local indices.


getIndex

int getIndex()
Returns the index of this entry. That is, the running number of the entry in accordance to the list of entries of the IWiktionaryPage (starting at 0).


getPage

IWiktionaryPage getPage()
Returns a reference to the IWiktionaryPage that contains this entry.


getPageId

long getPageId()
Returns the ID of the IWiktionaryPage that contains this entry.


getWord

String getWord()
Returns the lemma of this lexical entry denoted by the page title. This method is equivalent to getPage().getTitle().


getHeader

String getHeader()
Returns the header of the lexical entry. This is usually the lemma of the entry (i.e. equivalent to getWord(), but there are some exceptions where the Wiktionary community uses a slightly different header.


getWordLanguage

ILanguage getWordLanguage()
Returns the language of this lexical entry. This does not necessarily correspond to the language of the IWiktionaryEdition; e.g., for French entries within the English Wiktionary edition.


getPartOfSpeech

PartOfSpeech getPartOfSpeech()
Returns the first part of speech tag encoded for this lexical entry. The first tag is usually the most important one, although there can be multiple tags. Use {link #getPartsOfSpeech()} to access all part of speech tags encoded. If the part of speech is unknown or not specified, null will be returned.


getPartsOfSpeech

List<PartOfSpeech> getPartsOfSpeech()
Returns all part of speech tags encoded for this lexical entry. Most of the time, only one part of speech tag is used. However, there are some cases, where multiple tags are used - e.g., for German adjectives/adverbs having the same form or for syntactic additions, such as "plurale tantum" (only taking the plural form). The ordering of tags used in Wiktionary is preserved. The resulted list is never null and includes at least one element.


getGender

GrammaticalGender getGender()
Returns the grammatical gender of this lexical entry, which can be one of masculine, feminine, neuter. If no gender is specified, null is returned.


getWordEtymology

IWikiString getWordEtymology()
Returns the etymology of this lexical entry as a IWikiString. The result might be null if no etymology has been encoded.


getEntryLink

String getEntryLink()
Some lexical entries refer to other pages rather than encoding all information on the entry again. This is similar to a redirect (IWiktionaryPage.getRedirectTarget()), but limited to the entry level. In addition to that, there might be further information provided.


getEntryLinkType

String getEntryLinkType()
Returns the type of the getEntryLink(), for example, denoting that the entry is an old spelling variant of the linked entry.


getPronunciations

List<IPronunciation> getPronunciations()
Returns a list of pronunciations for this lexical entry. The list might be null if not pronunciations are encoded.


getWordForms

List<IWiktionaryWordForm> getWordForms()
Returns a list of word forms for this lexical entry. The list might be null if not word forms are encoded.


getUnassignedSense

IWiktionarySense getUnassignedSense()
Returns a dummy IWiktionarySense that contains all information that has not been assigned to a particular sense. This is usually the case if the sense marker of an information does not match with any IWiktionarySense.getMarker() - e.g., containing question marks. The unassigned sense is never null. This method is equivalent to getSense(0).


getSense

IWiktionarySense getSense(int index)
Returns the IWiktionarySense with the given index. IMPORTANT: The index is a running number starting at 1. Providing parameter 0 yields the unassigned sense (equivalent to getUnassignedSense(). The maximum index is equivalent to getSenseCount() (rather than getSenseCount() - 1).

Throws:
ArrayIndexOutOfBoundsException - if there is no sense with the given index.

getSenseCount

int getSenseCount()
Returns the number of IWiktionarySenses encoded for this lexical entry.


getSenses

Iterable<IWiktionarySense> getSenses()
Returns the list of all IWiktionarySenses. The list is never null nor empty. The elements of the list are all senses of this entry, i.e. all senses with index 1 to getSenseCount(). This method is equivalent to getSenses(boolean) with parameter false.


getSenses

Iterable<IWiktionarySense> getSenses(boolean includeUnassignedSense)
Returns the list of all IWiktionarySenses. The list is never null nor empty. If the parameter is set to true, the first element (list index 0) is the unassigned sense (equivalent to getUnassignedSense(). The following elements are all senses of this entry, i.e. all senses with index 1 to getSenseCount().


getGlosses

List<IWikiString> getGlosses()
Returns a list containing all sense definitions of the entry's senses (including the unassigned sense). Hence, the method is a shorthand for invoking IWiktionarySense.getGloss() for each sense. The list is never null but might be empty.


getExamples

List<IWikiString> getExamples()
Returns a list containing all sense definitions of the entry's senses (including the unassigned sense). Hence, the method is a shorthand for invoking IWiktionarySense.getExamples() for each sense. The list is never null but might be empty.


getQuotations

List<IQuotation> getQuotations()
Returns a list containing all quotations of the entry's senses (including the unassigned sense). Hence, the method is a shorthand for invoking IWiktionarySense.getQuotations() for each sense. The list is never null but might be empty.


getRelations

List<IWiktionaryRelation> getRelations()
Returns a list containing all semantic relations of the entry's senses (including the unassigned sense). Hence, the method is a shorthand for invoking IWiktionarySense.getRelations() for each sense. The list is never null but might be empty.


getRelations

List<IWiktionaryRelation> getRelations(RelationType relationType)
Returns a list containing all semantic relations of the entry's senses (including the unassigned sense) of the given type. Hence, the method is a shorthand for invoking IWiktionarySense.getRelations(RelationType) for each sense. The list is never null but might be empty.


getReferences

List<IWikiString> getReferences()
Returns a list containing all references of the entry's senses (including the unassigned sense). Hence, the method is a shorthand for invoking IWiktionarySense.getReferences() for each sense. The list is never null but might be empty.


getTranslations

List<IWiktionaryTranslation> getTranslations()
Returns a list containing all translations of the entry's senses (including the unassigned sense). Hence, the method is a shorthand for invoking IWiktionarySense.getTranslations() for each sense. The list is never null but might be empty.


getTranslations

List<IWiktionaryTranslation> getTranslations(ILanguage language)
Returns a list containing all translations of the entry's senses (including the unassigned sense) to the given language. Hence, the method is a shorthand for invoking IWiktionarySense.getTranslations(ILanguage) for each sense. The list is never null but might be empty.



Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.