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

How to find patterns/atoms with the same attributes/types? #56

Open
CICS-Oleg opened this issue Nov 14, 2024 · 1 comment
Open

How to find patterns/atoms with the same attributes/types? #56

CICS-Oleg opened this issue Nov 14, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed question Further information is requested tutorial Tutorial question

Comments

@CICS-Oleg
Copy link
Contributor

I need to implement the following procedure/rule.

The rule infers that if two eventualities are direct instantiations of the same abstract eventuality (i.e., they both describe the same action/state with the same thematic roles) but for at least one thematic role, for which it is asserted that one of the two eventualities has a certain value on that thematic role while the other one does not, then the two eventualities are connected by the "not" property.

Typed variant:

(: Seal Eventuality)
(: Unseal Eventuality)
(: Pay Eventuality)
(: not1 Eventuality)

(: has-agent ThematicRole)

(Seal (has-agent User))
(Seal (has-agent))
(Unseal (has-agent User))
(Pay (has-agent))

Tupled variant:

(Eventuality Seal)
(Eventuality Unseal)
(Eventuality Pay)
(Eventuality not1)

(ThematicRole has-agent)

(Seal (has-agent User))
(Seal (has-agent))
(Unseal (has-agent User))
(Pay (has-agent))

Expected result:

(not1 (Seal (has-agent User)) (Seal (has-agent)))
(not1 (Unseal (has-agent User)) (Seal (has-agent)))
(not1 (Unseal (has-agent User)) (Pay (has-agent)))
(not1 (Seal (has-agent User)) (Pay (has-agent)))

Reference sparql code:

CONSTRUCT{?e1 :not ?e2}
  WHERE{?e1 rdf:type ?c. ?e2 rdf:type ?c. ?c rdf:type :Eventuality. FILTER(?e1!=?e2)
	?trn rdf:type :ThematicRole. ?e1 ?trn ?vn. ?r rdf:type :false,:hold; rdf:subject ?e2; rdf:predicate ?trn; rdf:object ?vn.
	NOT EXISTS{?tr rdf:type :ThematicRole. FILTER(?tr!=?trn) ?e1 ?tr ?tv1. NOT EXISTS{?e2 ?tr ?tv2}}
	NOT EXISTS{?tr rdf:type :ThematicRole. FILTER(?tr!=?trn) ?e2 ?tr ?tv2. NOT EXISTS{?e1 ?tr ?tv1}}
	NOT EXISTS{?tr rdf:type :ThematicRole. FILTER(?tr!=?trn) ?e1 ?tr ?tv1. ?e2 ?tr ?tv2. FILTER(?tv1!=?tv2)}}
@CICS-Oleg CICS-Oleg added help wanted Extra attention is needed question Further information is requested tutorial Tutorial question labels Nov 14, 2024
@Necr0x0Der
Copy link
Contributor

I'm not sure I got the description.

if two eventualities are direct instantiations of the same abstract eventuality

What is the abstract eventuality here? What are direct instantiations? What does (has-agent) mean? Why does has-agent have another arity in case of (has-agent User)? Why the type is defined as (: Seal Eventuality) while (Seal (has-agent)) looks like Seal should have an arrow type?
Do you have an example of query doing what you need? Or what is the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested tutorial Tutorial question
Projects
None yet
Development

No branches or pull requests

3 participants