de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.multi.en
Class WRelationEn

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.ru.wikokit.base.wikt.multi.en.WRelationEn

public class WRelationEn
extends Object

Semantic relations of English Wiktionary word.

See Also:
http://en.wiktionary.org/wiki/Wiktionary:Semantic_relations, http://en.wiktionary.org/wiki/Template_talk:sense

Constructor Summary
WRelationEn()
           
 
Method Summary
static Map<Relation,WRelation[]> parse(LanguageType wikt_lang, String page_title, POSText pt)
          Parses text (related to the POS), creates and fill array of semantic relations (WRelation).
static WRelation[] parseOneKindOfRelation(LanguageType wikt_lang, String page_title, String text, Pattern relation_header_pattern, Relation relation)
          Parses text (related to the POS), creates and fill array of semantic relations only for one kind of semantic relations (e.g. synonyms) defined by the variable 'relation'.
static String substrTillFirstMatch(String text, Pattern ptrn1, Pattern ptrn2)
          Gets text till the first match defined by patterns ptrn1 and ptr2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WRelationEn

public WRelationEn()
Method Detail

parse

public static Map<Relation,WRelation[]> parse(LanguageType wikt_lang,
                                              String page_title,
                                              POSText pt)
Parses text (related to the POS), creates and fill array of semantic relations (WRelation).

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
relation_type - type of parsing relation, e.g. synonymy
Returns:

substrTillFirstMatch

public static String substrTillFirstMatch(String text,
                                          Pattern ptrn1,
                                          Pattern ptrn2)
Gets text till the first match defined by patterns ptrn1 and ptr2. If match fails then return the source text string.


parseOneKindOfRelation

public static WRelation[] parseOneKindOfRelation(LanguageType wikt_lang,
                                                 String page_title,
                                                 String text,
                                                 Pattern relation_header_pattern,
                                                 Relation relation)
Parses text (related to the POS), creates and fill array of semantic relations only for one kind of semantic relations (e.g. synonyms) defined by the variable 'relation'.

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
text - text of wiki article related to one POS
relation_header_pattern - regular expression to find the header of semantic relation
relation - type of parsing relation, e.g. synonymy
Returns:
an empty array if relations are absent


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