Skip to content

Commit

Permalink
working with graph:namedGraph triples
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Sep 9, 2024
1 parent 82d4d78 commit c1d0f66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.0
1.6.0
22 changes: 6 additions & 16 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.5.0').
version_info('lingua v1.6.0').

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

Expand Down Expand Up @@ -76,8 +76,7 @@
:- 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#content>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/graph#isContentOf>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/graph#namedGraph>'/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 @@ -734,18 +733,12 @@
djiti_fact(':-'(A, B), ':-'(C, D)) :-
!,
makevars((A, B), (C, D), eta).
djiti_fact('<http://www.w3.org/2000/10/swap/graph#content>'(A, B), graph(A, B)) :-
djiti_fact('<http://www.w3.org/2000/10/swap/graph#namedGraph>'(A, B), graph(A, B)) :-
!,
( \+graphid(A)
-> assertz(graphid(A))
; true
).
djiti_fact('<http://www.w3.org/2000/10/swap/graph#isContentOf>'(A, B), graph(B, A)) :-
!,
( \+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) :-
!,
read_term_from_atom(A, C, []),
Expand Down Expand Up @@ -1369,9 +1362,6 @@
)
).

'<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 @@ -1389,9 +1379,6 @@
)
).

'<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(
( nonvar(A)
Expand All @@ -1417,6 +1404,9 @@
)
).

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

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

0 comments on commit c1d0f66

Please sign in to comment.