-
Notifications
You must be signed in to change notification settings - Fork 306
Open
Description
Summary
The GenderExtractor.scala component currently utilizes literal string constants for RDF and OWL identifiers. To improve maintainability and ensure alignment with our core framework, these should be transitioned to dynamic lookups via the context.ontology service.
Current Implementation
At present, the extractor manually defines property and class URIs. This approach bypasses the centralized ontology management system and introduces potential for "magic string" errors.
Affected Code Snippets:
// Hardcoded FOAF property
private val genderProperty = "http://xmlns.com/foaf/0.1/gender"
// Hardcoded RDF type property
private val typeProperty = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
// Hardcoded DBpedia Class
private val personUri = "http://dbpedia.org/ontology/Person"
Recommended Refactor:
-
Gender Property: Use
context.ontology.properties("foaf:gender") -
Type Property: Use
context.ontology.properties("rdf:type") -
Person Class: Use
context.ontology.classes("Person")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels