Skip to main content

Advertisement

Table 2 Grammar definition with production rules

From: QAnalysis: a question-answer driven analytic tool on knowledge graphs for leveraging electronic medical records for clinical research

1 S - > QueryItem | QueryItem S | Condition S | Condition ‘Class’ S
2 Condition - > RelationCondition | PropertyCondition
3 Condition - > Condition ‘LogicalOperator’ Condition
4 Condition - > RelationCondition ‘TimeOperator’ Condition
5 RelationCondition - > ‘Relation’ ‘Instance’ | ‘Not’ ‘Relation’ ‘Instance’ | TimeBlock ‘Relation’ ‘Instance’ | TimeBlock ‘Not’ ‘Relation’ ‘Instance’
6 TimeBlock - > ‘TimeValue’ | ‘TimeValue’ ‘LogicalOperator’ | ‘TimeValue’ ‘RangeSeparator’ ‘TimeValue’
7 PropertyCondition - > ‘Property’ PropertyValue | ‘Instance’ ‘Property’ PropertyValue
8 PropertyValue - > ‘EnumValue’ | NumericValue | NumericRange | TimeBlock
9 NumericValue - > ‘Number’ | ‘Number’ ‘Unit’
10 NumericRange - > NumericValue ‘RangeSeparator’ NumericValue | ‘ArithmeticOperator’ NumericValue
11 QueryItem - > ‘Property’ ‘StatisticOperator’ | ‘StatisticOperator’ ‘Property’ | ‘Relation’ ‘StatisticOperator’ ‘Class’ | ‘Instance’ ‘Property’ ‘StatisticOperator’