public class LinkGenerator extends Object implements VectorGenerator
Modifier and Type | Class and Description |
---|---|
static class |
LinkGenerator.LinkType |
static class |
LinkGenerator.Provider |
Constructor and Description |
---|
LinkGenerator(Language language,
LocalLinkDao linkDao,
LocalPageDao pageDao,
boolean outLinks,
String blackListFilePath) |
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 |
setLogTransform(boolean logTransform) |
void |
setWeightByPopularity(boolean weightByPopularity) |
public LinkGenerator(Language language, LocalLinkDao linkDao, LocalPageDao pageDao, boolean outLinks, String blackListFilePath) throws DaoException, FileNotFoundException
DaoException
FileNotFoundException
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 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
public void setWeightByPopularity(boolean weightByPopularity)
public void setLogTransform(boolean logTransform)
Copyright © 2014. All rights reserved.