Class GeneMapper


  • public class GeneMapper
    extends Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearLexicalRankingModel()  
      void clearSemanticRankingModel()  
      Configuration getConfiguration()  
      MappingCore getMappingCore()  
      de.julielab.geneexpbase.genemodel.DocumentMappingResult map​(de.julielab.geneexpbase.genemodel.GeneDocument document)  
      de.julielab.geneexpbase.genemodel.DocumentMappingResult map​(de.julielab.geneexpbase.genemodel.GeneDocument doc, de.julielab.geneexpbase.configuration.Parameters parameterMap)  
      de.julielab.geneexpbase.genemodel.DocumentMappingResult map​(de.julielab.geneexpbase.genemodel.GeneDocument document, de.julielab.geneexpbase.configuration.Parameters parameterMap, Stats stats)  
      de.julielab.geneexpbase.genemodel.DocumentMappingResult map​(de.julielab.geneexpbase.genemodel.GeneDocument document, Stats stats)  
      de.julielab.geneexpbase.genemodel.MentionMappingResult map​(de.julielab.geneexpbase.genemodel.GeneMention searchTerm, org.apache.lucene.search.BooleanQuery contextQuery, String documentContext)
      Actual mapping method.
      List<de.julielab.geneexpbase.candidateretrieval.SynHit> map​(String searchTerm, org.apache.lucene.search.BooleanQuery contextQuery)
      A wrapper to the main mapping function.
      de.julielab.geneexpbase.genemodel.MentionMappingResult map​(String term, org.apache.lucene.search.BooleanQuery contextQuery, String documentContext)
      Convenience method mostly used for tests.
      ArrayList<de.julielab.geneexpbase.candidateretrieval.SynHit> mapTopN​(String searchTerm, int topN)
      This mapping returns a list of SynHits.
      void setMappingCore​(MappingCore mappingCore)  
    • Method Detail

      • map

        public List<de.julielab.geneexpbase.candidateretrieval.SynHit> map​(String searchTerm,
                                                                           org.apache.lucene.search.BooleanQuery contextQuery)
                                                                    throws GeneMapperException
        A wrapper to the main mapping function. This one does not require an organism to be specified and does thus completely organism-agnostic search (currently used basically for backward compatibility to BC evaluation).
        Parameters:
        searchTerm -
        contextQuery -
        Returns:
        the SynHits that apply to the given searchTerm
        Throws:
        Exception
        GeneMapperException
      • map

        public de.julielab.geneexpbase.genemodel.MentionMappingResult map​(de.julielab.geneexpbase.genemodel.GeneMention searchTerm,
                                                                          org.apache.lucene.search.BooleanQuery contextQuery,
                                                                          String documentContext)
                                                                   throws GeneMapperException
        Actual mapping method. This mapping functions has semantic disambiguation as well. First it checks for general, organism-specific hits (getCandidates). If organisms is given (i.e. is not null or not empty) semantic disambiguation is performed with this organism list.
        Parameters:
        searchTerm - the term to do the mapping for
        contextQuery - the term's context (i.e. the document/abstract where it was found in)
        documentContext -
        Returns:
        ArrayList with SynHits
        Throws:
        Exception
        GeneMapperException
      • map

        public de.julielab.geneexpbase.genemodel.DocumentMappingResult map​(de.julielab.geneexpbase.genemodel.GeneDocument document)
                                                                    throws GeneMapperException
        Throws:
        GeneMapperException
      • mapTopN

        public ArrayList<de.julielab.geneexpbase.candidateretrieval.SynHit> mapTopN​(String searchTerm,
                                                                                    int topN)
                                                                             throws IOException,
                                                                                    de.julielab.geneexpbase.candidateretrieval.GeneCandidateRetrievalException
        This mapping returns a list of SynHits. No semantic disambiguation is done here. TopN hits with the highest (lucene) scores are returned. Not needed for actual mapping but used for generating training material for MaxEntScorer.
        Parameters:
        searchTerm - the term to be mapped
        topN - number of hits to be returned
        Throws:
        de.julielab.geneexpbase.candidateretrieval.GeneCandidateRetrievalException
        IOException
      • setMappingCore

        public void setMappingCore​(MappingCore mappingCore)
      • map

        public de.julielab.geneexpbase.genemodel.MentionMappingResult map​(String term,
                                                                          org.apache.lucene.search.BooleanQuery contextQuery,
                                                                          String documentContext)
                                                                   throws GeneMapperException
        Convenience method mostly used for tests. The term will be wrapped into a GeneMention. However, no offset information or other data about the original gene mention will be known, of course.
        Parameters:
        term -
        contextQuery -
        documentContext -
        Returns:
        Throws:
        Exception
        GeneMapperException
      • map

        public de.julielab.geneexpbase.genemodel.DocumentMappingResult map​(de.julielab.geneexpbase.genemodel.GeneDocument document,
                                                                           de.julielab.geneexpbase.configuration.Parameters parameterMap,
                                                                           Stats stats)
                                                                    throws GeneMapperException
        Throws:
        GeneMapperException
      • map

        public de.julielab.geneexpbase.genemodel.DocumentMappingResult map​(de.julielab.geneexpbase.genemodel.GeneDocument doc,
                                                                           de.julielab.geneexpbase.configuration.Parameters parameterMap)
                                                                    throws GeneMapperException
        Throws:
        GeneMapperException
      • clearLexicalRankingModel

        public void clearLexicalRankingModel()
      • clearSemanticRankingModel

        public void clearSemanticRankingModel()