public abstract class DESenseIndexedBlockHandler<InformationType> extends DEBlockHandler
Modifier and Type | Field and Description |
---|---|
protected static Pattern |
INDEX_PATTERN |
protected Map<Integer,List<String>> |
indexedInformation |
protected Set<Integer> |
indexSet |
labels
Constructor and Description |
---|
DESenseIndexedBlockHandler(String... labels)
Initializes the block handler for parsing all sections starting with
one of the specified labels.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addIndexedLine(int index,
String text) |
protected void |
appendIndexedLine(int index,
String text) |
protected abstract List<InformationType> |
extract(int index,
String text) |
void |
fillContent(ParsingContext context)
This hotspot is invoked if the parser releases this handler.
|
boolean |
processBody(String textLine,
ParsingContext context)
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.
|
boolean |
processHead(String text,
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 abstract void |
updatePosEntry(WiktionaryEntry posEntry,
InformationType info) |
protected abstract void |
updateSense(WiktionarySense sense,
InformationType info) |
canHandle, getLabels
protected static final Pattern INDEX_PATTERN
public DESenseIndexedBlockHandler(String... labels)
public boolean processHead(String text, ParsingContext context)
IBlockHandler
true
if the handler
requests to handle also the body of this constituent.processHead
in interface IBlockHandler
processHead
in class BlockHandler
public boolean processBody(String textLine, ParsingContext context)
IBlockHandler
true
if the handler requests to handle also
the next line using this handler.processBody
in interface IBlockHandler
processBody
in class BlockHandler
protected void addIndexedLine(int index, String text)
protected void appendIndexedLine(int index, String text)
protected abstract List<InformationType> extract(int index, String text)
public void fillContent(ParsingContext context)
IBlockHandler
fillContent
in interface IBlockHandler
fillContent
in class BlockHandler
protected abstract void updateSense(WiktionarySense sense, InformationType info)
protected abstract void updatePosEntry(WiktionaryEntry posEntry, InformationType info)
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.