Hi Nil, So last week I was focused mainly on building a comprehensive parser that uses python and correctly parses the envo.obo code from the environmental ontology and then sends correctly parsed statements to a python class, named schemeWriter. I essentially reworked this code substantially: https://github.com/opencog/agi-bio/blob/master/knowledge-import/GO_scm.py
What I changed was first and foremost that I packed the code into three classes: for 1) loading the data 2) processing it and 3) writing scheme Atom Space representations onto a file (alternatively it wouldn't be hard to enter incoming statements directly into the AtomSpace via Python writing string representations of Scheme code. This works brilliantly via the python interface to opencog. Last week I repackaged the GO_scm.py code and then I focused hard on catching all cases and parsing them correctly for the schemeWriter to then do the writing. I built a basic version of the loader, the processor and the writer and I perfected the loading and processing, while leaving most of the writing a bit coarse and wrong. Now, I will start working more on the writing part and there it is now important to correctly encode those statements into Scheme Atomese. For example, the idea of symmetry is encoded in the amusing friend example, so that the statement for a predicate being symmetric can follow that example: https://github.com/opencog/opencog/blob/master/examples/pln/amusing-friend/kb.scm ;; Friendship is symmetric (ImplicationScope (stv 1 1) (VariableList (TypedVariable (Variable "$X") (Type "ConceptNode")) (TypedVariable (Variable "$Y") (Type "ConceptNode"))) (Evaluation (Predicate "will-be-friends") (List (Variable "$X") (Variable "$Y"))) (Evaluation (Predicate "will-be-friends") (List (Variable "$Y") (Variable "$X")))) In the Relation Ontology which is loaded into the Sustainable Development Goals ontology that I'm working with, we have some 51 propertyChainAxioms with complex definitions like this: http://www.ontobee.org/ontology/RO?iri=http://purl.obolibrary.org/obo/RO_0002428 Do you know of a simpler way than to hand-code those Axioms individually? I mean, do you know if they might not already be encoded somewhere? If I have to, I'll encode all of them by hand--quite a project! Johannes -- You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/opencog. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/b6af5590-4368-4d09-83c4-c3864f77909c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
