de.tudarmstadt.ukp.jwktl.parser.en.components
Class ENRelationHandler

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
      extended by de.tudarmstadt.ukp.jwktl.parser.en.components.ENBlockHandler
          extended by de.tudarmstadt.ukp.jwktl.parser.en.components.ENSenseIndexedBlockHandler
              extended by de.tudarmstadt.ukp.jwktl.parser.en.components.ENRelationHandler
All Implemented Interfaces:
IBlockHandler

public class ENRelationHandler
extends ENSenseIndexedBlockHandler

Parser component for extracting semantic relations from the English Wiktionary.

Author:
Christian M. Meyer, Christof Müller, Lizhen Qu

Field Summary
protected  String comment
           
protected  Map<Integer,String> index2comment
          sense index to comment
protected static Pattern PATTERN_WORD
          Deprecated. 
protected  List<List<String>> relationList
           
protected  RelationType relationType
           
 
Fields inherited from class de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
labels
 
Constructor Summary
ENRelationHandler(RelationType relationType, String... labels)
          Initializes the block handler for the given relation type and section headers.
 
Method Summary
 void fillContent(ParsingContext context)
          Add word list to senseEntry. addSemanticWord and addUnclassifiedWords will be called to decide where to store the word list.
protected  List<String> parseWordList(String text)
           
 boolean processBody(String text, ParsingContext context)
          Extract word list from the given text line
 boolean processHead(String textLine, ParsingContext context)
          If the handler requested to process this constituent, this hotspot will be called for processing the section header of this article constituent.
protected  void updatePosEntry(WiktionaryEntry posEntry, IWiktionaryRelation relation)
           
protected  void updateSense(WiktionarySense sense, IWiktionaryRelation relation)
           
 
Methods inherited from class de.tudarmstadt.ukp.jwktl.parser.en.components.ENSenseIndexedBlockHandler
findMatchingSense
 
Methods inherited from class de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
canHandle, getLabels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

relationType

protected RelationType relationType

PATTERN_WORD

@Deprecated
protected static final Pattern PATTERN_WORD
Deprecated. 

relationList

protected List<List<String>> relationList

index2comment

protected Map<Integer,String> index2comment
sense index to comment


comment

protected String comment
Constructor Detail

ENRelationHandler

public ENRelationHandler(RelationType relationType,
                         String... labels)
Initializes the block handler for the given relation type and section headers.

Method Detail

processHead

public boolean processHead(String textLine,
                           ParsingContext context)
Description copied from interface: IBlockHandler
If the handler requested to process this constituent, this hotspot will be called for processing the section header of this article constituent. Return true if the handler requests to handle also the body of this constituent.

Specified by:
processHead in interface IBlockHandler
Overrides:
processHead in class BlockHandler

parseWordList

protected List<String> parseWordList(String text)

processBody

public boolean processBody(String text,
                           ParsingContext context)
Extract word list from the given text line

Specified by:
processBody in interface IBlockHandler
Overrides:
processBody in class BlockHandler

fillContent

public void fillContent(ParsingContext context)
Add word list to senseEntry. addSemanticWord and addUnclassifiedWords will be called to decide where to store the word list.

Specified by:
fillContent in interface IBlockHandler
Overrides:
fillContent in class BlockHandler

updateSense

protected void updateSense(WiktionarySense sense,
                           IWiktionaryRelation relation)

updatePosEntry

protected void updatePosEntry(WiktionaryEntry posEntry,
                              IWiktionaryRelation relation)


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