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

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

public class WTranslation
extends Object

Translations of Wiktionary word. Quote from http://en.wiktionary.org/wiki/Wiktionary:Entry_layout_explained: The translation section is separated into a number of divisions that are keyed to the various meanings of the English word. Each division is separated into a distinct collapsible navigation box by use of the translation section templates. The boxes are each headed by a summary of the translated meaning.


Constructor Summary
WTranslation(String _meaning_summary, WTranslationEntry[] _entry)
           
 
Method Summary
 void free()
          Frees memory recursively.
 String getHeader()
          Gets a summary of the translated meaning, i.e. a header of the box.
 WikiText[] getTranslationIntoLanguage(LanguageType lang)
          Gets translation entries into the languages 'lang'.
 WTranslationEntry[] getTranslations()
          Gets translation entries into all languages.
 int getTranslationsNumber()
          Gets number of translation entries.
static WTranslation[] parse(LanguageType wikt_lang, String page_title, LanguageType lang_section, POSText pt)
          Parses text (related to the Translation), creates and fills array of translations (WTranslation) for each meaning of a word.
static WTranslation parseOneTranslationBox(LanguageType wikt_lang, String page_title, String line)
          Parses one translation box, i.e. extracts languages and a list of translations (wikified words) for each language, creates and fills WTranslation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WTranslation

public WTranslation(String _meaning_summary,
                    WTranslationEntry[] _entry)
Method Detail

getHeader

public String getHeader()
Gets a summary of the translated meaning, i.e. a header of the box.


getTranslations

public WTranslationEntry[] getTranslations()
Gets translation entries into all languages.


getTranslationsNumber

public int getTranslationsNumber()
Gets number of translation entries.


getTranslationIntoLanguage

public WikiText[] getTranslationIntoLanguage(LanguageType lang)
Gets translation entries into the languages 'lang'.


free

public void free()
Frees memory recursively.


parse

public static WTranslation[] parse(LanguageType wikt_lang,
                                   String page_title,
                                   LanguageType lang_section,
                                   POSText pt)
Parses text (related to the Translation), creates and fills array of translations (WTranslation) for each meaning of a word.

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:

parseOneTranslationBox

public static WTranslation parseOneTranslationBox(LanguageType wikt_lang,
                                                  String page_title,
                                                  String line)
Parses one translation box, i.e. extracts languages and a list of translations (wikified words) for each language, creates and fills WTranslation.

Parameters:
wikt_lang - language of Wiktionary
page_title - word which are described in this article 'text'
line - definition line
Returns:
WTranslation or null if the translation text block was not found.


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