trustgraph-cli 2.10.0__tar.gz → 2.10.2__tar.gz
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.
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/PKG-INFO +1 -1
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/load_knowledge.py +21 -15
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/load_turtle.py +12 -15
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/nquads.py +15 -13
- trustgraph_cli-2.10.2/trustgraph/cli_version.py +1 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph_cli.egg-info/PKG-INFO +1 -1
- trustgraph_cli-2.10.0/trustgraph/cli_version.py +0 -1
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/README.md +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/pyproject.toml +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/setup.cfg +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/__init__.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/_iam.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/add_library_document.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/bootstrap_iam.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/change_password.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/create_api_key.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/create_user.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/create_workspace.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/delete_collection.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/delete_config_item.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/delete_flow_blueprint.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/delete_kg_core.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/delete_mcp_tool.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/delete_tool.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/delete_user.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/describe_image.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/disable_user.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/dump_msgpack.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/dump_queues.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/enable_user.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/export_workspace.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/export_workspace_config.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/get_config_item.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/get_de_core.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/get_document_content.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/get_flow_blueprint.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/get_kg_core.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/graph_to_turtle.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/import_workspace.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/import_workspace_config.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/init_pulsar_manager.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_agent.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_document_embeddings.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_document_rag.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_embeddings.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_graph_embeddings.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_graph_rag.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_llm.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_mcp_tool.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_nlp_query.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_prompt.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_reranker.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_row_embeddings.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_rows_query.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_sparql_query.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_structured_query.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/list_api_keys.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/list_collections.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/list_config_items.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/list_explain_traces.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/list_my_workspaces.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/list_users.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/list_workspaces.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/load_doc_embeds.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/load_kg_core.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/load_sample_documents.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/load_structured_data.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/login.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/monitor_prompts.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/put_config_item.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/put_de_core.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/put_flow_blueprint.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/put_kg_core.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/query_graph.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/remove_library_document.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/reset_password.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/revoke_api_key.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/__init__.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/belgian-beer.md +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/bronze-age-collapse.pdf +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/corporate-scandals.pdf +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/history-of-pets.md +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/metadata.json +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/mil-fortifications-america-19th-c.md +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/recipes.md +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/trade-routes-europe.md +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/save_doc_embeds.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/set_collection.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/set_mcp_tool.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/set_prompt.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/set_token_costs.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/set_tool.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_config.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_explain_trace.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_extraction_provenance.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_flow_blueprints.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_flow_state.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_flows.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_graph.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_kg_cores.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_library_documents.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_library_processing.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_mcp_tools.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_parameter_types.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_processor_state.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_prompts.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_token_costs.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_token_rate.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_tools.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/start_flow.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/start_library_processing.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/stop_flow.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/stop_library_processing.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/unload_kg_core.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/update_user.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/verify_system_status.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/whoami.py +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph_cli.egg-info/SOURCES.txt +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph_cli.egg-info/dependency_links.txt +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph_cli.egg-info/entry_points.txt +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph_cli.egg-info/requires.txt +0 -0
- {trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-cli
|
|
3
|
-
Version: 2.10.
|
|
3
|
+
Version: 2.10.2
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -9,6 +9,7 @@ import rdflib
|
|
|
9
9
|
from typing import Iterator, Tuple
|
|
10
10
|
|
|
11
11
|
from trustgraph.api import Api, Triple
|
|
12
|
+
from trustgraph.api.types import Uri, Literal
|
|
12
13
|
from trustgraph.log_level import LogLevel
|
|
13
14
|
|
|
14
15
|
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8888/')
|
|
@@ -26,6 +27,7 @@ class KnowledgeLoader:
|
|
|
26
27
|
document_id,
|
|
27
28
|
url=default_url,
|
|
28
29
|
token=None, workspace="default",
|
|
30
|
+
graph="",
|
|
29
31
|
):
|
|
30
32
|
self.files = files
|
|
31
33
|
self.flow = flow
|
|
@@ -34,6 +36,7 @@ class KnowledgeLoader:
|
|
|
34
36
|
self.url = url
|
|
35
37
|
self.token = token
|
|
36
38
|
self.workspace = workspace
|
|
39
|
+
self.graph = graph
|
|
37
40
|
|
|
38
41
|
def load_triples_from_file(self, file) -> Iterator[Triple]:
|
|
39
42
|
"""Generator that yields Triple objects from a Turtle file"""
|
|
@@ -42,23 +45,19 @@ class KnowledgeLoader:
|
|
|
42
45
|
g.parse(file, format="turtle")
|
|
43
46
|
|
|
44
47
|
for e in g:
|
|
45
|
-
s_value = str(e[0])
|
|
46
|
-
p_value = str(e[1])
|
|
47
|
-
o_value = str(e[2])
|
|
48
|
-
|
|
49
|
-
o_datatype = ""
|
|
50
|
-
o_language = ""
|
|
48
|
+
s_value = Uri(str(e[0]))
|
|
49
|
+
p_value = Uri(str(e[1]))
|
|
51
50
|
|
|
52
51
|
if isinstance(e[2], rdflib.term.Literal):
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
52
|
+
o_value = Literal(
|
|
53
|
+
str(e[2]),
|
|
54
|
+
datatype=str(e[2].datatype) if e[2].datatype else None,
|
|
55
|
+
language=str(e[2].language) if e[2].language else None,
|
|
56
|
+
)
|
|
57
|
+
else:
|
|
58
|
+
o_value = Uri(str(e[2]))
|
|
59
|
+
|
|
60
|
+
yield Triple(s=s_value, p=p_value, o=o_value, g=self.graph)
|
|
62
61
|
|
|
63
62
|
def load_entity_contexts_from_file(self, file) -> Iterator[Tuple[str, str]]:
|
|
64
63
|
"""Generator that yields (entity, context) tuples from a Turtle file"""
|
|
@@ -184,6 +183,12 @@ def main():
|
|
|
184
183
|
help=f'Collection ID (default: {default_collection})'
|
|
185
184
|
)
|
|
186
185
|
|
|
186
|
+
parser.add_argument(
|
|
187
|
+
'-g', '--graph',
|
|
188
|
+
default="",
|
|
189
|
+
help='Named graph URI (e.g. urn:graph:policy). Default: default graph'
|
|
190
|
+
)
|
|
191
|
+
|
|
187
192
|
parser.add_argument(
|
|
188
193
|
'files', nargs='+',
|
|
189
194
|
help=f'Turtle files to load'
|
|
@@ -202,6 +207,7 @@ def main():
|
|
|
202
207
|
files=args.files,
|
|
203
208
|
collection=args.collection,
|
|
204
209
|
workspace=args.workspace,
|
|
210
|
+
graph=args.graph,
|
|
205
211
|
)
|
|
206
212
|
|
|
207
213
|
loader.run()
|
|
@@ -9,6 +9,7 @@ import rdflib
|
|
|
9
9
|
from typing import Iterator
|
|
10
10
|
|
|
11
11
|
from trustgraph.api import Api, Triple
|
|
12
|
+
from trustgraph.api.types import Uri, Literal
|
|
12
13
|
from trustgraph.log_level import LogLevel
|
|
13
14
|
|
|
14
15
|
default_url = os.getenv("TRUSTGRAPH_URL", 'http://localhost:8888/')
|
|
@@ -42,23 +43,19 @@ class Loader:
|
|
|
42
43
|
g.parse(file, format="turtle")
|
|
43
44
|
|
|
44
45
|
for e in g:
|
|
45
|
-
s_value = str(e[0])
|
|
46
|
-
p_value = str(e[1])
|
|
47
|
-
o_value = str(e[2])
|
|
48
|
-
|
|
49
|
-
o_datatype = ""
|
|
50
|
-
o_language = ""
|
|
46
|
+
s_value = Uri(str(e[0]))
|
|
47
|
+
p_value = Uri(str(e[1]))
|
|
51
48
|
|
|
52
49
|
if isinstance(e[2], rdflib.term.Literal):
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
50
|
+
o_value = Literal(
|
|
51
|
+
str(e[2]),
|
|
52
|
+
datatype=str(e[2].datatype) if e[2].datatype else None,
|
|
53
|
+
language=str(e[2].language) if e[2].language else None,
|
|
54
|
+
)
|
|
55
|
+
else:
|
|
56
|
+
o_value = Uri(str(e[2]))
|
|
57
|
+
|
|
58
|
+
yield Triple(s=s_value, p=p_value, o=o_value)
|
|
62
59
|
|
|
63
60
|
def run(self):
|
|
64
61
|
"""Load triples using Python API"""
|
|
@@ -13,7 +13,7 @@ import re
|
|
|
13
13
|
import rdflib
|
|
14
14
|
|
|
15
15
|
from trustgraph.schema import IRI, LITERAL
|
|
16
|
-
from trustgraph.api.types import Triple
|
|
16
|
+
from trustgraph.api.types import Triple, Uri, Literal
|
|
17
17
|
|
|
18
18
|
# RDF-star quoted triples have no standard N-Quads encoding; they are
|
|
19
19
|
# skipped with a count so callers can surface the omission.
|
|
@@ -150,22 +150,24 @@ def serialize_nquads(batches, graph_iri, out):
|
|
|
150
150
|
return written, skipped
|
|
151
151
|
|
|
152
152
|
|
|
153
|
-
def
|
|
154
|
-
"""Convert an rdflib term to
|
|
153
|
+
def _rdflib_to_object(term):
|
|
154
|
+
"""Convert an rdflib term to a Uri or Literal."""
|
|
155
155
|
if isinstance(term, rdflib.Literal):
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
return Literal(
|
|
157
|
+
str(term),
|
|
158
|
+
datatype=str(term.datatype) if term.datatype else None,
|
|
159
|
+
language=str(term.language) if term.language else None,
|
|
160
|
+
)
|
|
161
|
+
return Uri(str(term))
|
|
160
162
|
|
|
161
163
|
|
|
162
164
|
def parse_nquads(data):
|
|
163
165
|
"""Parse N-Quads bytes back into api Triple values.
|
|
164
166
|
|
|
165
167
|
Preserves datatype, language tag and IRI-vs-literal distinctions
|
|
166
|
-
via
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
via Literal's datatype and language attributes. The whole member is
|
|
169
|
+
materialized in memory (bundles are bounded by --triples-limit at
|
|
170
|
+
export); line-streaming is a possible follow-up.
|
|
169
171
|
|
|
170
172
|
:param data: N-Quads bytes (one bundle member)
|
|
171
173
|
:returns: list of Triple
|
|
@@ -174,9 +176,9 @@ def parse_nquads(data):
|
|
|
174
176
|
ds.parse(data=data.decode("utf-8"), format="nquads")
|
|
175
177
|
result = []
|
|
176
178
|
for s, p, o, _g in ds.quads((None, None, None, None)):
|
|
177
|
-
o_val, o_dt, o_lang = _term_to_triple_field(o)
|
|
178
179
|
result.append(Triple(
|
|
179
|
-
s=str(s)
|
|
180
|
-
|
|
180
|
+
s=Uri(str(s)),
|
|
181
|
+
p=Uri(str(p)),
|
|
182
|
+
o=_rdflib_to_object(o),
|
|
181
183
|
))
|
|
182
184
|
return result
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.10.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-cli
|
|
3
|
-
Version: 2.10.
|
|
3
|
+
Version: 2.10.2
|
|
4
4
|
Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
|
|
5
5
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.10.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/invoke_document_embeddings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/belgian-beer.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/history-of-pets.md
RENAMED
|
File without changes
|
{trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/sample_documents/metadata.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph/cli/show_extraction_provenance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_cli-2.10.0 → trustgraph_cli-2.10.2}/trustgraph_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|