Skip to content

Add demo examples that cover the weak rules W1-W5 and W7 - #14

Merged
isaranga merged 1 commit into
mainfrom
demo-weak-rule-examples
Nov 25, 2026
Merged

isaranga merged 1 commit into
mainfrom
demo-weak-rule-examples

Conversation

@isaranga

Copy link
Copy Markdown
Owner

Before this change, no built-in demo example made W1, W2, W3, W4, W5 or W7 change anything, so python bidi.py --all never showed a table for those rules.

  • New Example 4, Arabic text with a number (سعر 1,000 ريال): W2 turns the digits into AN, W3 turns AL into R, and W4 makes the comma AN.
  • New Example 5, Prices and percentages (Price: $100, 1.5%): W4 makes the dot in 1.5 EN, W5 makes $ and % EN, and W7 turns every EN into L.
  • Example 2 now spells shalom with nikkud (שָׁלוֹם), so W1 turns the vowel points from NSM into R. Its "Watch for" note also points out that after L2 each vowel point comes before its letter, and that L3 leaves this to the renderer.

Every weak rule now changes something in at least one example. The examples that were 4–7 are now 6–9, so --example N picks a different example for those numbers. README.md and CLAUDE.md are updated to match.

The "Watch for" notes were checked against the verbose output.

🤖 Generated with Claude Code

Before this change, no built-in example made W1, W2, W3, W4, W5 or W7
change anything. Two new examples follow Example 3: Arabic text with a
number (W2, W3, W4) and prices and percentages (W4, W5, W7). Example 2
now spells shalom with nikkud, so W1 turns the vowel points into R. Every
weak rule now changes something in at least one example. The examples
that were 4-7 are now 6-9.

README.md and CLAUDE.md are updated to match.

Co-Authored-By: Claude <noreply@anthropic.com>
@isaranga
isaranga merged commit 5d28ed1 into main Nov 25, 2026
6 checks passed
@isaranga
isaranga deleted the demo-weak-rule-examples branch November 25, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant