Class LinksToFile
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.services.labelToConcept.LinksToFile
Service class writing the links of a test case / track to a file.
(This can be helpful in some situations e.g. when pre-downloading certain external information or for
analyses.)
If you are interest in linker coverage, use
If you are interest in linker coverage, use
Coverage
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetLinks
(TestCase testCase, TextExtractor extractor, LabelToConceptLinker linker, int maxLabelTokenLength) getLinksForIterator
(org.apache.jena.util.iterator.ExtendedIterator<? extends org.apache.jena.ontology.OntResource> iterator, TextExtractor valueExtractor, LabelToConceptLinker linker, int maxLabelTokenLength) getLinksForOntModel
(org.apache.jena.ontology.OntModel ontModel, TextExtractor extractor, LabelToConceptLinker linker, int maxLabelTokenLength) getLinksTestcases
(@NotNull List<TestCase> testCaseList, @NotNull TextExtractor extractor, @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) getLinksTracks
(@NotNull List<Track> trackList, @NotNull TextExtractor extractor, @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) getUris
(String link, LabelToConceptLinker linker) static void
writeLinksToFile
(@NotNull File fileToWrite, @NotNull TestCase testCase, @NotNull TextExtractor extractor, @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) Write all links of a track to file (UTF-8 encoded).static void
writeLinksToFile
(@NotNull File fileToWrite, @NotNull Track track, @NotNull TextExtractor extractor, @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) Write all links of a track to file (UTF-8 encoded).static <T> void
writeLinksToFile
(@NotNull File fileToWrite, @NotNull List<T> list, @NotNull LabelToConceptLinker linker) Write all links of the tracks/testcases to one file (UTF-8 encoded).static <T> void
writeLinksToFile
(@NotNull File fileToWrite, @NotNull List<T> list, @NotNull TextExtractor extractor, @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) Write all links of the tracks/testcases to one file (UTF-8 encoded).static <T> void
writeLinksToFile
(@NotNull String fileToWrite, @NotNull List<T> list, @NotNull LabelToConceptLinker linker) Write all links of the tracks/testcases to one file (UTF-8 encoded).
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
LinksToFile
public LinksToFile()
-
-
Method Details
-
writeLinksToFile
public static <T> void writeLinksToFile(@NotNull @NotNull String fileToWrite, @NotNull @NotNull List<T> list, @NotNull @NotNull LabelToConceptLinker linker) Write all links of the tracks/testcases to one file (UTF-8 encoded). -
writeLinksToFile
public static <T> void writeLinksToFile(@NotNull @NotNull File fileToWrite, @NotNull @NotNull List<T> list, @NotNull @NotNull LabelToConceptLinker linker) Write all links of the tracks/testcases to one file (UTF-8 encoded). -
writeLinksToFile
public static <T> void writeLinksToFile(@NotNull @NotNull File fileToWrite, @NotNull @NotNull List<T> list, @NotNull @NotNull TextExtractor extractor, @NotNull @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) Write all links of the tracks/testcases to one file (UTF-8 encoded).- Type Parameters:
T
- T must beTrack
orTestCase
- otherwise this method will not work.- Parameters:
fileToWrite
- The file that shall be written.list
- List of tracks or test cases (you cannot mix them).extractor
- The extractor that shall be used to extract labels.linker
- The linker that shall be used.maxLabelTokenLength
- The maximum token length for token linking (to avoid linking description texts).
-
getLinksTracks
static Set<String> getLinksTracks(@NotNull @NotNull List<Track> trackList, @NotNull @NotNull TextExtractor extractor, @NotNull @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) -
writeLinksToFile
public static void writeLinksToFile(@NotNull @NotNull File fileToWrite, @NotNull @NotNull Track track, @NotNull @NotNull TextExtractor extractor, @NotNull @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) Write all links of a track to file (UTF-8 encoded).- Parameters:
fileToWrite
- The file that shall be written.track
- The track that shall be linked.extractor
- The extractor that shall be used to extract labels.linker
- The linker that shall be used.maxLabelTokenLength
- The maximum token length for token linking (to avoid linking description texts).
-
getLinksTestcases
static Set<String> getLinksTestcases(@NotNull @NotNull List<TestCase> testCaseList, @NotNull @NotNull TextExtractor extractor, @NotNull @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) -
writeLinksToFile
public static void writeLinksToFile(@NotNull @NotNull File fileToWrite, @NotNull @NotNull TestCase testCase, @NotNull @NotNull TextExtractor extractor, @NotNull @NotNull LabelToConceptLinker linker, int maxLabelTokenLength) Write all links of a track to file (UTF-8 encoded).- Parameters:
fileToWrite
- The file that shall be written.testCase
- The testCase that shall be linked.extractor
- The extractor that shall be used to extract labels.linker
- The linker that shall be used.maxLabelTokenLength
- The maximum token length for token linking (to avoid linking description texts).
-
getLinks
static Set<String> getLinks(TestCase testCase, TextExtractor extractor, LabelToConceptLinker linker, int maxLabelTokenLength) -
getLinksForOntModel
@NotNull static @NotNull Set<String> getLinksForOntModel(org.apache.jena.ontology.OntModel ontModel, TextExtractor extractor, LabelToConceptLinker linker, int maxLabelTokenLength) -
getLinksForIterator
@NotNull static @NotNull Set<String> getLinksForIterator(org.apache.jena.util.iterator.ExtendedIterator<? extends org.apache.jena.ontology.OntResource> iterator, TextExtractor valueExtractor, LabelToConceptLinker linker, int maxLabelTokenLength) -
getUris
-