| 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 SearcherSearchExceptionpublic boolean search(String query, Map<String,Object> parameters) throws SearchException
search in interface SearcherSearchExceptionpublic String getQuery()
public Integer getContextWindow()
public Hit[] getHits()
public Map<String,List<String>> getAnnotationTypesMap()
getAnnotationTypesMap in interface Searcherpublic String[] getIndexedAnnotationSetNames() throws SearchException
corpusName;annotationSetName
where, the corpusName is the name of the corpus the annotationSetName belongs to.getIndexedAnnotationSetNames in interface SearcherSearchExceptionpublic Map<String,Object> getParameters()
getParameters in interface Searcherpublic List<String> getQueryTokens(String query)
public void addQueryTokens(String query, List<String> queryTokens)
public void exportResults(File outputFile)
exportResults in interface Searcherpublic int freq(String corpusToSearchIn, String annotationSetToSearchIn, String annotationType, String featureName, String value) throws SearchException
freq in interface SearcherSearchExceptionpublic int freq(String corpusToSearchIn, String annotationSetToSearchIn, String annotationType) throws SearchException
freq in interface SearcherSearchExceptionpublic int freq(String corpusToSearchIn, String annotationSetToSearchIn, String annotationType, String featureName) throws SearchException
freq in interface SearcherSearchExceptionpublic int freq(List<Hit> patternsToSearchIn, String annotationType, String feature, String value, boolean inMatchedSpan, boolean inContext) throws SearchException
freq in interface SearcherSearchExceptionpublic int freq(List<Hit> patternsToSearchIn, String annotationType, boolean inMatchedSpan, boolean inContext) throws SearchException
freq in interface SearcherSearchExceptionpublic Map<String,Integer> freqForAllValues(List<Hit> patternsToSearchIn, String annotationType, String feature, boolean inMatchedSpan, boolean inContext) throws SearchException
freqForAllValues in interface SearcherSearchExceptionpublic void setLuceneDatastore(LuceneDataStoreImpl datastore)
Copyright © 2024 GATE. All rights reserved.