Skip to content

Main content

RDF Language Tag Literal Pair Tool

Language-tagged RDF literal identity preserves lexical text and ASCII-case-normalizes a syntactically shaped language tag; no IANA registry validation.

Loading tool…

Description

Require a simple ASCII language-tag shape, lowercase it, and serialize lexical with normalizedLanguage for identityKey.

RDF literals distinguish lexical spelling, datatype identifiers, language tags, and local blank-node scope. A token-shape check covers only part of RDF term validity.

Require a simple ASCII language-tag shape, lowercase it, and serialize lexical with normalizedLanguage for identityKey.

When to use this tool

Use RDF Language Tag Literal Pair when you need one explicit RDF term or scope consistency check.

How to use the tool and how it works

  1. Enter lexical, language. 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 normalizedLanguage, identityKey. Use the output convention below.

Require a simple ASCII language-tag shape, lowercase it, and serialize lexical with normalizedLanguage for identityKey.1

Input fieldMeaning and unitsAccepted input
lexicalLexicalRequired. Text; maximum UTF-16 length 8192.
languageLanguageRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
normalizedLanguageNormalized LanguageRequired. Text; maximum UTF-16 length 8192.
identityKeyIdentity KeyRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "lexical": "colour",
    "language": "EN-gb"
  },
  "output": {
    "normalizedLanguage": "en-gb",
    "identityKey": "[\"colour\",\"en-gb\"]"
  }
}

Limitations and assumptions

  • This normalizes tag case only; full BCP 47 validity, Unicode normalization, and semantic literal equivalence 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

Use a conforming RDF parser and the relevant datatype and language-tag rules for complete graph validation.

References

  1. Calculation and input contract: information-science/rdf-language-tag-literal-pair — tool.io

Similar or alternative tools