Use a multi-stage lookup table for grapheme segmentation

This commit is contained in:
Kovid Goyal
2025-03-31 21:51:28 +05:30
parent 72a1aabafd
commit 66856e7b52
9 changed files with 1873 additions and 474 deletions

View File

@@ -638,6 +638,7 @@ class TestDataTypes(BaseTest):
def test_split_into_graphemes(self):
self.assertEqual(char_props_for('\ue000')['category'], 'Co')
self.ae(split_into_graphemes('ab'), ['a', 'b'])
for i, test in enumerate(json.loads(read_kitty_resource('GraphemeBreakTest.json', __name__.rpartition('.')[0]))):
expected = test['data']
actual = split_into_graphemes(''.join(expected))