public interface IWiktionaryEntry
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
IWiktionarySense
s. Each IWiktionaryEntry
belongs to exactly
one IWiktionaryPage
.Modifier and Type | Method and Description |
---|---|
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<IWiktionaryExample> |
getExamples()
Returns a list containing all sense definitions of the entry's senses
/** Returns a list containing all examples 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<GrammaticalGender> |
getGenders()
Returns the grammatical genders of this lexical entry.
|
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
IWiktionarySense s encoded for this
lexical entry. |
Iterable<? extends IWiktionarySense> |
getSenses()
Returns the list of all
IWiktionarySense s. |
Iterable<? extends IWiktionarySense> |
getSenses(boolean includeUnassignedSense)
Returns the list of all
IWiktionarySense s. |
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. |
IWikiString |
getUsageNotes()
Returns the usage notes of this lexical entry as a
IWikiString . |
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.
|
String getKey()
IWiktionaryEntry
s of the IWiktionaryEdition
. Note
however that the ID of an entry may differ between different software
versions or dump dates.long getId()
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.int getIndex()
IWiktionaryPage
(starting at 0).IWiktionaryPage getPage()
IWiktionaryPage
that contains
this entry.long getPageId()
IWiktionaryPage
that contains
this entry.String getWord()
getPage().getTitle()
.String getHeader()
getWord()
, but there are
some exceptions where the Wiktionary community uses a slightly
different header.ILanguage getWordLanguage()
IWiktionaryEdition
; e.g.,
for French entries within the English Wiktionary edition.PartOfSpeech getPartOfSpeech()
null
will be returned.List<PartOfSpeech> getPartsOfSpeech()
GrammaticalGender getGender()
getGenders()
to access
genders.List<GrammaticalGender> getGenders()
IWikiString getWordEtymology()
IWikiString
.
The result might be null
if no etymology has been
encoded.IWikiString getUsageNotes()
IWikiString
.
The result might be null
if no usage notes have been
encoded.String getEntryLink()
IWiktionaryPage.getRedirectTarget()
), but limited to the
entry level. In addition to that, there might be further information
provided.String getEntryLinkType()
getEntryLink()
, for example, denoting
that the entry is an old spelling variant of the linked entry.List<IPronunciation> getPronunciations()
null
if not pronunciations are
encoded.List<IWiktionaryWordForm> getWordForms()
null
if not word forms are
encoded.IWiktionarySense getUnassignedSense()
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)
.IWiktionarySense getSense(int index)
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).ArrayIndexOutOfBoundsException
- if there is no sense with
the given index.int getSenseCount()
IWiktionarySense
s encoded for this
lexical entry.Iterable<? extends IWiktionarySense> getSenses()
IWiktionarySense
s. 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
.Iterable<? extends IWiktionarySense> getSenses(boolean includeUnassignedSense)
IWiktionarySense
s. 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()
.List<IWikiString> getGlosses()
IWiktionarySense.getGloss()
for each sense.
The list is never null
but might be empty.List<IWiktionaryExample> getExamples()
IWiktionarySense.getExamples()
for each sense.
The list is never null
but might be empty.List<IQuotation> getQuotations()
IWiktionarySense.getQuotations()
for each sense.
The list is never null
but might be empty.List<IWiktionaryRelation> getRelations()
IWiktionarySense.getRelations()
for each sense.
The list is never null
but might be empty.List<IWiktionaryRelation> getRelations(RelationType relationType)
IWiktionarySense.getRelations(RelationType)
for each sense.
The list is never null
but might be empty.List<IWikiString> getReferences()
IWiktionarySense.getReferences()
for each sense.
The list is never null
but might be empty.List<IWiktionaryTranslation> getTranslations()
IWiktionarySense.getTranslations()
for each sense.
The list is never null
but might be empty.List<IWiktionaryTranslation> getTranslations(ILanguage language)
IWiktionarySense.getTranslations(ILanguage)
for each sense.
The list is never null
but might be empty.Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.