Skip to contents

Convert contextual semantic mapping carriers into canonical key-value representations suitable for:

Usage

as_value_key(x)

Arguments

x

A semantic mapping carrier:

  • named character vector;

  • named list;

  • two-column data frame or tibble.

Value

A named character vector representing canonical contextual semantic mappings.

Details

  • contextual reconstruction;

  • Record Set projection;

  • workflow annotation;

  • semantic stabilisation;

  • lightweight semantic harmonisation.

as_value_key() standardizes:

  • named vectors;

  • named lists;

  • two-column tibbles or data frames.

Named lists may represent one-to-many contextual mappings, allowing multiple contextual roots to share a semantic grouping.

The resulting object is a named character vector compatible with:

  • prelabel();

  • contextual semantic overlays;

  • refinement workflows;

  • lightweight contextual harmonisation.

Examples


record_sets <- list(
  conceptualisation = c(
    "D:/_package/alpha",
    "D:/_markdown/alpha-methodology"
  ),
  betaR = c(
    "D:/_packages/beta",
    "D:/_packages/prebeta"
  )
)

as_value_key(record_sets)
#>                conceptualisation                conceptualisation 
#>              "D:/_package/alpha" "D:/_markdown/alpha-methodology" 
#>                            betaR                            betaR 
#>              "D:/_packages/beta"           "D:/_packages/prebeta" 

invert_value_key(record_sets)
#> # A tibble: 4 × 2
#>   key               value                         
#>   <chr>             <chr>                         
#> 1 conceptualisation D:/_package/alpha             
#> 2 conceptualisation D:/_markdown/alpha-methodology
#> 3 betaR             D:/_packages/beta             
#> 4 betaR             D:/_packages/prebeta