public class ENTranslationHandler extends ENBlockHandler
Modifier and Type | Field and Description |
---|---|
protected static Pattern |
ADDITIONAL_TRANSLATION_PATTERN |
protected String |
currentSense |
protected static Pattern |
NEXT_TRANSLATION_PATTERN |
protected Map<String,List<IWiktionaryTranslation>> |
sensNum2trans |
protected static Pattern |
TRANSLATION_PATTERN |
labels
Constructor and Description |
---|
ENTranslationHandler()
Initializes the block handler for parsing all sections starting with
one of the specified labels.
|
Modifier and Type | Method and Description |
---|---|
protected String |
cleanText(String text) |
protected boolean |
determineCheckNeeded(String[] fields) |
void |
fillContent(ParsingContext context)
Add parsed translation into senseEntry.
|
boolean |
processBody(String text,
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 String[] |
reorderTemplateParams(String[] fields,
Map<String,String> namedParams) |
canHandle, getLabels
protected static final Pattern TRANSLATION_PATTERN
protected static final Pattern ADDITIONAL_TRANSLATION_PATTERN
protected static final Pattern NEXT_TRANSLATION_PATTERN
protected String currentSense
protected Map<String,List<IWiktionaryTranslation>> sensNum2trans
public ENTranslationHandler()
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 text, 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 boolean determineCheckNeeded(String[] fields)
protected String[] reorderTemplateParams(String[] fields, Map<String,String> namedParams)
public void fillContent(ParsingContext context)
fillContent
in interface IBlockHandler
fillContent
in class BlockHandler
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.