Modifier and Type | Field and Description |
---|---|
Map<String,List<String>> |
annotationTypesMap
Found annotation types in the annic patterns.
|
Constructor and Description |
---|
LuceneSearcher() |
Modifier and Type | Method and Description |
---|---|
void |
addQueryTokens(String query,
List<String> queryTokens)
Adds the query tokens for the given query.
|
void |
exportResults(File outputFile)
This method allow exporting results in to the provided file.
|
int |
freq(List<Hit> patternsToSearchIn,
String annotationType,
boolean inMatchedSpan,
boolean inContext) |
int |
freq(List<Hit> patternsToSearchIn,
String annotationType,
String feature,
String value,
boolean inMatchedSpan,
boolean inContext) |
int |
freq(String corpusToSearchIn,
String annotationSetToSearchIn,
String annotationType) |
int |
freq(String corpusToSearchIn,
String annotationSetToSearchIn,
String annotationType,
String featureName) |
int |
freq(String corpusToSearchIn,
String annotationSetToSearchIn,
String annotationType,
String featureName,
String value) |
Map<String,Integer> |
freqForAllValues(List<Hit> patternsToSearchIn,
String annotationType,
String feature,
boolean inMatchedSpan,
boolean inContext) |
Map<String,List<String>> |
getAnnotationTypesMap()
Gets the map of found annotation types and annotation features.
|
Integer |
getContextWindow()
Gets the number of base token annotations to show in the context.
|
Hit[] |
getHits()
Gets the found hits (annic patterns).
|
String[] |
getIndexedAnnotationSetNames()
This method returns a set of annotation set names that are indexed.
|
Map<String,Object> |
getParameters()
Gets the search parameters set by user.
|
String |
getQuery()
Gets the submitted query.
|
List<String> |
getQueryTokens(String query)
Gets the query tokens for the given query.
|
Hit[] |
next(int numberOfHits)
Return the next numberOfHits -1 indicates all
|
boolean |
search(String query,
Map<String,Object> parameters)
Method retunrs true/false indicating whether results were found or not.
|
void |
setLuceneDatastore(LuceneDataStoreImpl datastore) |
public Hit[] next(int numberOfHits) throws SearchException
next
in interface Searcher
SearchException
public boolean search(String query, Map<String,Object> parameters) throws SearchException
search
in interface Searcher
SearchException
public String getQuery()
public Integer getContextWindow()
public Hit[] getHits()
public Map<String,List<String>> getAnnotationTypesMap()
getAnnotationTypesMap
in interface Searcher
public String[] getIndexedAnnotationSetNames() throws SearchException
corpusName;annotationSetName
where, the corpusName is the name of the corpus the annotationSetName belongs to.getIndexedAnnotationSetNames
in interface Searcher
SearchException
public Map<String,Object> getParameters()
getParameters
in interface Searcher
public List<String> getQueryTokens(String query)
public void addQueryTokens(String query, List<String> queryTokens)
public void exportResults(File outputFile)
exportResults
in interface Searcher
public int freq(String corpusToSearchIn, String annotationSetToSearchIn, String annotationType, String featureName, String value) throws SearchException
freq
in interface Searcher
SearchException
public int freq(String corpusToSearchIn, String annotationSetToSearchIn, String annotationType) throws SearchException
freq
in interface Searcher
SearchException
public int freq(String corpusToSearchIn, String annotationSetToSearchIn, String annotationType, String featureName) throws SearchException
freq
in interface Searcher
SearchException
public int freq(List<Hit> patternsToSearchIn, String annotationType, String feature, String value, boolean inMatchedSpan, boolean inContext) throws SearchException
freq
in interface Searcher
SearchException
public int freq(List<Hit> patternsToSearchIn, String annotationType, boolean inMatchedSpan, boolean inContext) throws SearchException
freq
in interface Searcher
SearchException
public Map<String,Integer> freqForAllValues(List<Hit> patternsToSearchIn, String annotationType, String feature, boolean inMatchedSpan, boolean inContext) throws SearchException
freqForAllValues
in interface Searcher
SearchException
public void setLuceneDatastore(LuceneDataStoreImpl datastore)
Copyright © 2024 GATE. All rights reserved.