de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.util
Class WikiText

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.util.WikiText

public class WikiText
extends Object

WikiText is a text, where [[some]] [[word]]s [[be|are]] [[wikify|wikified]], e.g. "[[little]] [[bell]]".


Constructor Summary
WikiText(String _text, WikiWord[] _wiki_words)
          Context label (reserved for future use).
 
Method Summary
static WikiText[] create(String page_title, String text)
          Parses text, creates array of wiki words (words with hyperlinks), e.g. text is "[[little]] [[bell]], [[handbell]], [[doorbell]]".
static WikiText createOnePhrase(String page_title, String text)
          Parses text, creates array of wiki words (words with hyperlinks), e.g. text is "[[little]] [[bell]]", wiki_words[]="little", "bell"
static WikiText[] createWithoutParsing(String page_title, List<String> wikified_words)
          Creates array of wiki words (words with hyperlinks) without any parsing.
 void free()
          Frees memory recursively.
 String getVisibleText()
          Gets visible text, e.g.
 WikiWord[] getWikiWords()
          Gets array of internal links (wiki words, i.e. words with hyperlinks).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiText

public WikiText(String _text,
                WikiWord[] _wiki_words)
Context label (reserved for future use). Comment: is used in Russian Wiktionary. It is not used in English Wiktionary.

Method Detail

getVisibleText

public String getVisibleText()
Gets visible text, e.g. "bullets m." for "[[bullet]]s {{m}}"


getWikiWords

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


free

public void free()
Frees memory recursively.


createOnePhrase

public static WikiText createOnePhrase(String page_title,
                                       String text)
Parses text, creates array of wiki words (words with hyperlinks), e.g. text is "[[little]] [[bell]]", wiki_words[]="little", "bell"


create

public static WikiText[] create(String page_title,
                                String text)
Parses text, creates array of wiki words (words with hyperlinks), e.g. text is "[[little]] [[bell]], [[handbell]], [[doorbell]]".

Returns:
empty array if there is no text.

createWithoutParsing

public static WikiText[] createWithoutParsing(String page_title,
                                              List<String> wikified_words)
Creates array of wiki words (words with hyperlinks) without any parsing.

Parameters:
wikified_words - words which are already without [[wikification]], e.g. translation extracted from {{t|lang_code|wiki_word}}
Returns:
empty array if there is no text.


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