Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPPL script with nested expression does not work #2

Open
CMCosta opened this issue Oct 24, 2013 · 4 comments
Open

OPPL script with nested expression does not work #2

CMCosta opened this issue Oct 24, 2013 · 4 comments

Comments

@CMCosta
Copy link

CMCosta commented Oct 24, 2013

I am trying to execute the following OPPL script:

?PresentSituation:CLASS
        SELECT ?PresentSituation SubClassOf 
'Clinical finding present (situation)' and 'Role group (attribute)' some     ('Associated finding (attribute)' some 'Heart murmur (finding)' and 'Finding context (attribute)' some 'Known present (qualifier value)' and 'Temporal context (attribute)' some 'Current or specified time (qualifier value)' and 'Subject relationship context (attribute)' some 'Subject of record (person)')

BEGIN
ADD ?PresentSituation SubClassOf TestClass
END;

The class exist in the ontology. OPPL does not raise any syntactical error when parsing it but no class is found.

I suspect that the error might be due to the deep of the nesting?

Thanks.

@elenimikro
Copy link
Member

Hi,

Is TestClass in the ontology as well? If not you need to create it. Also on which ontology are you using?

Thanks

@CMCosta
Copy link
Author

CMCosta commented Oct 25, 2013

Yes, it is. I just created it to test the SELECT.
It is the SNOMED CT ontology.

Thanks.

@ignazio1977
Copy link
Contributor

The nested expressions are not parsed as expected - parentheses are needed. The parsed script looks like this:

?PresentSituation:CLASS SELECT ?PresentSituation SubClassOf clinicalfindingpresent_situation and (rolegroup_attribute some (associatedfinding_attribute some
(heartmurmur_finding and (findingcontext_attribute some
(knownpresent_qualifiervalue and (temporalcontext_attribute some
(currentorspecifiedtime and (subjectrelationshipcontext some subjectofrecord_person))))))))
BEGIN ADD ?PresentSituation SubClassOf TestClass END;

@ignazio1977
Copy link
Contributor

Protege's rendering in Manchester OWL Syntax of the expression is: 'Clinical finding present (situation)'
and ('Role group (attribute)' some
(('Associated finding (attribute)' some 'Heart murmur (finding)')
and ('Finding context (attribute)' some 'Known present (qualifier value)')
and ('Subject relationship context (attribute)' some 'Subject of record (person)')
and ('Temporal context (attribute)' some 'Current or specified time (qualifier value)')))

However these nested expressions are not supported in the current OPPL Manchester syntax parser.

ignazio1977 added a commit that referenced this issue Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants