|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tudarmstadt.ukp.jwktl.parser.wikisaurus.WikisaurusArticleParser
public class WikisaurusArticleParser
(Yet experimental) parser for the Wikisaurus entries (i.e., wiki pages in the Wikisaurus namespace that contain thesaurus-like information).
Field Summary | |
---|---|
protected String |
currentNamespace
|
protected String |
currentTitle
|
protected List<WikisaurusEntry> |
entryQueue
|
protected Map<String,Integer> |
notFoundRelation
|
protected Map<String,RelationType> |
relTypeMap
|
protected IWritableWiktionaryEdition |
wiktionaryDB
|
Constructor Summary | |
---|---|
WikisaurusArticleParser(IWritableWiktionaryEdition wiktionaryDB)
Instanciates the parser for the given database. |
Method Summary | |
---|---|
protected String[] |
extractRelTarget(String wsRel)
Extracts relation target and target sense definition (if exists). |
protected String |
extractSenseDefinition(String wsSense)
Extracts sense definition from Wikisaurus line. |
void |
onClose(IDumpInfo dumpInfo)
Hotspot that is invoked after the parser has finished its work. |
void |
onPageEnd()
Hotspot that is invoked upon finishing the current article page. |
void |
onPageStart()
Hotspot that is invoked upon starting a new article page. |
void |
onParserEnd(IDumpInfo dumpInfo)
Hotspot that is invoked when the parser is about to end. |
void |
onParserStart(IDumpInfo dumpInfo)
Hotspot that is invoked upon starting the parser. |
void |
onSiteInfoComplete(IDumpInfo dumpInfo)
Hotspot that is invoked after the siteinfo header has been read. |
protected Set<WikisaurusEntry> |
parseWikisaurusEntries(String title,
String text)
|
protected void |
saveWikisaurusEntry(WikisaurusEntry wikisaurusEntry,
boolean allowCaching)
|
void |
setAuthor(String author)
Hotspot that is invoked after the current page's author is read. |
void |
setPageId(long pageId)
Hotspot that is invoked after the current page's id is read. |
void |
setRevision(long revisionId)
Hotspot that is invoked after the current page's revision id is read. |
void |
setText(String text)
Hotspot that is invoked after the current page's text is read. |
void |
setTimestamp(Date timestamp)
Hotspot that is invoked after the current page's timestamp is read. |
void |
setTitle(String title,
String namespace)
Hotspot that is invoked after the current page's title is read. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IWritableWiktionaryEdition wiktionaryDB
protected List<WikisaurusEntry> entryQueue
protected String currentTitle
protected String currentNamespace
protected Map<String,Integer> notFoundRelation
protected Map<String,RelationType> relTypeMap
Constructor Detail |
---|
public WikisaurusArticleParser(IWritableWiktionaryEdition wiktionaryDB)
Method Detail |
---|
public void onParserStart(IDumpInfo dumpInfo)
IWiktionaryPageParser
onParserStart
in interface IWiktionaryPageParser
public void onSiteInfoComplete(IDumpInfo dumpInfo)
IWiktionaryPageParser
onSiteInfoComplete
in interface IWiktionaryPageParser
public void onClose(IDumpInfo dumpInfo)
IWiktionaryPageParser
IWiktionaryPageParser.onParserEnd(IDumpInfo)
calls have been handled.
onClose
in interface IWiktionaryPageParser
public void onPageStart()
IWiktionaryPageParser
onPageStart
in interface IWiktionaryPageParser
public void onPageEnd()
IWiktionaryPageParser
onPageEnd
in interface IWiktionaryPageParser
public void setAuthor(String author)
IWiktionaryPageParser
setAuthor
in interface IWiktionaryPageParser
public void setRevision(long revisionId)
IWiktionaryPageParser
setRevision
in interface IWiktionaryPageParser
public void setTimestamp(Date timestamp)
IWiktionaryPageParser
setTimestamp
in interface IWiktionaryPageParser
public void setPageId(long pageId)
IWiktionaryPageParser
setPageId
in interface IWiktionaryPageParser
public void setTitle(String title, String namespace)
IWiktionaryPageParser
setTitle
in interface IWiktionaryPageParser
public void setText(String text)
IWiktionaryPageParser
setText
in interface IWiktionaryPageParser
protected Set<WikisaurusEntry> parseWikisaurusEntries(String title, String text)
public void onParserEnd(IDumpInfo dumpInfo)
IWiktionaryPageParser
IWiktionaryPageParser.onClose(IDumpInfo)
hotspot.
onParserEnd
in interface IWiktionaryPageParser
protected void saveWikisaurusEntry(WikisaurusEntry wikisaurusEntry, boolean allowCaching)
protected String extractSenseDefinition(String wsSense)
protected String[] extractRelTarget(String wsRel)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |