Package de.julielab.genemapper.disambig
Class ContextItemsIndex
- java.lang.Object
-
- de.julielab.genemapper.disambig.ContextItemsIndex
-
- All Implemented Interfaces:
SemanticIndex
public class ContextItemsIndex extends Object implements SemanticIndex
-
-
Field Summary
Fields Modifier and Type Field Description org.apache.lucene.search.IndexSearchersearcher
-
Constructor Summary
Constructors Constructor Description ContextItemsIndex(de.julielab.geneexpbase.services.CacheService cacheService, Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>getContextItems(ContextItemsCacheKey key)Collection<String>getContextItems(String geneId, String field)Map<String,org.apache.commons.lang3.tuple.Pair<Double,String>>getContextItemScores(Collection<String> ids, org.apache.lucene.search.BooleanQuery contextQuery, String semanticItemFieldName, boolean returnContextItemValue)org.apache.lucene.search.IndexSearchergetContextItemsSearcher()Map<String,org.apache.commons.lang3.tuple.Pair<Double,String>>getIntraTaxAmbiguousContextItemScores(de.julielab.geneexpbase.candidateretrieval.SynHit synHit, org.apache.lucene.search.BooleanQuery contextQuery, String semanticItemFieldName, boolean returnContextItemValue)Map<String,Float>getSynonymGeneRifScoresForTaxIds(de.julielab.geneexpbase.candidateretrieval.SynHit synHit, Set<String> taxonomyIds)
-
-
-
Constructor Detail
-
ContextItemsIndex
@Inject public ContextItemsIndex(de.julielab.geneexpbase.services.CacheService cacheService, Configuration configuration) throws GeneMapperException- Throws:
GeneMapperException
-
-
Method Detail
-
getContextItems
public Collection<String> getContextItems(ContextItemsCacheKey key) throws ExecutionException
- Throws:
ExecutionException
-
getContextItems
public Collection<String> getContextItems(String geneId, String field) throws ExecutionException
- Throws:
ExecutionException
-
getSynonymGeneRifScoresForTaxIds
public Map<String,Float> getSynonymGeneRifScoresForTaxIds(de.julielab.geneexpbase.candidateretrieval.SynHit synHit, Set<String> taxonomyIds) throws IOException
- Parameters:
synHit-- Returns:
- Throws:
IOException
-
getIntraTaxAmbiguousContextItemScores
public Map<String,org.apache.commons.lang3.tuple.Pair<Double,String>> getIntraTaxAmbiguousContextItemScores(de.julielab.geneexpbase.candidateretrieval.SynHit synHit, org.apache.lucene.search.BooleanQuery contextQuery, String semanticItemFieldName, boolean returnContextItemValue) throws IOException
- Throws:
IOException
-
getContextItemScores
public Map<String,org.apache.commons.lang3.tuple.Pair<Double,String>> getContextItemScores(Collection<String> ids, org.apache.lucene.search.BooleanQuery contextQuery, String semanticItemFieldName, boolean returnContextItemValue) throws IOException
- Throws:
IOException
-
getContextItemsSearcher
public org.apache.lucene.search.IndexSearcher getContextItemsSearcher()
-
-