de.tudarmstadt.ukp.jwktl.parser.en.components
Class ENSenseHandler

java.lang.Object
  extended by de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
      extended by de.tudarmstadt.ukp.jwktl.parser.en.components.ENBlockHandler
          extended by de.tudarmstadt.ukp.jwktl.parser.en.components.ENSenseHandler
All Implemented Interfaces:
IBlockHandler

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.

Author:
Lizhen Qu

Field Summary
protected  ENEntryFactory entryFactory
          a instance of PosEntryFactory
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  ENWordFormHandler wordFormHandler
           
 
Fields inherited from class de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
labels
 
Constructor Summary
ENSenseHandler()
          Init attributes
 
Method Summary
 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()
           
 
Methods inherited from class de.tudarmstadt.ukp.jwktl.parser.components.BlockHandler
getLabels
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POS_PATTERN

protected static final Pattern POS_PATTERN

partOfSpeech

protected PartOfSpeech partOfSpeech
Extracted pos string


glossEntryList

protected List<EnGlossEntry> glossEntryList
A list of gloss entries


entryFactory

protected ENEntryFactory entryFactory
a instance of PosEntryFactory


takeControl

protected boolean takeControl
If the worker takes control of parsing or let parser decide it.


quotationHandler

protected ENQuotationHandler quotationHandler

wordFormHandler

protected ENWordFormHandler wordFormHandler

lastPrefix

protected String lastPrefix
Constructor Detail

ENSenseHandler

public ENSenseHandler()
Init attributes

Method Detail

canHandle

public boolean canHandle(String blockHeader)
Check if the label of section is a predefined POS label.

Specified by:
canHandle in interface IBlockHandler
Overrides:
canHandle in class BlockHandler

processHead

public boolean processHead(String text,
                           ParsingContext context)
Process head

Specified by:
processHead in interface IBlockHandler
Overrides:
processHead in class BlockHandler

processBody

public boolean processBody(String text,
                           ParsingContext context)
Extract example, gloss and in-definition quotation

Specified by:
processBody in interface IBlockHandler
Overrides:
processBody in class BlockHandler

saveQuotations

protected void saveQuotations()

fillContent

public void fillContent(ParsingContext context)
Store POS, examples, quotations in WordEntry object

Specified by:
fillContent in interface IBlockHandler
Overrides:
fillContent in class BlockHandler


Copyright © 2011-2013 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.