public class ParsingContext extends Object
IWiktionaryEntryParser
. This
entry parser creates and maintains an instance of this type to share
information on the dump file with all its registed
IBlockHandler
s.Modifier and Type | Field and Description |
---|---|
protected EntryFactory |
entryFactory |
protected IWikiString |
etymology |
protected String |
header |
protected ILanguage |
language |
protected WiktionaryPage |
page |
protected PartOfSpeech |
partOfSpeech |
protected List<IPronunciation> |
pronunciations |
Constructor and Description |
---|
ParsingContext(WiktionaryPage page)
Create a new parsing context for the given Wiktionary page.
|
ParsingContext(WiktionaryPage page,
EntryFactory entryFactory)
Create a new parsing context for the given Wiktionary page and
use the specified entry factory to construct lexical entries.
|
Modifier and Type | Method and Description |
---|---|
WiktionaryEntry |
findEntry()
Returns the
WiktionaryEntry that is currently being
parsed. |
IWikiString |
getEtymology()
Returns the etymology of the current
IWiktionaryEntry . |
String |
getHeader()
Returns the header of the current
IWiktionaryEntry . |
ILanguage |
getLanguage()
Returns the
ILanguage of the current
IWiktionaryEntry . |
WiktionaryPage |
getPage()
Returns the current
WiktionaryPage that is being parsed. |
PartOfSpeech |
getPartOfSpeech()
Returns the
PartOfSpeech of the current
IWiktionaryEntry . |
List<IPronunciation> |
getPronunciations()
Returns the pronunciations of the current
IWiktionaryEntry . |
void |
setEtymology(IWikiString etymology)
Save the specified etymology in the context object.
|
void |
setHeader(String header)
Save the specified header in the context object.
|
void |
setLanguage(ILanguage language)
Save the specified language in the context object.
|
void |
setPartOfSpeech(PartOfSpeech partOfSpeech)
Save the specified part of speech in the context object.
|
void |
setPronunciations(List<IPronunciation> pronunciations)
Save the specified pronunciations in the context object.
|
protected WiktionaryPage page
protected EntryFactory entryFactory
protected ILanguage language
protected PartOfSpeech partOfSpeech
protected String header
protected IWikiString etymology
protected List<IPronunciation> pronunciations
public ParsingContext(WiktionaryPage page)
public ParsingContext(WiktionaryPage page, EntryFactory entryFactory)
public WiktionaryPage getPage()
WiktionaryPage
that is being parsed.public WiktionaryEntry findEntry()
WiktionaryEntry
that is currently being
parsed.public ILanguage getLanguage()
ILanguage
of the current
IWiktionaryEntry
.public void setLanguage(ILanguage language)
null
.public String getHeader()
IWiktionaryEntry
. The header
usually corresponds to the lemma of the dictionary article.public void setHeader(String header)
public PartOfSpeech getPartOfSpeech()
PartOfSpeech
of the current
IWiktionaryEntry
.public void setPartOfSpeech(PartOfSpeech partOfSpeech)
public IWikiString getEtymology()
IWiktionaryEntry
.public void setEtymology(IWikiString etymology)
public List<IPronunciation> getPronunciations()
IWiktionaryEntry
.public void setPronunciations(List<IPronunciation> pronunciations)
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.