INCATools / kgcl

Datamodel for KGCL (Knowledge Graph Change Language)
https://w3id.org/kgcl/
MIT License
11 stars 4 forks source link

modify grammar to remove need for <>s on URIs #7

Closed cmungall closed 2 years ago

cmungall commented 2 years ago

kgcl.lark has:

_entity: ID
         | LABEL 
         | CURIE

...

ID :  "<" INNER_ID ">" 

INNER_ID: /((?!>).)*/

This is a bit confusing, as CURIEs are IDs

I think what is meant by ID here is actually IRI, so I would change ID to IRI

We also want to make the <>s optional (and deprecated, so I would change to)

_entity: IRI
         | LABEL 
         | CURIE

...

IRI: quoted_iri direct_iri
quoted_iri: "<" direct_iri ">
quoted_iri: /((?!>).)*/

You will also need to update:

https://github.com/INCATools/kgcl/blob/fdcaddece2319029db4a73cf1a553e166669c3d5/src/kgcl_schema/grammar/parser.py#L501-L518

hrshdhgd commented 2 years ago

IRI is already defined on line 74


IRI: /((?!>>)\S)+/
     | /((?!>>>)\S)+/