Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/schema/dosdp_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ definitions:
leaving this field out.
items: {type: string}
type: array
permutations:
description: >
Optional list of permutation specifications. For each variable specified,
generates additional annotations using the values of the specified annotation
properties from the filler term. The label-based annotation is always generated
in addition to the permutations. If multiple permutation entries exist for
different variables, the cartesian product of all values is generated.
type: array
items: { $ref: '#/definitions/permutation' }
multi_clause:
items: { $ref: '#/definitions/multi_clause_printf' }

Expand Down Expand Up @@ -219,6 +228,24 @@ definitions:
type: string
description: perl style regex sub. May include backreferences.

permutation:
type: object
additionalProperties: False
required: [var, annotationProperties]
properties:
var:
description: >
The name of a single variable for which to generate permutations.
Must correspond to a variable specified in the 'vars' field of the pattern.
type: string
annotationProperties:
description: >
A list of annotation property names (as declared in the annotationProperties
dictionary) whose values from the filler term will be used to generate
additional annotations. Each value found generates a separate annotation.
type: array
items: { type: string }

opa:
type: object
additionalProperties: False
Expand Down Expand Up @@ -272,6 +299,15 @@ definitions:
used in the substitution.
items: {type: string}
type: array
permutations:
description: >
Optional list of permutation specifications. For each variable specified,
generates additional annotations using the values of the specified annotation
properties from the filler term. The label-based annotation is always generated
in addition to the permutations. If multiple permutation entries exist for
different variables, the cartesian product of all values is generated.
type: array
items: { $ref: '#/definitions/permutation' }
multi_clause:
items: { $ref: '#/definitions/multi_clause_printf' }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
pattern_name: acute_with_permutations

pattern_iri: http://purl.obolibrary.org/obo/mondo/patterns/acute_with_permutations.yaml

description: 'Test pattern demonstrating the permutations feature for synonym generation.
This pattern generates additional synonyms by permuting over the exact_synonym
values of the disease filler term.'

contributors:
- https://orcid.org/0000-0002-6601-2165

classes:
acute: PATO:0000389
disease: MONDO:0000001

relations:
has modifier: RO:0002573

annotationProperties:
exact_synonym: oio:hasExactSynonym
related_synonym: oio:hasRelatedSynonym

vars:
disease: '''disease'''

name:
text: acute %s
vars:
- disease

annotations:
- annotationProperty: exact_synonym
text: '%s, acute'
permutations:
- var: disease
annotationProperties:
- exact_synonym
vars:
- disease

def:
text: Acute form of %s.
vars:
- disease

equivalentTo:
text: '%s and ''has modifier'' some ''acute'''
vars:
- disease
Loading