public class WMeaning extends Object
# Definition (preceded by "#", which causes automatic numbering). #* and Quotations.
Constructor and Description |
---|
WMeaning() |
WMeaning(String page_title,
ContextLabel[] _labels,
String _definition,
WQuote[] _quote,
boolean _template_not_def)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
Frees memory recursively.
|
String |
getDefinition()
Gets definition line of text.
|
ContextLabel[] |
getLabels()
Gets array of context labels in the definition.
|
WQuote[] |
getQuotes()
Gets array of quotes (sentences) from the definition.
|
String |
getWikifiedText() |
WikiText |
getWikiText()
Gets wiki_text.
|
WikiWord[] |
getWikiWords()
Gets array of internal links in the definition (wiki words, i.e.
|
boolean |
isFormOfInflection()
True if the definition defines inflection of the word with the help of
(1) the template (e.g.
|
static WMeaning[] |
parse(LanguageType wikt_lang,
String page_title,
LanguageType lang_section,
POSText pt)
Parses text (related to the POS), creates and fills array of meanings (WMeaning).
|
static WMeaning |
parseOneDefinition(LanguageType wikt_lang,
String page_title,
LanguageType lang_section,
String def_text)
Parses one definition (one line in Russian, several lines in English
Wiktionary), i.e.
|
public WMeaning()
public WMeaning(String page_title, ContextLabel[] _labels, String _definition, WQuote[] _quote, boolean _template_not_def)
page_title
- _labels
- _definition
- wikified text of the definition_quote
- could be null_template_not_def
- true if there is template (e.g. {{form of|}} or
{{plural of|}}) instead of definiton text (in enwikt)public void free()
public boolean isFormOfInflection()
public ContextLabel[] getLabels()
public String getDefinition()
public WikiWord[] getWikiWords()
public WikiText getWikiText()
public WQuote[] getQuotes()
public static WMeaning[] parse(LanguageType wikt_lang, String page_title, LanguageType lang_section, POSText pt)
wikt_lang
- language of Wiktionarypage_title
- word which are described in this article 'text'lang_section
- language of this section of an articlept
- POSText defines POS stored in pt.textpublic static WMeaning parseOneDefinition(LanguageType wikt_lang, String page_title, LanguageType lang_section, String def_text)
wikt_lang
- language of Wiktionarypage_title
- word which are described in this article 'text'lang_section
- language of this section of an articledef_text
- text of one definitionpublic String getWikifiedText()
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.