Class WiktionaryIndex
java.lang.Object
org.getalp.wiktionary.WiktionaryIndex
- All Implemented Interfaces:
WiktionaryPageSource
WiktionaryIndex is a Persistent HashMap designed to hold an index on a Wiktionary dump file.
- Author:
- serasset
-
Constructor Summary
ConstructorsConstructorDescriptionWiktionaryIndex(Path dump) Creates a WiktionaryIndex for the wiktionary dump whose path is passed as a parameter -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Free resource taken by the index.getFullXmlForPage(String key) getTextOfPage(String key) static Pathreturns Path of the index file corresponding to passed dump.
-
Constructor Details
-
WiktionaryIndex
Creates a WiktionaryIndex for the wiktionary dump whose path is passed as a parameter- Parameters:
dump- the path to file containing the wiktionary dump.- Throws:
WiktionaryIndexerException- thrown if any error occur during index initialization
-
-
Method Details
-
indexFile
-
close
public void close()Free resource taken by the index. -
get
-
getTextOfPageWithRedirects
- Specified by:
getTextOfPageWithRedirectsin interfaceWiktionaryPageSource
-
getTextOfPage
- Specified by:
getTextOfPagein interfaceWiktionaryPageSource
-
getFullXmlForPage
- Specified by:
getFullXmlForPagein interfaceWiktionaryPageSource
-