public class MostSimilarConceptsGenerator extends Object implements VectorGenerator
Modifier and Type | Class and Description |
---|---|
static class |
MostSimilarConceptsGenerator.Provider |
Constructor and Description |
---|
MostSimilarConceptsGenerator(Language language,
LocalPageDao pageDao,
SRMetric baseMetric,
int numConcepts) |
Modifier and Type | Method and Description |
---|---|
List<Explanation> |
getExplanations(int pageID1,
int pageID2,
gnu.trove.map.TIntFloatMap vector1,
gnu.trove.map.TIntFloatMap vector2,
SRResult result)
Adds the explanation for a particular SRResult if it is supported.
|
List<Explanation> |
getExplanations(String phrase1,
String phrase2,
gnu.trove.map.TIntFloatMap vector1,
gnu.trove.map.TIntFloatMap vector2,
SRResult result)
Adds the explanation for a particular SRResult if it is supported.
|
gnu.trove.map.TIntFloatMap |
getVector(int pageId)
Returns the feature vector associated with Wikipedia id.
|
gnu.trove.map.TIntFloatMap |
getVector(String phrase)
Returns the feature vector associated with the phrase
|
void |
setConcepts(File file) |
public MostSimilarConceptsGenerator(Language language, LocalPageDao pageDao, SRMetric baseMetric, int numConcepts)
public gnu.trove.map.TIntFloatMap getVector(int pageId) throws DaoException
VectorGenerator
getVector
in interface VectorGenerator
DaoException
public gnu.trove.map.TIntFloatMap getVector(String phrase)
VectorGenerator
getVector
in interface VectorGenerator
public List<Explanation> getExplanations(String phrase1, String phrase2, gnu.trove.map.TIntFloatMap vector1, gnu.trove.map.TIntFloatMap vector2, SRResult result) throws DaoException
VectorGenerator
getExplanations
in interface VectorGenerator
phrase1
- First phrasephrase2
- Second phrasevector1
- Vector representing first itemvector2
- Vector representing second itemresult
- Original sr object, with explanations (hopefully) added.DaoException
public void setConcepts(File file) throws IOException
IOException
public List<Explanation> getExplanations(int pageID1, int pageID2, gnu.trove.map.TIntFloatMap vector1, gnu.trove.map.TIntFloatMap vector2, SRResult result) throws DaoException
VectorGenerator
getExplanations
in interface VectorGenerator
pageID1
- First pagepageID2
- Second pagevector1
- Vector representing first itemvector2
- Vector representing second itemresult
- Original sr object, with explanations (hopefully) added.DaoException
Copyright © 2014. All rights reserved.