de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.word
Class WMeaning

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.word.WMeaning

public class WMeaning
extends Object

Meaning consists of

 # Definition (preceded by "#", which causes automatic numbering).
 #* and Quotations.      


Constructor Summary
WMeaning()
           
WMeaning(String page_title, ContextLabel[] _labels, String _definition, WQuote[] _quote, boolean _template_not_def)
          Constructor.
 
Method Summary
 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. words with hyperlinks).
 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. extracts {{label.}}, definition, {{example|Quotation sentence.}}, creates and fills a meaning (WMeaning).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMeaning

public WMeaning()

WMeaning

public WMeaning(String page_title,
                ContextLabel[] _labels,
                String _definition,
                WQuote[] _quote,
                boolean _template_not_def)
Constructor.

Parameters:
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)
Method Detail

free

public void free()
Frees memory recursively.


isFormOfInflection

public boolean isFormOfInflection()
True if the definition defines inflection of the word with the help of (1) the template (e.g. {{form of|}} or {{plural of|}}), or (2) strictly defined phrase (e.g. "Plural form of") instead of the usual definiton text (in enwikt).


getLabels

public ContextLabel[] getLabels()
Gets array of context labels in the definition.


getDefinition

public String getDefinition()
Gets definition line of text.


getWikiWords

public WikiWord[] getWikiWords()
Gets array of internal links in the definition (wiki words, i.e. words with hyperlinks).


getWikiText

public WikiText getWikiText()
Gets wiki_text.


getQuotes

public WQuote[] getQuotes()
Gets array of quotes (sentences) from the definition.


parse

public 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).

Parameters:
wikt_lang - language of Wiktionary
page_title - word which are described in this article 'text'
lang_section - language of this section of an article
pt - POSText defines POS stored in pt.text
Returns:

parseOneDefinition

public 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. extracts {{label.}}, definition, {{example|Quotation sentence.}}, creates and fills a meaning (WMeaning).

Parameters:
wikt_lang - language of Wiktionary
page_title - word which are described in this article 'text'
lang_section - language of this section of an article
def_text - text of one definition
Returns:
WMeaning or null if the line is not started from "#"

getWikifiedText

public String getWikifiedText()


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