Skip to content
Snippets Groups Projects
Commit c76a9c7f authored by Aurélien Lamercerie's avatar Aurélien Lamercerie
Browse files

Fix bug in CTS: compute domain/range for atom without instance

parent 3c6f9f99
No related branches found
No related tags found
No related merge requests found
...@@ -171,7 +171,9 @@ WHERE { ...@@ -171,7 +171,9 @@ WHERE {
?net1 a net:Instance. ?net1 a net:Instance.
?net1 net:type net:relation. ?net1 net:type net:relation.
?net1 net:has_structure ?req. ?net1 net:has_structure ?req.
?net1 net:has_node ?uw1. # -- Relation Object
?net1 net:has_relation ?relationObject.
?relationObject net:has_node ?uw1.
# Atom Net (net2): actor of net1 # Atom Net (net2): actor of net1
?net2 a net:Instance. ?net2 a net:Instance.
?net2 net:type net:atom. ?net2 net:type net:atom.
...@@ -181,9 +183,11 @@ WHERE { ...@@ -181,9 +183,11 @@ WHERE {
# condition: agt(net1, net2) # condition: agt(net1, net2)
?uw1 unl:agt ?uw2. ?uw1 unl:agt ?uw2.
# Possible Domain # Possible Domain
?sourceObject net:has_instance ?sourceInstance. { ?sourceObject net:has_concept ?domainClass. }
UNION
{ ?sourceObject net:has_instance ?sourceInstance.
?anySourceObject net:has_instance ?sourceInstance. ?anySourceObject net:has_instance ?sourceInstance.
?anySourceObject net:has_concept ?domainClass. ?anySourceObject net:has_concept ?domainClass. }
}""" ; }""" ;
sh:order 2.42 ; sh:order 2.42 ;
. .
...@@ -212,7 +216,9 @@ WHERE { ...@@ -212,7 +216,9 @@ WHERE {
?net1 a net:Instance. ?net1 a net:Instance.
?net1 net:type net:relation. ?net1 net:type net:relation.
?net1 net:has_structure ?req. ?net1 net:has_structure ?req.
?net1 net:has_node ?uw1. # -- Relation Object
?net1 net:has_relation ?relationObject.
?relationObject net:has_node ?uw1.
# Atom Net (net2): target of net1 # Atom Net (net2): target of net1
?net2 a net:Instance. ?net2 a net:Instance.
?net2 net:type net:atom. ?net2 net:type net:atom.
...@@ -222,9 +228,11 @@ WHERE { ...@@ -222,9 +228,11 @@ WHERE {
# condition: agt(net1, net2) # condition: agt(net1, net2)
?uw1 (unl:obj|unl:res) ?uw2. ?uw1 (unl:obj|unl:res) ?uw2.
# Possible Domain # Possible Domain
?targetObject net:has_instance ?targetObjectInstance. { ?targetObject net:has_concept ?rangeClass. }
UNION
{ ?targetObject net:has_instance ?targetObjectInstance.
?allTargetObject net:has_instance ?targetObjectInstance. ?allTargetObject net:has_instance ?targetObjectInstance.
?allTargetObject net:has_concept ?rangeClass. ?allTargetObject net:has_concept ?rangeClass. }
}""" ; }""" ;
sh:order 2.42 ; sh:order 2.42 ;
. .
......
...@@ -40,6 +40,7 @@ base_uri = "https://unsel.tetras-libre.fr/tenet/working" ...@@ -40,6 +40,7 @@ base_uri = "https://unsel.tetras-libre.fr/tenet/working"
req_100 = "CCTP-SRSA-IP-20210831-R100/" req_100 = "CCTP-SRSA-IP-20210831-R100/"
req_200 = "CCTP-SRSA-IP-20210831-R200/" req_200 = "CCTP-SRSA-IP-20210831-R200/"
req_300 = "CCTP-SRSA-IP-20210831-R300/" req_300 = "CCTP-SRSA-IP-20210831-R300/"
req_1100 = "CCTP-SRSA-IP-20210831-R1100/"
corpus_40 = "CCTP-SRSA-IP-20210831/" corpus_40 = "CCTP-SRSA-IP-20210831/"
corpus_ERTMS = "ERTMS/" corpus_ERTMS = "ERTMS/"
corpus_PEV = "PEV-RSE-Approach/" corpus_PEV = "PEV-RSE-Approach/"
...@@ -212,6 +213,7 @@ if __name__ == '__main__': ...@@ -212,6 +213,7 @@ if __name__ == '__main__':
run(req_100, 'R100f', target_ref) run(req_100, 'R100f', target_ref)
run(req_200, 'R200f', target_ref) run(req_200, 'R200f', target_ref)
run(req_300, 'R300f', target_ref) run(req_300, 'R300f', target_ref)
run(req_1100, 'R1100f', target_ref)
#run(corpus_40, 'Corpus-CCTP-40e', target_ref) #run(corpus_40, 'Corpus-CCTP-40e', target_ref)
#run(corpus_ERTMS, 'Corpus-ERTMS', target_ref) #run(corpus_ERTMS, 'Corpus-ERTMS', target_ref)
#run(corpus_PEV, 'Corpus-PEV', target_ref) #run(corpus_PEV, 'Corpus-PEV', target_ref)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment