Multi-lingual word position tool for corpus annotation
Please select existing CoNLL/CoNLL-U file to import for visual inspection
Name: Corpus Navigator
Version: 0.1.0
Date: 31 January 2026
Publisher: The Balagha Corpus
Author: Mandar Marathe
Use: This tool implements standardized rules for numbering words in any text, supporting multiple languages and writing systems. The tool allows for the determination of word position offsets consistently and reliably.
Requirements: The tool is a fully stand-alone HTML/Javascript file which can be run on any web browser, and does not need internet access.
Supports: RTL languages (Arabic, Hebrew, Persian, Urdu), LTR languages (English, Spanish, etc.), and mixed-direction text. Import / export of CoNLL-style files.
Applicable to: Social media posts, tweets, comments, messages, and any text corpus requiring consistent word position verification.
To verify a word position annotation in your dataset:
Version 0.1.0 (31 January 2026)
Mandar Marathe. "Corpus Navigator (v0.1.0)" Github, 2026. https://github.com/Balagha-Corpus/Corpus-Navigator/tree/v0.1.0.
For questions about this tool or to report issues, please email [email protected].
This documentation is released under CC-BY 4.0 license.
You are free to share and adapt with attribution.
This document defines the rules used to determine word positions in text corpus annotations. These rules apply whether counting is performed manually or programmatically.
Purpose: To ensure consistent and reproducible verification of annotations across any text dataset, regardless of language or content type.
Word positions start from 1 (not 0)
Example (English): "Hello world"
HelloworldExample (Arabic): "مرحبا بك"
مرحبابكHashtags are split on separators: dash -, underscore _, or emdash —
The # symbol remains attached to the first segment only.
Example 1: #climate_change
#climatechangeExample 2: #breaking-news
#breakingnewsExample 3: Single-word hashtag #important
#important (no splitting)Example 4 (Arabic): #آخر_الأخبار
#آخرالأخبارAll emoji are stripped and do not count as words
This includes: flag emoji, symbols, face emoji, and any Unicode emoji character.
Example (English): "Great news 🎉 today ❤️"
GreatnewstodayExample (Arabic): "خبر جيد 🎉 اليوم ❤️"
خبرجيداليومPunctuation attached to words is kept; free-standing punctuation is stripped
Example 1 (English): world, → one word (comma attached)
Example 2 (English): really? → one word (question mark attached)
Example 3 (English): "hello" → one word (quotes attached)
Example 4 (Arabic): والكلمة، → one word (comma attached)
Example 1: . . . or ... (ellipsis alone) → zero words
Example 2: , (comma alone) → zero words
Example 3 (English): "Hello , world"
HelloworldExample 4 (Arabic): "كلمة ، أخرى"
كلمةأخرىURLs count as single words regardless of length
Example (English): "Check https://example.com/article for details"
Checkhttps://example.com/articlefordetailsExample (Arabic): "انظر https://example.com/article للتفاصيل"
انظرhttps://example.com/articleللتفاصيلHandle language-specific punctuation the same as Western punctuation
Examples include:
، - attached: keep; free-standing: strip؟ - attached: keep; free-standing: strip؛ - attached: keep; free-standing: strip… (single character) - free-standing: stripExample (Arabic): "الكلمة؛ كلمة"
الكلمة؛كلمةTatweel ـ is kept as part of the word (Arabic-specific)
Tatweel is used for emphasis or visual elongation in Arabic social media.
Example (Arabic): "كلـــمة" (with tatweel)
كلـــمة (one word)All diacritics are preserved and do not affect word boundaries
This applies to any language with diacritics: Arabic harakat, Hebrew niqqud, Vietnamese tone marks, etc.
Example (Arabic): "الكَلِمَةُ"
الكَلِمَةُ (one word with all diacritics)Example (Vietnamese): "tiếng"
tiếng (one word with tone marks)Numerals in any script count as single words
This includes Western numerals (0-9), Arabic-Indic numerals (٠-٩), and numerals from other writing systems.
Example 1 (English): "In 2025 we started"
In2025westartedExample 2 (Arabic): "في ٢٠٢٥ بدأنا"
في٢٠٢٥بدأناExample 3: Date format "15/1/2025"
15/1/2025 (one word)Social media mentions (@ symbol) count as single words
Example (English): "Thanks @username for help"
Thanks@usernameforhelpExample (Arabic): "شكرا @username على"
شكرا@usernameعلىQuote marks attached to text are kept; free-standing are stripped
Includes Western quotes "", Arabic quotes «», and other quotation marks.
Example 1 (English): "word" → one word
Example 2 (Arabic): «الكلمة» → one word
Example 3: Free-standing " " or « » → zero words (stripped)
Letter repetition counts as single word
Common in social media across many languages for emphasis or excitement.
Example (English): "yessss"
yessss (one word)Example (Arabic): "نعممممم"
نعممممم (one word)Each segment in a different script separated by space is a separate word
Example (Arabic-English): "كلمة word أخرى"
كلمةwordأخرىExample (Hebrew-English): "מילה word אחרת"
מילהwordאחרתNote: No space between scripts (rare): "wordكلمة" → W1: wordكلمة (one word)
Line breaks and paragraph marks are treated as whitespace
\n (newline) → treated as space\r (carriage return) → treated as space\t (tab) → treated as spaceExample: "word\nanother" → same as "word another"
wordanotherZero-width characters are stripped and ignored
This includes:
\u200D\u200C\u200BThese characters do not create word boundaries and are completely removed.
RT markers are counted as separate words if present
Example 1 (English): "RT @user: Important message"
RT@user:ImportantmessageExample 2 (Arabic): "RT: رسالة مهمة"
RT:رسالةمهمةStrip all leading and trailing whitespace before tokenization
Example: " word another " → "word another"
wordanotherContent within parentheses/brackets is treated as part of the word
Example 1: (word) → W1: (word) (one word)
Example 2: ( word ) (spaces inside) → W1: (word) (spaces normalized)
Example 3: Free-standing () or [] → zero words (stripped)
Ampersands and standalone symbols are stripped
& alone → stripped (zero words)@ alone → stripped (zero words)# alone → stripped (zero words)Example (English): "word & another"
wordanother& is stripped)Punctuation from any script follows the same attachment rules
Example: "word، another. كلمة"
word،another.كلمةSpecial ligatures count as single words
Examples:
ﷲ (Allah ligature) → W1: ﷲ (one word)ﷺ (PBUH ligature) → W1: ﷺ (one word)Text: "The weather today is beautiful"
Tokenization:
TheweathertodayisbeautifulText: "Breaking news #climate_action is trending today"
Tokenization:
Breakingnews#climateactionistrendingtodayText: "Great news 🎉 everyone, check it out! ❤️"
Tokenization:
Greatnewseveryone,checkitout!(Emoji 🎉 and ❤️ are stripped)
Text: "RT @user: Amazing story... #breaking-news #must_read https://example.com 👍"
Tokenization:
RT@user:Amazingstory...#breakingnews#mustreadhttps://example.com(Emoji 👍 is stripped; ellipsis attached to word is kept)
Text: "الطقس اليوم جميل جدا"
Tokenization:
الطقساليومجميلجداText: "خبر عاجل #آخر_الأخبار يتصدر الآن"
Tokenization:
خبرعاجل#آخرالأخباريتصدرالآنText: "Check this article المقال مهم very important"
Tokenization:
Checkthisarticleالمقالمهمveryimportant