public class HelpingFunctions extends Object
| Constructor and Description |
|---|
HelpingFunctions() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsOnlyDigits(String text) |
static String |
convertHTMLCodesToSymbols(String text) |
static TreeMap<String,TreeSet<String>> |
findAcronymsPartialsPermutations(String entity)
Creates and returns partial matchings, acronyms and permutations for a given named entity.
|
static TreeMap<String,TreeSet<String>> |
findAcronymsPartialsPermutations(TreeSet<String> entities)
Creates and returns partial matchings, acronyms and permutations for a set of given named entities.
|
static Map<String,String> |
findPossibleAcronymsInText(String text) |
static TreeSet<String> |
findPossibleURIs(String label)
Finds the semantic resources (URIs) of a given entity, regardless of its semantic category.
|
static TreeSet<String> |
findSnippets(String file,
String word) |
static String |
ingoreTextBetweenBrackets(String text)
Removes the text between brackets in the given string.
|
static boolean |
isAcronym(String term) |
static boolean |
IsStringSimilarityOverThreshold(String partialMatchLabel,
Set<String> realLabels,
double threshold)
Check if the string similarity of a term with at least one (string) element of a set
is above a given threshold.
|
static TreeSet<String> |
permute(List<String> arr,
int k)
Find all combinations of a given word terms.
|
static void |
printTable(String[][] table) |
static String |
removeSurroundingStopwords(String text,
String stopwordsFilePath) |
static TreeSet<String> |
runResourceClass(String resourceClass,
String endpoint)
(Help Function)
Runs a SPARQL query with the given Resource Class and returns a Set of named entities.
|
static Set<String> |
runSPARQLQuery(String endpoint,
String query)
(Help Function)
Runs a SPARQL query and returns a Set of named entities.
|
public static TreeMap<String,TreeSet<String>> findAcronymsPartialsPermutations(String entity)
entity - The named entity whose partial matchings and
acronyms we want to find.public static TreeMap<String,TreeSet<String>> findAcronymsPartialsPermutations(TreeSet<String> entities)
entities - The set of named entities whose partial matchings,
acronyms and permutations we want to find.public static TreeSet<String> permute(List<String> arr, int k)
arr - An array that contains the terms of a word.k - The starting position of array.public static Set<String> runSPARQLQuery(String endpoint, String query)
endpoint - The SPARQL endpoint.query - The SPARQL Query.public static TreeSet<String> runResourceClass(String resourceClass, String endpoint)
resourceClass - The Resource Class.public static String ingoreTextBetweenBrackets(String text)
text - The string we want to process.public static boolean isAcronym(String term)
public static boolean containsOnlyDigits(String text)
public static TreeSet<String> findPossibleURIs(String label)
label - The label of the named entity whose semantic resources we want to find.public static boolean IsStringSimilarityOverThreshold(String partialMatchLabel, Set<String> realLabels, double threshold)
partialMatchLabel - A term.realLabels - A set of string elements.threshold - The threshold we want to check.public static String removeSurroundingStopwords(String text, String stopwordsFilePath)
public static void printTable(String[][] table)
Copyright © 2016. All rights reserved.