Skip to content

Main content

Authority Heading Language Count Tool

Calculate authority heading language count from explicit caller-supplied inputs.

Loading tool…

Description

Select exact heading matches, count those records, and count distinct language strings among them.

Catalog metadata can record language, date precision, and source identity independently of the underlying item's completeness or authenticity. Consistency flags should be interpreted alongside the original record.

Select exact heading matches, count those records, and count distinct language strings among them.

When to use this tool

Use Authority Heading Language Count when you need a narrow catalog metadata consistency check.

How to use the tool and how it works

  1. Enter headingIds, languages, selectedHeading. 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 distinctLanguages, records. Use the output convention below.

Require aligned headingIds and languages. Select exact heading matches, count those records, and count distinct language strings among them.1

Input fieldMeaning and unitsAccepted input
headingIdsHeading IdsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
languagesLanguagesRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
selectedHeadingSelected HeadingRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
distinctLanguagesDistinct LanguagesRequired. Safe integer.
recordsRecordsRequired. Safe integer.
json
{
  "input": {
    "headingIds": [
      "h1",
      "h1",
      "h2"
    ],
    "languages": [
      "en",
      "fr",
      "en"
    ],
    "selectedHeading": "h1"
  },
  "output": {
    "distinctLanguages": 2,
    "records": 2
  }
}

Limitations and assumptions

  • Language tags are not standardized or normalized; repeated records still increase records but not distinctLanguages.
  • 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

Apply the relevant cataloging standard and inspect the original record for a complete assessment.

References

  1. Calculation and input contract: library-science/authority-heading-language-count — tool.io

Similar or alternative tools

  • Catalogue Field Repeat Count

    Count exact requestedTag matches in tags and return max(0, occurrences - 1) as repeatsBeyondFirst.

  • Agreement Language Count

    Count distinct languageTokens literally when caseSensitive is true, otherwise after JavaScript lowercase conversion.