public class PhraseAnalyzerLangDao extends Object
Constructor and Description |
---|
PhraseAnalyzerLangDao(org.wikibrain.core.lang.StringNormalizer normalizer,
org.wikibrain.core.lang.Language lang,
File path,
boolean isNew)
Creates a new dao using the given directory.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
Iterator<org.apache.commons.lang3.tuple.Pair<String,PrunedCounts<Integer>>> |
getAllPhraseCounts() |
Iterator<String> |
getAllPhrases() |
PrunedCounts<String> |
getPageCounts(int wpId,
int maxPhrases) |
PrunedCounts<Integer> |
getPhraseCounts(String phrase,
int maxPages) |
void |
savePageCounts(int wpId,
PrunedCounts<String> counts) |
void |
savePhraseCounts(String phrase,
PrunedCounts<Integer> counts) |
public PhraseAnalyzerLangDao(org.wikibrain.core.lang.StringNormalizer normalizer, org.wikibrain.core.lang.Language lang, File path, boolean isNew) throws org.wikibrain.core.dao.DaoException
path
- isNew
- If true, delete any information contained in the directory.org.wikibrain.core.dao.DaoException
public void savePageCounts(int wpId, PrunedCounts<String> counts) throws org.wikibrain.core.dao.DaoException
org.wikibrain.core.dao.DaoException
public void savePhraseCounts(String phrase, PrunedCounts<Integer> counts) throws org.wikibrain.core.dao.DaoException
org.wikibrain.core.dao.DaoException
public Iterator<org.apache.commons.lang3.tuple.Pair<String,PrunedCounts<Integer>>> getAllPhraseCounts()
public PrunedCounts<Integer> getPhraseCounts(String phrase, int maxPages) throws org.wikibrain.core.dao.DaoException
org.wikibrain.core.dao.DaoException
public PrunedCounts<String> getPageCounts(int wpId, int maxPhrases) throws org.wikibrain.core.dao.DaoException
org.wikibrain.core.dao.DaoException
public void flush()
public void close()
Copyright © 2016. All rights reserved.