|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.util.WikiWord
public class WikiWord
Word in a Wiktionary with wikilink and additional tag or comment, e.g. a word from a list of Synonyms or Translations, or definition (meaning).
Constructor Summary | |
---|---|
WikiWord(String _word_link,
String _word_visible,
ContextLabel[] _labels)
Initialize and fill WikiWord structure. |
Method Summary | |
---|---|
static WikiWord[] |
getWikiWords(String page_title,
StringBuffer text)
Extract wiki links (word_link and word_visible) from wiki texts. |
String |
getWordLink()
Gets wiki link word (lemma). |
String |
getWordVisible()
Gets visible word. |
static StringBuffer |
parseDoubleBrackets(String page_title,
StringBuffer text)
Removes and expands wiki links in wiki texts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WikiWord(String _word_link, String _word_visible, ContextLabel[] _labels)
_word_link
- internal wiki link, e.g. "run" in [[run]]ning_word_visible
- visible wiki word, e.g. "running" in [[run]]ning_labels
- Method Detail |
---|
public String getWordVisible()
public String getWordLink()
public static StringBuffer parseDoubleBrackets(String page_title, StringBuffer text)
Expands wiki links by removing brackets. There are two cases: (1) remove brackets, e.g. [[run]] -> run and (2) [[run|running]] -> running, or [[Russian language|Russian]] -> Russian, i.e. the visible (to reader) words will remain. It is recommended to call StringUtil.escapeCharDollarAndBackslash(text) before this function. This is simplified versions of parseDoubleBrackets.
page_title
- word which are described in this article 'text'text
- source wikified definition text
See also WikiParser.parseDoubleBrackets.public static WikiWord[] getWikiWords(String page_title, StringBuffer text)
There are cases: (1) [[run]] => two words [run, run], remove brackets (2) [[run]]ing => two words [run, runing] extract, remove brackets (3) [[run|running]] => two words [run, running], or [[Russian language|Russian]] => [Russian language, Russian].
page_title
- word which are described in this article 'text'text
- source wikified definition text
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |