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
Modifier and TypeFieldDescriptionprivate int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
extract
(org.apache.jena.rdf.model.Resource r) Returns a set of descriptions.private Set<ProcessedLiteral>
getPossibleLiterals
(org.apache.jena.rdf.model.Resource r) int
hashCode()
private void
updateContained
(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:
extract
in 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
-