public class CascadingAnalyzer extends Object implements PhraseAnalyzer
Modifier and Type | Class and Description |
---|---|
static class |
CascadingAnalyzer.Provider
Use a Provider to get configuration in phrases.analyzer.
|
Constructor and Description |
---|
CascadingAnalyzer(PhraseAnalyzer[] delegates) |
Modifier and Type | Method and Description |
---|---|
LinkedHashMap<String,Float> |
describe(org.wikibrain.core.lang.Language language,
org.wikibrain.core.model.LocalPage page,
int maxPhrases)
Returns the most descriptive phrases for a wikipedia page.
|
int |
loadCorpus(org.wikibrain.core.lang.LanguageSet langs)
Loads a specific corpus into the dao.
|
LinkedHashMap<org.wikibrain.core.lang.LocalId,Float> |
resolve(org.wikibrain.core.lang.Language language,
String phrase,
int maxPages)
Returns the most likely wikipedia pages for a phrase.
|
public CascadingAnalyzer(PhraseAnalyzer[] delegates)
public int loadCorpus(org.wikibrain.core.lang.LanguageSet langs) throws org.wikibrain.core.dao.DaoException, IOException
PhraseAnalyzer
loadCorpus
in interface PhraseAnalyzer
org.wikibrain.core.dao.DaoException
IOException
public LinkedHashMap<String,Float> describe(org.wikibrain.core.lang.Language language, org.wikibrain.core.model.LocalPage page, int maxPhrases) throws org.wikibrain.core.dao.DaoException
PhraseAnalyzer
describe
in interface PhraseAnalyzer
language
- The language for the phrase and the returned LocalPages.page
- The page to be described.maxPhrases
- The maximum number of phrases to be returned.org.wikibrain.core.dao.DaoException
public LinkedHashMap<org.wikibrain.core.lang.LocalId,Float> resolve(org.wikibrain.core.lang.Language language, String phrase, int maxPages) throws org.wikibrain.core.dao.DaoException
PhraseAnalyzer
resolve
in interface PhraseAnalyzer
language
- The language for the phrase and the returned LocalPages.phrase
- The phrase to be resolved.maxPages
- The maximum number of pages to be returned.org.wikibrain.core.dao.DaoException
Copyright © 2018. All rights reserved.