Skip to content

Commit

Permalink
using graph:content and graph:isContentOf instead of graph:is
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Sep 7, 2024
1 parent 759f7d9 commit 82d4d78
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.5
1.5.0
24 changes: 14 additions & 10 deletions lingua.pl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:- use_module(library(semweb/turtle)).
:- catch(use_module(library(http/http_open)), _, true).

version_info('lingua v1.4.5').
version_info('lingua v1.5.0').

help_info('Usage: lingua <options>* <data>*

Expand Down Expand Up @@ -76,7 +76,8 @@
:- dynamic('<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>'/2).
:- dynamic('<http://www.w3.org/1999/02/22-rdf-syntax-ns#value>'/2).
:- dynamic('<http://www.w3.org/2000/01/rdf-schema#subClassOf>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/graph#is>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/graph#content>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/graph#isContentOf>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/log#callWithCleanup>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/log#collectAllIn>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/log#explains>'/2).
Expand Down Expand Up @@ -733,16 +734,16 @@
djiti_fact(':-'(A, B), ':-'(C, D)) :-
!,
makevars((A, B), (C, D), eta).
djiti_fact('<http://www.w3.org/2000/10/swap/graph#is>'(G, T), graph(G, T)) :-
djiti_fact('<http://www.w3.org/2000/10/swap/graph#content>'(A, B), graph(A, B)) :-
!,
( \+graphid(G)
-> assertz(graphid(G))
( \+graphid(A)
-> assertz(graphid(A))
; true
).
djiti_fact('<http://www.w3.org/2000/10/swap/graph#is>'(G, T), graph(G, T)) :-
djiti_fact('<http://www.w3.org/2000/10/swap/graph#isContentOf>'(A, B), graph(B, A)) :-
!,
( \+graphid(G)
-> assertz(graphid(G))
( \+graphid(B)
-> assertz(graphid(B))
; true
).
djiti_fact('<http://www.w3.org/2000/10/swap/log#dcg>'(_, literal(A, type('<http://www.w3.org/2001/XMLSchema#string>'))), B) :-
Expand Down Expand Up @@ -1368,6 +1369,9 @@
)
).

'<http://www.w3.org/2000/10/swap/graph#content>'(A, B) :-
graph(A, B).

'<http://www.w3.org/2000/10/swap/graph#difference>'(A, B) :-
when(
( nonvar(A)
Expand All @@ -1385,8 +1389,8 @@
)
).

'<http://www.w3.org/2000/10/swap/graph#is>'(A, B) :-
graph(A, B).
'<http://www.w3.org/2000/10/swap/graph#isContentOf>'(A, B) :-
graph(B, A).

'<http://www.w3.org/2000/10/swap/graph#length>'(A, B) :-
when(
Expand Down

0 comments on commit 82d4d78

Please sign in to comment.