de.tudarmstadt.ukp.jwktl.parser.de.components
Class DERelationHandler

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
      extended by de.tudarmstadt.ukp.jwktl.parser.de.components.DEBlockHandler
          extended by de.tudarmstadt.ukp.jwktl.parser.de.components.DESenseIndexedBlockHandler<IWiktionaryRelation>
              extended by de.tudarmstadt.ukp.jwktl.parser.de.components.DERelationHandler
All Implemented Interfaces:
IBlockHandler
Direct Known Subclasses:
DECollocationsHandler

public class DERelationHandler
extends DESenseIndexedBlockHandler<IWiktionaryRelation>

Parser component for extracting semantic relations from the German Wiktionary.

Author:
Christian M. Meyer, Lizhen Qu

Field Summary
protected static Pattern HTML_REMOVER
           
protected  String notes
           
protected static Pattern REFERENCE_PATTERN
           
protected  RelationType relationType
           
protected static Pattern SUPERSCRIPT_PATTERN
           
 
Fields inherited from class de.tudarmstadt.ukp.jwktl.parser.de.components.DESenseIndexedBlockHandler
INDEX_PATTERN, indexedInformation, indexSet
 
Fields inherited from class de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
labels
 
Constructor Summary
DERelationHandler(RelationType relationType, String... labels)
          Initializes the block handler for parsing all sections starting with one of the specified labels.
 
Method Summary
protected  String addDelimiters(String text)
           
protected  String deWikify(String word)
           
protected  String escapeDelimiters(String text)
           
protected  List<IWiktionaryRelation> extract(int index, String text)
           
protected  String normalizeWord(String word)
           
protected  String removeBrackets(String word)
           
protected  String removeComments(String word)
           
protected  String removeTemplates(String word)
           
protected  void updatePosEntry(WiktionaryEntry posEntry, IWiktionaryRelation relation)
           
protected  void updateSense(WiktionarySense sense, IWiktionaryRelation relation)
           
 
Methods inherited from class de.tudarmstadt.ukp.jwktl.parser.de.components.DESenseIndexedBlockHandler
addIndexedLine, appendIndexedLine, fillContent, processBody, processHead
 
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

notes

protected String notes

REFERENCE_PATTERN

protected static final Pattern REFERENCE_PATTERN

SUPERSCRIPT_PATTERN

protected static final Pattern SUPERSCRIPT_PATTERN

HTML_REMOVER

protected static final Pattern HTML_REMOVER
Constructor Detail

DERelationHandler

public DERelationHandler(RelationType relationType,
                         String... labels)
Initializes the block handler for parsing all sections starting with one of the specified labels.

Method Detail

extract

protected List<IWiktionaryRelation> extract(int index,
                                            String text)
Specified by:
extract in class DESenseIndexedBlockHandler<IWiktionaryRelation>

normalizeWord

protected String normalizeWord(String word)

addDelimiters

protected String addDelimiters(String text)

escapeDelimiters

protected String escapeDelimiters(String text)

deWikify

protected String deWikify(String word)

removeBrackets

protected String removeBrackets(String word)

removeComments

protected String removeComments(String word)

removeTemplates

protected String removeTemplates(String word)

updateSense

protected void updateSense(WiktionarySense sense,
                           IWiktionaryRelation relation)
Specified by:
updateSense in class DESenseIndexedBlockHandler<IWiktionaryRelation>

updatePosEntry

protected void updatePosEntry(WiktionaryEntry posEntry,
                              IWiktionaryRelation relation)
Specified by:
updatePosEntry in class DESenseIndexedBlockHandler<IWiktionaryRelation>


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