Search in sources :

Example 1 with Retriever

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;
}
Also used : TObjectDoubleHashMap(gnu.trove.map.hash.TObjectDoubleHashMap) Retriever(org.vitrivr.cineast.core.features.retriever.Retriever)

Example 2 with Retriever

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");
}
Also used : Retriever(org.vitrivr.cineast.core.features.retriever.Retriever) SubtitleFulltextSearch(org.vitrivr.cineast.core.features.SubtitleFulltextSearch) AudioTranscriptionSearch(org.vitrivr.cineast.core.features.AudioTranscriptionSearch) ContinuousRetrievalLogic(org.vitrivr.cineast.standalone.util.ContinuousRetrievalLogic) DescriptionTextSearch(org.vitrivr.cineast.core.features.DescriptionTextSearch) ArrayList(java.util.ArrayList) TextQueryTermContainer(org.vitrivr.cineast.core.data.query.containers.TextQueryTermContainer) OCRSearch(org.vitrivr.cineast.core.features.OCRSearch) TagsFtSearch(org.vitrivr.cineast.core.features.TagsFtSearch)

Example 3 with Retriever

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");
}
Also used : SegmentTags(org.vitrivr.cineast.core.features.SegmentTags) TagQueryTermContainer(org.vitrivr.cineast.core.data.query.containers.TagQueryTermContainer) Retriever(org.vitrivr.cineast.core.features.retriever.Retriever) ContinuousRetrievalLogic(org.vitrivr.cineast.standalone.util.ContinuousRetrievalLogic) ArrayList(java.util.ArrayList)

Aggregations

Retriever (org.vitrivr.cineast.core.features.retriever.Retriever)3 ArrayList (java.util.ArrayList)2 ContinuousRetrievalLogic (org.vitrivr.cineast.standalone.util.ContinuousRetrievalLogic)2 TObjectDoubleHashMap (gnu.trove.map.hash.TObjectDoubleHashMap)1 TagQueryTermContainer (org.vitrivr.cineast.core.data.query.containers.TagQueryTermContainer)1 TextQueryTermContainer (org.vitrivr.cineast.core.data.query.containers.TextQueryTermContainer)1 AudioTranscriptionSearch (org.vitrivr.cineast.core.features.AudioTranscriptionSearch)1 DescriptionTextSearch (org.vitrivr.cineast.core.features.DescriptionTextSearch)1 OCRSearch (org.vitrivr.cineast.core.features.OCRSearch)1 SegmentTags (org.vitrivr.cineast.core.features.SegmentTags)1 SubtitleFulltextSearch (org.vitrivr.cineast.core.features.SubtitleFulltextSearch)1 TagsFtSearch (org.vitrivr.cineast.core.features.TagsFtSearch)1