Entity relations (triples with item and collection context)
entropia_entity_relations.RdA lazy dplyr::tbl() over triples joined to the item and collection it
came from, so every subject/predicate/object extraction carries its
provenance:
Arguments
- con
A connection returned by
entropia_connect().- min_confidence
Unused in the current schema (triples carry no confidence column); must be
NULL(the default).
Details
id,subject,predicate,object: the triple itself.item_id,item_title: the owning item and its title.collection_id,collection_name: the item's collection.asset_id: the specific asset the triple is scoped to,NAfor item-level triples.
Everything stays lazy: the joins run in SQLite when the result is collected.
min_confidence is accepted for API stability with the plan's research
layer, but the current schema's triples table has no confidence column, so
passing a non-NULL value errors with guidance rather than silently doing
nothing.
Examples
con <- entropia_connect(system.file("extdata", "entropia-example.sqlite",
package = "entropiaR"
))
entropia_collect(entropia_entity_relations(con))
#> # A tibble: 1 × 9
#> id subject predicate object item_id asset_id item_title collection_id
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 88888888-8… Juan P… particip… la hu… 222222… NA Manifiest… 11111111-111…
#> # ℹ 1 more variable: collection_name <chr>
entropia_disconnect(con)