Class TextExtractorForTransformers
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.textExtractors.TextExtractorForTransformers
- All Implemented Interfaces:
TextExtractor
A
TextExtractor which extracts texts from a resource which can be used by transformer
based matchers like TransformersFilter
or TransformersFineTuner.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanextract(org.apache.jena.rdf.model.Resource r) Returns a set of descriptions.private Set<ProcessedLiteral>getPossibleLiterals(org.apache.jena.rdf.model.Resource r) inthashCode()private voidupdateContained(List<ProcessedLiteral> literals)
-
Field Details
-
minToken
private int minToken -
annotationExtractor
-
-
Constructor Details
-
TextExtractorForTransformers
public TextExtractorForTransformers(int minToken) -
TextExtractorForTransformers
public TextExtractorForTransformers()
-
-
Method Details
-
extract
Returns a set of descriptions.- Specified by:
extractin interfaceTextExtractor- Parameters:
r- the jena resource which also allows to traverse the whole rdf graph- Returns:
- Potentially multiple strings. If there are multiple strings but one string is a subset of another string,
the subset will not be included. For example:
Found strings:
[(label) "heart", (comment) "The heart is..."]-> only"The heart is..."will be returned.
-
getPossibleLiterals
-
updateContained
-
hashCode
public int hashCode() -
equals
-