Skip to content

dl/translations.py: Are all the property/class declarations still needed? #43

@thahmann

Description

@thahmann

See for example here:

def class_assertion(pattern, ontology):
'''
TODO: Actually write these
'''
# Existing classes
classes = [*ontology.classes]
individuals = [*ontology.individuals]
class_name = pattern[1][0].name
individual = pattern[1][0].variables[0]
# Create any missing classes found in the pattern
if class_name not in classes:
ontology.declare_class(class_name)
classes.append(class_name)
if individual not in individuals:
ontology.declare_individual(individual)
individuals.append(individual)

It seems like that these are already taken care of here:
for unary in axiom.unary():

Same for properties, but not individuals. Should we take a similar approach for individuals (constants): to declare all of them even those not in any pattern?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions