Skip to content

Commit

Permalink
fixing issue with writing qnames
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Aug 14, 2024
1 parent 8c81b58 commit dd92bc2
Show file tree
Hide file tree
Showing 9 changed files with 471,963 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
EYE release

v10.19.3 (2024-08-14) fixing issue with writing qnames
v10.19.2 (2024-08-13) functional terms again as lists (functor args)
v10.19.1 (2024-08-13) output only used namespace prefixes
v10.19.0 (2024-08-12) changing functional terms to [| functor args |]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.19.2
10.19.3
6 changes: 4 additions & 2 deletions eye.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:- catch(use_module(library(process)), _, true).
:- catch(use_module(library(http/http_open)), _, true).

version_info('EYE v10.19.2 (2024-08-13)').
version_info('EYE v10.19.3 (2024-08-14)').

license_info('MIT License

Expand Down Expand Up @@ -4012,7 +4012,9 @@
; assertz(apfx(E, D))
),
K is J-1,
sub_atom(X, _, K, 1, F)
sub_atom(X, _, K, 1, F),
\+sub_atom(F, _, 1, _, '/'),
\+sub_atom(F, _, 1, 0, '.')
-> atom_concat(E, F, W),
assertz(wtcache(X, W))
; ( \+flag(strings),
Expand Down
Binary file modified eye.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions reasoning/path-discovery/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--------------
Path discovery
--------------

See https://aws.amazon.com/blogs/database/build-and-deploy-knowledge-graphs-faster-with-rdf-and-opencypher/
120 changes: 120 additions & 0 deletions reasoning/path-discovery/airroutes-answer.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
@prefix ns1: <urn:example:>.

("MHT" "HEL") ns1:route ("MHT" "EWR" "BCN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "MAD" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "CDG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "ORY" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "MXP" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "FCO" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "TLV" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "KEF" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "LIS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "GVA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "ZRH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "NRT" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "BRU" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "HKG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "DEL" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "PEK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "FRA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "PVG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "HAM" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "DUS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "MUC" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "TXL" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "MAN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "AMS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "DUB" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "CPH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "OSL" "HEL").
("MHT" "HEL") ns1:route ("MHT" "EWR" "ARN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DCA" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "CDG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "NRT" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "PEK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "FRA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "PVG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "ICN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "NGO" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "DTW" "AMS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "TPA" "ZRH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "TPA" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "TPA" "LGW" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "MAD" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "CDG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "FCO" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "ZRH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "NRT" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "BRU" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "FRA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "DUS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "MUC" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "ICN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "MAN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "AMS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ATL" "DUB" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "BCN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "MAD" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "CDG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "FCO" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "TLV" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "LIS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "ZRH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "BRU" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "FRA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "MUC" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "ATH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "MAN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "AMS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "PHL" "DUB" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "MAD" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "CDG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "FCO" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "VIE" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "ZRH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "ISL" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "NRT" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "BRU" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "HKG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "DEL" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "PEK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "FRA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "PVG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "DUS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "MUC" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "TXL" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "ICN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "MAN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "AMS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "DUB" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "CPH" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "WAW" "HEL").
("MHT" "HEL") ns1:route ("MHT" "ORD" "ARN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "BWI" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "BWI" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MSP" "CDG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MSP" "NRT" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MSP" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MSP" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MSP" "AMS" "HEL").
("MHT" "HEL") ns1:route ("MHT" "CLT" "CDG" "HEL").
("MHT" "HEL") ns1:route ("MHT" "CLT" "FCO" "HEL").
("MHT" "HEL") ns1:route ("MHT" "CLT" "FRA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "CLT" "MUC" "HEL").
("MHT" "HEL") ns1:route ("MHT" "CLT" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "CLT" "LHR" "HEL").
("MHT" "HEL") ns1:route ("MHT" "CLT" "DUB" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MCO" "FRA" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MCO" "JFK" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MCO" "MAN" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MCO" "LGW" "HEL").
("MHT" "HEL") ns1:route ("MHT" "MCO" "DUB" "HEL").
32 changes: 32 additions & 0 deletions reasoning/path-discovery/airroutes-question.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@prefix nepo: <http://neptune.aws.com/ontology/airroutes/>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <urn:example:>.

# connectivity
{(?from ?to ?visited ?max) :route (?from ?to)} <= {
?visited list:length ?length.
?length math:notGreaterThan ?max.
?from nepo:hasOutboundRouteTo ?to.
?visited list:notMember ?to.
}.

{(?from ?to ?visited ?max) :route ?route} <= {
?visited list:length ?length.
?length math:notGreaterThan ?max.
?from nepo:hasOutboundRouteTo ?via.
?visited list:notMember ?via.
?newVisited list:firstRest (?from ?visited).
(?via ?to ?newVisited ?max) :route ?newRoute.
((?from) ?newRoute) list:append ?route.
}.

# find all the airports you would have to fly through to get from MHT to HEL
{
?source nepo:IATA "MHT".
?destination nepo:IATA "HEL".
(?source ?destination () 2) :route ?airports.
(?iata {?airports list:member ?airport. ?airport nepo:IATA ?iata} ?route) log:collectAllIn ?scope.
} =^ {
("MHT" "HEL") :route ?route}.
Loading

0 comments on commit dd92bc2

Please sign in to comment.