|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infomat.algorithms.search.Searcher
public class Searcher
A search tool.
Field Summary | |
---|---|
private Properties |
properties
|
private ISimilarity |
similarity
|
Constructor Summary | |
---|---|
Searcher()
|
|
Searcher(Properties properties)
|
Method Summary | |
---|---|
private IVector<IObject> |
basicSearch(IVector<IObject> queryVec,
IMatrix matrix,
IObjectGroup rowGroup,
IObjectGroup columnGroup,
boolean row,
int number)
Returns a ranked IVector of the objects in "rowGroup" that match the terms in "queryVec". |
Properties |
getDefaultProperties()
|
Properties |
getProperties()
|
java.lang.Object |
getPropertyValue(java.lang.String name)
|
ISimilarity |
getSimilarity()
|
private IVector<IObject> |
multiSearch(java.util.Vector<IVector<IObject>> queryVecs,
IMatrix matrix,
IObjectGroup rowGroup,
IObjectGroup columnGroup,
boolean row,
int number)
As basicSearch() but several different queries are considered. |
IVector<IObject> |
parseText(java.lang.String queryString,
IMatrix matrix,
IObjectGroup rowGroup,
IObjectGroup columnGroup,
boolean row)
Constructs a term vector with column objects when row is true. |
private IVector<IObject> |
rank(IVector<IObject> queryVec,
java.util.Vector<IObject> resVec)
Ranks the objects in "resVec" according to similarity to the terms in "queryVec". |
private java.util.Vector<IObject> |
removeObjectsWithFewTerms(java.util.Vector<IObject> resVec,
java.util.HashMap<IObject,java.util.HashSet<IObject>> termsForObjectMap,
int number)
Removes objects that has fewer terms than "number". |
IVector<IObject> |
search(IVector<IObject> queryVec,
IMatrix matrix,
IObjectGroup rowGroup,
IObjectGroup columnGroup,
boolean row)
|
IVector<IObject> |
search(java.lang.String queryString,
IMatrix matrix,
IObjectGroup rowGroup,
IObjectGroup columnGroup,
boolean row)
|
void |
setProperties(Properties properties)
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
|
void |
setSimilarity(ISimilarity similarity)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Properties properties
private ISimilarity similarity
Constructor Detail |
---|
public Searcher()
public Searcher(Properties properties)
Method Detail |
---|
public Properties getDefaultProperties()
getDefaultProperties
in interface HasProperties
public java.lang.Object getPropertyValue(java.lang.String name)
getPropertyValue
in interface HasProperties
public void setProperty(java.lang.String name, java.lang.Object value) throws PropertyNotFoundException
setProperty
in interface HasProperties
PropertyNotFoundException
public Properties getProperties()
getProperties
in interface HasProperties
public void setProperties(Properties properties)
setProperties
in interface HasProperties
public void setSimilarity(ISimilarity similarity)
setSimilarity
in interface NeedsISimilarity
public ISimilarity getSimilarity()
public IVector<IObject> search(IVector<IObject> queryVec, IMatrix matrix, IObjectGroup rowGroup, IObjectGroup columnGroup, boolean row)
private IVector<IObject> multiSearch(java.util.Vector<IVector<IObject>> queryVecs, IMatrix matrix, IObjectGroup rowGroup, IObjectGroup columnGroup, boolean row, int number)
private IVector<IObject> basicSearch(IVector<IObject> queryVec, IMatrix matrix, IObjectGroup rowGroup, IObjectGroup columnGroup, boolean row, int number)
private java.util.Vector<IObject> removeObjectsWithFewTerms(java.util.Vector<IObject> resVec, java.util.HashMap<IObject,java.util.HashSet<IObject>> termsForObjectMap, int number)
private IVector<IObject> rank(IVector<IObject> queryVec, java.util.Vector<IObject> resVec)
public IVector<IObject> search(java.lang.String queryString, IMatrix matrix, IObjectGroup rowGroup, IObjectGroup columnGroup, boolean row)
public IVector<IObject> parseText(java.lang.String queryString, IMatrix matrix, IObjectGroup rowGroup, IObjectGroup columnGroup, boolean row)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |