de.tudarmstadt.ukp.jwktl.parser.de.components
Class DERelationHandler
java.lang.Object
de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
de.tudarmstadt.ukp.jwktl.parser.de.components.DEBlockHandler
de.tudarmstadt.ukp.jwktl.parser.de.components.DESenseIndexedBlockHandler<IWiktionaryRelation>
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
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
DERelationHandler
public DERelationHandler(RelationType relationType,
String... labels)
- Initializes the block handler for parsing all sections starting with
one of the specified labels.
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.