INCATools / dead_simple_owl_design_patterns

A simple system for specifying OWL class design patterns for OBO-ish ontologies.
http://incatools.github.io/dead_simple_owl_design_patterns/
GNU General Public License v3.0
43 stars 5 forks source link

simplify interpolation #19

Closed balhoff closed 7 years ago

balhoff commented 8 years ago

It seems like template files could be simplified if the interpolation used variable names instead of requiring the list of positions. Instead of this:

vars: 
  quality: "'Thing'"
  entity: "'Thing'"
  location: "'Thing'"

name:
  text: "%s %s in %s"
  vars:
    - quality
    - entity
    - location

equivalentTo: 
  text: "%s and 'inheres in' some (%s and 'part of' some %s)"
  vars:
    - quality
    - entity
    - location

What about this:

vars: 
  quality: "'Thing'"
  entity: "'Thing'"
  location: "'Thing'"

name:
  text: "$quality $entity in $location"

equivalentTo: 
  text: "$quality and 'inheres in' some ($entity and 'part of' some $location)"

No need for the vars property in every section.

dosumis commented 7 years ago

Appealing suggestion, but don't want to put burden on developers of implementations to build a reliable interpolation system rather than re-use existing ones.