Skip to content

Main content

Taxonomy Parent Path Segment

Split an explicit nonempty taxonomy path into parent path and terminal segment without resolving a taxonomy.

Loading tool…

Description

Split a supplied taxonomy path into parent segments and terminal segment.

Information records distinguish identifiers, controlled vocabularies, language fallbacks, assertion times and valid times. A supplied inverse predicate differs from an inferred semantic relation. Text offsets require an explicit code-point or code-unit basis, and a metadata count check does not validate field content or an entire schema.

Split a supplied taxonomy path into parent segments and terminal segment.

When to use this tool

Use Taxonomy Parent Path Segment when you already have segments and need to split a supplied taxonomy path into parent segments and terminal segment.

How to use the tool and how it works

  1. Enter segments. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read hasParent, parentSegments, terminalSegment. Inspect hasParent before interpreting the associated values.

Require a nonempty list of nonempty segments; parent=all except last, terminal=last and hasParent means length>1.1

Input fieldMeaning and unitsAccepted input
segmentsSegmentsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
hasParentFalse for a one-segment path, with parentSegments=[]; does not validate a taxonomy.Required. Boolean.
parentSegmentsParent SegmentsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
terminalSegmentTerminal SegmentRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "segments": [
      "Life",
      "Plants",
      "Trees"
    ]
  },
  "output": {
    "hasParent": true,
    "parentSegments": [
      "Life",
      "Plants"
    ],
    "terminalSegment": "Trees"
  }
}

Limitations and assumptions

  • A single segment has empty parent and hasParent=false; no taxonomy, path separator, hierarchy validity or identifier is resolved.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use the actual record, vocabulary authority and complete metadata schema for semantic or conformance questions. Apply the identifier scheme's real comparison rules and the intended language/offset policy rather than inferring them from a local string operation.

References

  1. Calculation and input contract: information-science/taxonomy-parent-path-segment — tool.io

Similar or alternative tools