Class DypsisMappingCore
- java.lang.Object
-
- de.julielab.genemapper.mappingcores.DypsisMappingCore
-
- All Implemented Interfaces:
MappingCore
public class DypsisMappingCore extends Object implements MappingCore
This mapping core is named after the Dypsis lutescens, "Goldfruchtpalme" is is supposed to augment the older YukkaMappingCore with a document oriented integrity approach.- Author:
- faessler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDypsisMappingCore.NameLevelUnificationStrategy
-
Constructor Summary
Constructors Constructor Description DypsisMappingCore(de.julielab.geneexpbase.TermNormalizer normalizer, CandidateRetrieval candidateRetrieval, DypsisCandidateSetter candidateSetter, WikipediaEntityClassDecisionBear decisionBear, GeneCompositeNameResolver geneCompositeNameResolver, de.julielab.speciesassignment.GeneSpeciesAssigner speciesAssigner, de.julielab.speciesassignment.spi.SpeciesAssignmentFilter assignmentFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckSpeciesAssigner()Performs a null check for thespeciesAssignerand throws an exception if it is not present.voidclear()CandidateRetrievalgetCandidateRetrieval()DypsisCandidateSettergetCandidateSetter()ContextRankergetContextualRanking()de.julielab.geneexpbase.TermNormalizergetTermNormalizer()voidloadCandidateSetter(File source)voidloadParameters(File soruce)de.julielab.geneexpbase.genemodel.DocumentMappingResultmap(de.julielab.geneexpbase.genemodel.GeneDocument document)Maps the gene mentions in the passed document to database IDs.de.julielab.geneexpbase.genemodel.DocumentMappingResultmap(de.julielab.geneexpbase.genemodel.GeneDocument document, de.julielab.geneexpbase.configuration.Parameters parameterMap, Stats stats)de.julielab.geneexpbase.genemodel.MentionMappingResultmap(de.julielab.geneexpbase.genemodel.GeneMention predictedMention)voidsaveCandidateSetter(File destination, de.julielab.geneexpbase.configuration.Parameters parameters)voidsaveParameter(File destination)voidsetOmitCandidateSetting(boolean omitCandidateSetting)voidshutdown()Indicates that the mapping process has finished and all held resources should be freed.
-
-
-
Constructor Detail
-
DypsisMappingCore
@Inject public DypsisMappingCore(de.julielab.geneexpbase.TermNormalizer normalizer, CandidateRetrieval candidateRetrieval, DypsisCandidateSetter candidateSetter, WikipediaEntityClassDecisionBear decisionBear, GeneCompositeNameResolver geneCompositeNameResolver, de.julielab.speciesassignment.GeneSpeciesAssigner speciesAssigner, de.julielab.speciesassignment.spi.SpeciesAssignmentFilter assignmentFilter) throws GeneMapperException- Throws:
GeneMapperException
-
-
Method Detail
-
getCandidateSetter
public DypsisCandidateSetter getCandidateSetter()
-
setOmitCandidateSetting
public void setOmitCandidateSetting(boolean omitCandidateSetting)
-
saveCandidateSetter
public void saveCandidateSetter(File destination, de.julielab.geneexpbase.configuration.Parameters parameters)
-
loadCandidateSetter
public void loadCandidateSetter(File source) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
map
public de.julielab.geneexpbase.genemodel.DocumentMappingResult map(de.julielab.geneexpbase.genemodel.GeneDocument document) throws GeneMapperExceptionMaps the gene mentions in the passed document to database IDs. Algorithm parameters are taken from
Configurationthe mapping core was constructed with.- Specified by:
mapin interfaceMappingCore- Parameters:
document- The document for which to map the gene mentions.- Returns:
- The result of the mapping.
- Throws:
GeneMapperException- If the mapping process fails.
-
saveParameter
public void saveParameter(File destination)
-
loadParameters
public void loadParameters(File soruce)
-
map
public de.julielab.geneexpbase.genemodel.DocumentMappingResult map(de.julielab.geneexpbase.genemodel.GeneDocument document, de.julielab.geneexpbase.configuration.Parameters parameterMap, Stats stats) throws GeneMapperException- Specified by:
mapin interfaceMappingCore- Throws:
GeneMapperException
-
checkSpeciesAssigner
public void checkSpeciesAssigner()
Performs a null check for thespeciesAssignerand throws an exception if it is not present.- Throws:
IllegalStateException- If the species assigner is null.
-
shutdown
public void shutdown() throws GeneMapperExceptionDescription copied from interface:MappingCoreIndicates that the mapping process has finished and all held resources should be freed.- Specified by:
shutdownin interfaceMappingCore- Throws:
GeneMapperException
-
clear
public void clear()
- Specified by:
clearin interfaceMappingCore
-
map
public de.julielab.geneexpbase.genemodel.MentionMappingResult map(de.julielab.geneexpbase.genemodel.GeneMention predictedMention) throws GeneMapperException- Specified by:
mapin interfaceMappingCore- Throws:
GeneMapperException
-
getContextualRanking
public ContextRanker getContextualRanking()
- Specified by:
getContextualRankingin interfaceMappingCore
-
getCandidateRetrieval
public CandidateRetrieval getCandidateRetrieval()
- Specified by:
getCandidateRetrievalin interfaceMappingCore
-
getTermNormalizer
public de.julielab.geneexpbase.TermNormalizer getTermNormalizer()
- Specified by:
getTermNormalizerin interfaceMappingCore
-
-