Skip to content

Main content

Vocabulary Polyhierarchy Parent Count Tool

Count distinct explicitly listed direct parents without inferring transitive ancestry.

Loading tool…

Description

Select rows with childIds equal to concept, deduplicate their parent IDs, and return the ordered list and count.

A controlled vocabulary separates concept identifiers, labels, languages, and hierarchy edges. Distinct literal labels and repeated identical records need different consistency checks.

Select rows with childIds equal to concept, deduplicate their parent IDs, and return the ordered list and count.

When to use this tool

Use Vocabulary Polyhierarchy Parent Count when you need a scoped vocabulary-label or ancestry diagnostic.

How to use the tool and how it works

  1. Enter concept, childIds, parentIds. Keep parallel arrays aligned. 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 parentCount, parentIdsForConcept. Use the output convention below.

Require aligned childIds and parentIds. Select rows with childIds equal to concept, deduplicate their parent IDs, and return the ordered list and count.1

Input fieldMeaning and unitsAccepted input
conceptConceptRequired. Text; maximum UTF-16 length 8192.
childIdsChild IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
parentIdsParent IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
parentCountParent CountRequired. Safe integer.
parentIdsForConceptParent Ids For ConceptRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
json
{
  "input": {
    "concept": "a",
    "childIds": [
      "a",
      "a",
      "a"
    ],
    "parentIds": [
      "p1",
      "p2",
      "p1"
    ]
  },
  "output": {
    "parentCount": 2,
    "parentIdsForConcept": [
      "p1",
      "p2"
    ]
  }
}

Limitations and assumptions

  • This reports direct parents only; duplicate edges collapse and cycles or semantic relation types are not checked.
  • 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

Validate the complete vocabulary model and source identifiers, including language and hierarchy policies.

References

  1. Calculation and input contract: information-science/vocabulary-polyhierarchy-parent-count — tool.io

Similar or alternative tools