public class ENWordFormHandler extends Object implements TemplateParser.ITemplateHandler, IWordFormHandler
Modifier and Type | Field and Description |
---|---|
protected String |
lemma |
protected List<IWiktionaryWordForm> |
wordForms |
Constructor and Description |
---|
ENWordFormHandler(String lemma)
Initializes the handler for the specified lemma.
|
protected List<IWiktionaryWordForm> wordForms
protected String lemma
public ENWordFormHandler(String lemma)
public String handle(TemplateParser.Template template)
TemplateParser.ITemplateHandler
TemplateParser
for every template that occurs
in a text. The parser replaces the template by the result of this
method. If null
is returned, no substitution is made,
but the original template string remains in the text.handle
in interface TemplateParser.ITemplateHandler
protected void handleNounTemplate(TemplateParser.Template template)
protected void handleProperNounTemplate(TemplateParser.Template template)
protected void handleVerbTemplate(TemplateParser.Template template)
protected void handleAdjectiveTemplate(TemplateParser.Template template)
protected WiktionaryWordForm createWordForm(String wordForm)
protected IWiktionaryWordForm createPlural(String wordForm, String pluralParam)
protected IWiktionaryWordForm createFormThirdPerson(String wordForm)
protected IWiktionaryWordForm createFormPresentParticiple(String wordForm)
protected IWiktionaryWordForm createFormSimplePast(String wordForm)
protected IWiktionaryWordForm createFormPastParticiple(String wordForm)
protected IWiktionaryWordForm createAdjectiveForm(String wordForm, GrammaticalDegree degree)
public boolean parse(String line)
IWordFormHandler
IWordFormHandler.getWordForms()
once all lines have been parsed.parse
in interface IWordFormHandler
line
- a line of wikitextpublic List<IWiktionaryWordForm> getWordForms()
getWordForms
in interface IWordFormHandler
public List<GrammaticalGender> getGenders()
getGenders
in interface IWordFormHandler
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.