-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73e8097
commit 056c121
Showing
6 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
The files were generated by: | ||
|
||
``` | ||
./hdt-cpp/libhdt/tools/hdtInfo hdt-cpp/libhdt/data/literals.hdt >literals.hdtInfo-output | ||
echo '? ? ?' | ./libhdt/tools/hdtSearch lib-cpp/libhdt/data/literals.hdt 2>/dev/null >literals.hdtSearch-output | ||
``` | ||
|
||
To do this, you need to run "make" separately (the "make" that runs from `pack_install(.)` does something different because it has other options to `./configure`): | ||
```sh | ||
cd hdt-cpp && ./autogen.sh && ./configure && make -j8 | ||
``` | ||
|
||
TODO: use hdt2rdf, rdf2hdt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<file://literals.ttl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/HDT/hdt#Dataset> . | ||
<file://literals.ttl> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://rdfs.org/ns/void#Dataset> . | ||
<file://literals.ttl> <http://rdfs.org/ns/void#triples> "9" . | ||
<file://literals.ttl> <http://rdfs.org/ns/void#properties> "1" . | ||
<file://literals.ttl> <http://rdfs.org/ns/void#distinctSubjects> "1" . | ||
<file://literals.ttl> <http://rdfs.org/ns/void#distinctObjects> "9" . | ||
<file://literals.ttl> <http://purl.org/HDT/hdt#statisticalInformation> _:statistics . | ||
<file://literals.ttl> <http://purl.org/HDT/hdt#publicationInformation> _:publicationInformation . | ||
<file://literals.ttl> <http://purl.org/HDT/hdt#formatInformation> _:format . | ||
_:format <http://purl.org/HDT/hdt#dictionary> _:dictionary . | ||
_:format <http://purl.org/HDT/hdt#triples> _:triples . | ||
_:dictionary <http://purl.org/dc/terms/format> <http://purl.org/HDT/hdt#dictionaryLiteral> . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarynumSubjects> "1" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarynumPredicates> "1" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarynumObjects> "9" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarynumSharedSubjectObject> "0" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarymaxSubjectID> "1" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarymaxPredicateID> "1" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarymaxObjectID> "9" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarymapping> "1" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionarysizeStrings> "2710" . | ||
_:dictionary <http://purl.org/HDT/hdt#dictionaryblockSize> "8" . | ||
_:triples <http://purl.org/dc/terms/format> <http://purl.org/HDT/hdt#triplesBitmap> . | ||
_:triples <http://purl.org/HDT/hdt#triplesnumTriples> "9" . | ||
_:triples <http://purl.org/HDT/hdt#triplesOrder> "SPO" . | ||
_:statistics <http://purl.org/HDT/hdt#originalSize> "156" . | ||
_:statistics <http://purl.org/HDT/hdt#hdtSize> "2940" . | ||
_:publicationInformation <http://purl.org/dc/terms/issued> "2015-02-13T17:21:30+0100" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
s p "a" | ||
s p "a"@en | ||
s p "a"^^<bcd> | ||
s p "abc" | ||
s p "abc"@en | ||
s p "abc"^^<bcd> | ||
s p "bc" | ||
s p "bc"@en | ||
s p "bc"^^<bcd> | ||
9 results in 162 us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
% -*- mode: Prolog; coding: utf-8 -*- | ||
|
||
/* These tests use the data in ../hdt-cpp/libhdt/data/literals.hdt | ||
See the comments in data/README.md if a test fails - the failure | ||
might be because the data has changed. | ||
*/ | ||
|
||
:- module(test_hdt, | ||
[ test_hdt/0 | ||
]). | ||
|
||
:- use_module(library(plunit)). | ||
:- use_module(library(hdt)). | ||
|
||
test_hdt :- | ||
run_tests([hdt]). | ||
|
||
:- begin_tests(hdt). | ||
|
||
test(hdt_search_id) :- | ||
hdt_open_literals(H), | ||
bagof(S:P:O, hdt_search_id(H, S, P, O), SPOs), | ||
assertion(SPOs == [1:1:1, | ||
1:1:2, | ||
1:1:3, | ||
1:1:4, | ||
1:1:5, | ||
1:1:6, | ||
1:1:7, | ||
1:1:8, | ||
1:1:9]), | ||
hdt_close(H). | ||
|
||
hdt_open_literals(H) :- | ||
predicate_property(test_hdt, file(TestHdtFile)), | ||
directory_file_path(TestHdtDir, _, TestHdtFile), | ||
atom_concat(TestHdtDir, '/../hdt-cpp/libhdt/data/literals.hdt', LiteralsHdtPath), | ||
hdt_open(H, LiteralsHdtPath). | ||
|
||
:- end_tests(hdt). | ||
|