Tool · Live

Bayanat Labs Arabic NER Offset Validator

Arabic entity annotations break in ways that are hard to see: an emoji makes JavaScript and Python count offsets differently, a normalisation step turns alef with a combining hamza into one letter or the lam-alef ligature into two, tatweel or line breaks change after annotation, a span edge cuts a letter from its haraka, a conjunction sticks to a place name. The validator reads an annotation file in canonical JSON Lines, doccano, Label Studio, spaCy, CoNLL or Hugging Face token-row format and reports each problem with one of 27 finding codes and a message in English and Arabic; when it can tell what happened, it suggests new offsets as an audit diff for review. The offset unit (code points, UTF-16 code units, UTF-8 bytes or grapheme clusters) is declared, never guessed, and the report says which unit fits the text. The validator is a Python library and command-line tool, and a web app that runs the same checks in your browser, where the file is not uploaded or stored. It is tested on 100 dev and 100 acceptance test cases, published under CC BY 4.0: all 100 dev cases pass, and 96 of the 100 acceptance cases.

By Bayanat Labs· Updated · Apache-2.0· اقرأ بالعربية
LicenceApache-2.0 (code and web app); CC BY 4.0 (test cases, offset-convention matrix and documentation); Unicode-derived data under the Unicode License v3
Versionv0.1.0 · Code, test cases and web app v0.1.0, tagged on GitHub. Not on PyPI yet.
Published
Updated
Who it is forTeams that annotate, buy or deliver Arabic named-entity data, and engineers who move it between annotation tools and training code, who want to find offset, normalisation, boundary and tag errors before training or delivery.
LevelIntermediate

Arabic NER NER annotation validator character offsets BIO tagging Arabic NLP

Key numbers

27finding codes, each with a message in English and Arabic
20of them errors
2warnings
5notes
18defect categories in the test cases, plus valid records
100dev test cases, written before the validator code
100dev cases passed, with the exact codes and suggestions expected
100acceptance test cases, written separately from the category list only
96acceptance cases passed
86acceptance cases passed on the build frozen before the acceptance cases were read
51valid-case records checked against spaCy's offset and BILUO converters, with every comparison in agreement
18000random inputs compared between the Python package and the browser port
0differences between the two
13rows in the offset-convention matrix: how common tools count offsets
20Arabic probe texts the matrix was measured on

Counted by script from the released files. Each key number is read from docs/qa/numbers.json, released at tag v0.1.0 and recomputed by the repository's own script, and pinned to its SHA-256. The test-case dataset's MANIFEST.json gives the cases per split and category with checksums, and the web app's MANIFEST.json lists every file it serves with its SHA-256.

Downloads and identifiers

Get started

Install the library and command-line tool from GitHub at the v0.1.0 tag; the package is not on PyPI yet. The web app needs no install.

pip install "git+https://github.com/Bayanat-Labs/arabic-ner-validator@v0.1.0"

arabic-ner-validator check annotations.jsonl --json report.json
arabic-ner-validator check export.jsonl --format doccano --offset-unit utf16 --clitic-policy exclude -v
arabic-ner-validator check train.conll --format conll --scheme BIOES
arabic-ner-validator convert export.jsonl --format spacy --offset-unit codepoint --to BILUO
arabic-ner-validator codes

What is released

PartLicenceIn this release
Web app on Hugging Face Spaces: the same checks in your browser, interface in English and ArabicApache-2.0Yes
Python library and command-line tool (arabic-ner-validator) for Python 3.10 or later; offsets in code points, UTF-16 code units, UTF-8 bytes or grapheme clustersApache-2.0Yes
Test cases (dev and acceptance, also as a Hugging Face dataset), rejected-input examples, offset-convention matrix, JSON Schemas and documentationCC BY 4.0Yes
Normalisation-drift inventory and grapheme-break tests derived from the Unicode Character Database 16.0.0 and 17.0.0Unicode License v3, copyright Unicode, Inc.Yes
IBM Plex Sans Arabic font in the web app, unmodified (SIL Open Font License 1.1)SIL Open Font License, copyright IBM Corp.Yes

Attribution: Arabic NER Offset Validator (arabic-ner-validator) by Bayanat Labs. https://github.com/Bayanat-Labs/arabic-ner-validator

Intended uses

  • Check an Arabic NER annotation file before training, delivery or acceptance, with a code for each finding.
  • Find offsets counted in the wrong unit, or text that changed after annotation, when data moves between doccano, Label Studio, spaCy, CoNLL and Hugging Face token rows.
  • Convert between character offsets and BIOES or BILUO tags, and check tag sequences, in scripts and continuous integration.

Out of scope

  • Judging whether an entity label is correct: the validator checks offsets, text, boundaries and tag structure, not the meaning of a label.
  • Repairing data without review: suggested offsets are listed as an audit diff, and a repaired copy changes offsets only.

Rights at a glance

Training, display, redistribution and synthetic-voice use are separate permissions.

UseStatusNote
TrainingNot applicableA validator and test cases, not training data. The test cases are CC BY 4.0 if you reuse them.
DisplayAllowedTest cases, matrix and documentation under CC BY 4.0, with attribution.
RedistributionAllowedCode under Apache-2.0; test cases, matrix and documentation under CC BY 4.0; Unicode-derived data under the Unicode License v3; the bundled font under the SIL Open Font License.
Synthetic voiceNot applicableNo audio.

Limitations

  • The offset unit must be declared; the validator never guesses it.
  • Some changes leave no trace in a record: when the stored text and the span texts were both normalised after annotation, the validator reports the mismatch but cannot name the cause. The quality report explains each acceptance case that does not pass.
  • 96 of the 100 acceptance cases pass; on the build frozen before the acceptance cases were read, 86 passed. The changes made after reading them are listed in the changelog, and no test case was edited.
  • A span that ends with Arabic punctuation gets a warning, which a project's own guidelines may allow.
  • The test cases are synthetic sentences written for these sets, with places, organisations, public or historical figures or invented names. The Arabic text has not yet been reviewed by a native Arabic writer; the English governs.
  • Install from GitHub for now; the package is not on PyPI yet.

Sources and licences

SourceLicenceRedistributed here
Unicode Character Database 16.0.0 and 17.0.0 (UnicodeData.txt, DerivedNormalizationProps.txt, GraphemeBreakTest.txt)Unicode License v3; derived tables included with the noticeYes
spaCy 3.8.18, used as a test oracle for the BILUO conversionsMIT; used in the tests only, not bundledNo
Label Studio and doccano source code, read for the offset-convention matrixApache-2.0 (Label Studio) and MIT (doccano); cited by file, line and SHA-256, no code includedNo

The test cases were written for the validator: synthetic sentences with places, organisations, public or historical figures or invented names, none describing a real private person. The offset-convention matrix was measured with Python, JavaScript in Node and Chromium, spaCy and Hugging Face fast tokenizers on 20 Arabic probe texts; the Label Studio and doccano rows are read from their source code, not measured. Source details

How to cite

Cite as:

Bayanat Labs (2026). Arabic NER Offset Validator (arabic-ner-validator), version 0.1.0. Bayanat Labs. https://github.com/Bayanat-Labs/arabic-ner-validator

No DOI. Cite the URL in the citation above and the date you read it.

@misc{bayanatlabs2026arabicnervalidator,
  author       = {{Bayanat Labs}},
  title        = {Arabic NER Offset Validator (arabic-ner-validator), version 0.1.0},
  year         = {2026},
  month        = oct,
  howpublished = {\url{https://github.com/Bayanat-Labs/arabic-ner-validator}}
}

How we handle citations

Changelog

DateVersionChange
v0.1.0Python library, command-line tool, test cases and offset-convention matrix on GitHub; web app in English and Arabic on Hugging Face Spaces; test cases as a Hugging Face dataset.

Corrections and removal requests

If something in this release should not be there, or is wrong, email hello@bayanatlabs.com. We handle removal requests within 30 days, and platform requests within 24 hours. How removal requests work

Related product: Bayanat Documents

Need production-grade, rights-cleared data?

We publish synthetic fixtures, open benchmarks, results, code and guides for free. Data at scale is licensed or built to order: ready-to-license Arabic speech and text datasets with commercial AI-use rights written into the agreement, and custom collection, annotation and evaluation.

Bayanat Documents: Build a dataset for the documents your product reads, from bilingual invoices to handwritten forms. Get text, layout, extracted fields, and evidence for the answers you need.