use of org.vitrivr.cineast.core.features.retriever.Retriever in project cineast by vitrivr.
the class RetrievalRuntimeConfig method getRetrieversByCategory.
public TObjectDoubleHashMap<Retriever> getRetrieversByCategory(String category) {
List<RetrieverConfig> list = this.retrieverCategories.get(category);
if (list == null) {
return new TObjectDoubleHashMap<>(1);
}
TObjectDoubleHashMap<Retriever> _return = new TObjectDoubleHashMap<>(list.size());
for (RetrieverConfig config : list) {
Retriever rev;
if (config.getProperties() == null) {
rev = ReflectionHelper.instantiate(config.getRetrieverClass());
} else {
rev = ReflectionHelper.instantiate(config.getRetrieverClass(), config.getProperties());
}
if (rev != null) {
_return.put(rev, config.getWeight());
}
}
return _return;
}
use of org.vitrivr.cineast.core.features.retriever.Retriever in project cineast by vitrivr.
the class TextRetrievalCommand method run.
public void run() {
final ContinuousRetrievalLogic retrieval = new ContinuousRetrievalLogic(Config.sharedConfig().getDatabase());
System.out.println("Querying for text " + text);
TextQueryTermContainer qc = new TextQueryTermContainer(text);
List<Retriever> retrievers = new ArrayList<>();
retrievers.add(new SubtitleFulltextSearch());
retrievers.add(new OCRSearch());
retrievers.add(new AudioTranscriptionSearch());
retrievers.add(new DescriptionTextSearch());
retrievers.add(new TagsFtSearch());
CliUtils.retrieveAndLog(retrievers, retrieval, limit, printDetail, qc);
System.out.println("Done");
}
use of org.vitrivr.cineast.core.features.retriever.Retriever in project cineast by vitrivr.
the class TagRetrievalCommand method run.
public void run() {
final ContinuousRetrievalLogic retrieval = new ContinuousRetrievalLogic(Config.sharedConfig().getDatabase());
TagQueryTermContainer qc = new TagQueryTermContainer(data);
List<Retriever> retrievers = new ArrayList<>();
retrievers.add(new SegmentTags());
CliUtils.retrieveAndLog(retrievers, retrieval, limit, printDetail, qc);
System.out.println("Done");
}
Aggregations