de.tudarmstadt.ukp.jwktl.parser.de.components
Class DESenseIndexedBlockHandler<InformationType>
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<InformationType>
- All Implemented Interfaces:
- IBlockHandler
- Direct Known Subclasses:
- DEReferenceHandler, DERelationHandler, DESenseExampleHandler
public abstract class DESenseIndexedBlockHandler<InformationType>
- extends DEBlockHandler
Abstract parser component for extracting sense-disambiguated information
items from the German Wiktionary (e.g., example sentences,
semantic relations, translations).
- Author:
- Christian M. Meyer
Fields inherited from class de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler |
labels |
Constructor Summary |
DESenseIndexedBlockHandler(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 |
INDEX_PATTERN
protected static final Pattern INDEX_PATTERN
indexedInformation
protected Map<Integer,List<String>> indexedInformation
indexSet
protected Set<Integer> indexSet
DESenseIndexedBlockHandler
public DESenseIndexedBlockHandler(String... labels)
- Initializes the block handler for parsing all sections starting with
one of the specified labels.
processHead
public boolean processHead(String text,
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
processBody
public boolean processBody(String textLine,
ParsingContext context)
- Description copied from interface:
IBlockHandler
- If the handler requested to process the body of this constituent, this
hotspot will be called for processing each line of the constituent's
body. Return
true
if the handler requests to handle also
the next line using this handler.
- Specified by:
processBody
in interface IBlockHandler
- Overrides:
processBody
in class BlockHandler
addIndexedLine
protected void addIndexedLine(int index,
String text)
appendIndexedLine
protected void appendIndexedLine(int index,
String text)
extract
protected abstract List<InformationType> extract(int index,
String text)
fillContent
public void fillContent(ParsingContext context)
- Description copied from interface:
IBlockHandler
- This hotspot is invoked if the parser releases this handler. It can be
used to store the extracted information to the Wiktionary data
objects stored in the parsing context.
- Specified by:
fillContent
in interface IBlockHandler
- Overrides:
fillContent
in class BlockHandler
updateSense
protected abstract void updateSense(WiktionarySense sense,
InformationType info)
updatePosEntry
protected abstract void updatePosEntry(WiktionaryEntry posEntry,
InformationType info)
Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.