Package org.aksw.qa.annotation.sparql
Class SimpleQuantityRanker
java.lang.Object
org.aksw.qa.annotation.sparql.SimpleQuantityRanker
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringconstructQuery(String uri)booleanChecks if String is a class.booleanChecks if String is a property.rank(Collection<String> uris)For property, counts how many relations with this property exist.
-
Field Details
-
sparql
private org.aksw.qa.commons.sparql.SPARQL sparql -
DBPEDIA_ONTO_URI
- See Also:
- Constant Field Values
-
-
Constructor Details
-
SimpleQuantityRanker
public SimpleQuantityRanker()
-
-
Method Details
-
rank
For property, counts how many relations with this property exist. The one with the most relations is returned. For classes, counts how many subtypes of this class are existing. the one with the most subtypes is returned. If properties and classes are among the uris, the one with the biggest count is returned.- Parameters:
uris-- Returns:
-
constructQuery
-
disambiguateOntologyIsProperty
Checks if String is a property. Checks if string begins with: "http://dbpedia.org/ontology/" , if following character is lowercase, its a property. Only works for dbpedia.- Parameters:
uri- String to check.- Returns:
- true if string is a property within dbpedia.
-
disambiguateOntologyIsClass
Checks if String is a class. Checks if string begins with: "http://dbpedia.org/ontology/" , if following character is uppercase, its a class. Only works for dbpedia.- Parameters:
uri- String to check.- Returns:
- true if string is a property within dbpedia.
-