pyling-n3 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyling/__init__.py +86 -0
- pyling/builtins.py +1325 -0
- pyling/cli.py +94 -0
- pyling/engine.py +1365 -0
- pyling/parser.py +551 -0
- pyling/printing.py +112 -0
- pyling/rdf.py +924 -0
- pyling/store.py +91 -0
- pyling/terms.py +449 -0
- pyling_n3-0.1.0.dist-info/METADATA +562 -0
- pyling_n3-0.1.0.dist-info/RECORD +15 -0
- pyling_n3-0.1.0.dist-info/WHEEL +5 -0
- pyling_n3-0.1.0.dist-info/entry_points.txt +2 -0
- pyling_n3-0.1.0.dist-info/licenses/LICENSE +21 -0
- pyling_n3-0.1.0.dist-info/top_level.txt +1 -0
pyling/__init__.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Python API for pyling."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from .engine import INFERENCE_FUSE_EXIT_CODE, InferenceFuseError, ReasonStreamResult, reason, reason_graph, reason_stream, run_async, reason_message_stream
|
|
5
|
+
from .builtins import register_builtin, unregister_builtin, register_builtin_module, list_builtin_iris
|
|
6
|
+
from .store import MemoryFactStore, PersistentFactStore, create_fact_store
|
|
7
|
+
from .terms import (
|
|
8
|
+
Blank,
|
|
9
|
+
GraphTerm,
|
|
10
|
+
Iri,
|
|
11
|
+
ListTerm,
|
|
12
|
+
Literal,
|
|
13
|
+
OpenListTerm,
|
|
14
|
+
PrefixEnv,
|
|
15
|
+
Rule,
|
|
16
|
+
Term,
|
|
17
|
+
Triple,
|
|
18
|
+
Var,
|
|
19
|
+
RDF_NS,
|
|
20
|
+
RDFS_NS,
|
|
21
|
+
OWL_NS,
|
|
22
|
+
XSD_NS,
|
|
23
|
+
MATH_NS,
|
|
24
|
+
LIST_NS,
|
|
25
|
+
LOG_NS,
|
|
26
|
+
STRING_NS,
|
|
27
|
+
CRYPTO_NS,
|
|
28
|
+
DT_NS,
|
|
29
|
+
term_from_primitive,
|
|
30
|
+
triple_from_primitive,
|
|
31
|
+
rule_from_primitive,
|
|
32
|
+
term_to_primitive,
|
|
33
|
+
triple_to_primitive,
|
|
34
|
+
rule_to_primitive,
|
|
35
|
+
)
|
|
36
|
+
from .parser import N3SyntaxError, parse_n3, parse_sources
|
|
37
|
+
from .rdf import RdfSyntaxError, parse_rdf_graph, parse_rdf_text, parse_rdf_message_log, iter_rdf_message_documents, assert_rdf12_surface_syntax, triples_to_rdflib_graph
|
|
38
|
+
from .printing import term_to_n3, triple_to_n3, triples_to_n3
|
|
39
|
+
|
|
40
|
+
__all__ = [
|
|
41
|
+
"reason",
|
|
42
|
+
"reason_graph",
|
|
43
|
+
"reason_stream",
|
|
44
|
+
"run_async",
|
|
45
|
+
"reason_message_stream",
|
|
46
|
+
"ReasonStreamResult",
|
|
47
|
+
"InferenceFuseError",
|
|
48
|
+
"INFERENCE_FUSE_EXIT_CODE",
|
|
49
|
+
"register_builtin",
|
|
50
|
+
"unregister_builtin",
|
|
51
|
+
"register_builtin_module",
|
|
52
|
+
"list_builtin_iris",
|
|
53
|
+
"create_fact_store",
|
|
54
|
+
"MemoryFactStore",
|
|
55
|
+
"PersistentFactStore",
|
|
56
|
+
"Iri",
|
|
57
|
+
"Literal",
|
|
58
|
+
"Var",
|
|
59
|
+
"Blank",
|
|
60
|
+
"ListTerm",
|
|
61
|
+
"OpenListTerm",
|
|
62
|
+
"GraphTerm",
|
|
63
|
+
"Triple",
|
|
64
|
+
"Rule",
|
|
65
|
+
"PrefixEnv",
|
|
66
|
+
"Term",
|
|
67
|
+
"parse_n3",
|
|
68
|
+
"parse_sources",
|
|
69
|
+
"N3SyntaxError",
|
|
70
|
+
"RdfSyntaxError",
|
|
71
|
+
"parse_rdf_graph",
|
|
72
|
+
"parse_rdf_text",
|
|
73
|
+
"parse_rdf_message_log",
|
|
74
|
+
"iter_rdf_message_documents",
|
|
75
|
+
"assert_rdf12_surface_syntax",
|
|
76
|
+
"triples_to_rdflib_graph",
|
|
77
|
+
"term_to_n3",
|
|
78
|
+
"triple_to_n3",
|
|
79
|
+
"triples_to_n3",
|
|
80
|
+
"term_from_primitive",
|
|
81
|
+
"triple_from_primitive",
|
|
82
|
+
"rule_from_primitive",
|
|
83
|
+
"term_to_primitive",
|
|
84
|
+
"triple_to_primitive",
|
|
85
|
+
"rule_to_primitive",
|
|
86
|
+
]
|