public class ENSenseHandler extends ENBlockHandler
Extract POS, gloss and inner-definition quotations. It checks if a string is in a predefined pos set, if it is, the section is the pos section.
Modifier and Type | Field and Description |
---|---|
protected ENEntryFactory |
entryFactory
a instance of PosEntryFactory
|
protected static Pattern |
EXAMPLE_PATTERN |
protected List<EnGlossEntry> |
glossEntryList
A list of gloss entries
|
protected String |
lastPrefix |
protected PartOfSpeech |
partOfSpeech
Extracted pos string
|
protected static Pattern |
POS_PATTERN |
protected ENQuotationHandler |
quotationHandler |
protected boolean |
takeControl
If the worker takes control of parsing or let parser decide it.
|
protected IWordFormHandler |
wordFormHandler |
labels
Constructor and Description |
---|
ENSenseHandler()
Init attributes
|
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(String blockHeader)
Check if the label of section is a predefined POS label.
|
void |
fillContent(ParsingContext context)
Store POS, examples, quotations in WordEntry object
|
boolean |
processBody(String text,
ParsingContext context)
Extract example, gloss and in-definition quotation
|
boolean |
processHead(String text,
ParsingContext context)
Process head
|
protected void |
saveQuotations() |
getLabels
protected static final Pattern EXAMPLE_PATTERN
protected static final Pattern POS_PATTERN
protected PartOfSpeech partOfSpeech
protected List<EnGlossEntry> glossEntryList
protected ENEntryFactory entryFactory
protected boolean takeControl
protected ENQuotationHandler quotationHandler
protected IWordFormHandler wordFormHandler
protected String lastPrefix
public boolean canHandle(String blockHeader)
canHandle
in interface IBlockHandler
canHandle
in class BlockHandler
public boolean processHead(String text, ParsingContext context)
processHead
in interface IBlockHandler
processHead
in class BlockHandler
public boolean processBody(String text, ParsingContext context)
processBody
in interface IBlockHandler
processBody
in class BlockHandler
protected void saveQuotations()
public void fillContent(ParsingContext context)
fillContent
in interface IBlockHandler
fillContent
in class BlockHandler
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.