Skip to content

Main content

Transliteration Diacritic Preservation Count Tool

Compare combining-mark counts after canonical decomposition; not a completeness or quality judgment on transliteration.

Loading tool…

Description

Normalize each string to NFD and count Unicode marks.

A visible character can contain multiple Unicode code points, and equivalent letters may have composed or decomposed representations. Mark counts differ from grapheme counts or linguistic correctness.

Normalize each string to NFD and count Unicode marks.

When to use this tool

Use Transliteration Diacritic Preservation Count when you need a narrowly defined Unicode mark or delimiter check.

How to use the tool and how it works

  1. Enter source, rendered. 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 sourceMarks, renderedMarks, netRemoved. Use the output convention below.

Normalize each string to NFD and count Unicode marks. Return sourceMarks, renderedMarks, and their signed difference.1

NFD uses canonical decomposition. Counting marks after decomposition makes a precomposed accented letter comparable in this count with its decomposed representation, without proving that the same marks occur in both strings.2

Input fieldMeaning and unitsAccepted input
sourceSource identifier or source selector, interpreted under the calculation above.Required. Text; maximum UTF-16 length 8192.
renderedRenderedRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
sourceMarksSource MarksRequired. Safe integer.
renderedMarksRendered MarksRequired. Safe integer.
netRemovedNet RemovedRequired. Safe integer.
json
{
  "input": {
    "source": "éā",
    "rendered": "ea"
  },
  "output": {
    "sourceMarks": 2,
    "renderedMarks": 0,
    "netRemoved": 2
  }
}

Limitations and assumptions

  • Equal counts do not prove the same diacritics were preserved; code-point comparison, transliteration quality, and grapheme equivalence are not assessed.
  • 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 Unicode normalization and grapheme-aware comparison where visual equivalence or text editing behavior matters.

References

  1. Calculation and input contract: middle-eastern-studies/transliteration-diacritic-preservation-count — tool.io

  2. Unicode Standard Annex #15: Unicode Normalization Forms — Unicode Consortium

Similar or alternative tools