engine: room for 128 candidates

32 hid the tail of common readings: きょう has 41 kanji, 구 has 352
hanja. 128 covers every kanji entry and the hanja dictionary now keeps
that many per reading.
This commit is contained in:
2026-08-16 21:32:23 +09:00
parent 693a1210a6
commit 30abd05e68
6 changed files with 290 additions and 289 deletions

View File

@@ -128,12 +128,12 @@ class MkhanjaTest(unittest.TestCase):
self.assertIn("\t", result.stdout)
def test_generator_keeps_runtime_candidate_limit(self):
rows = "".join(f"{chr(0x4E00 + n)}\t\n" for n in range(33))
rows = "".join(f"{chr(0x4E00 + n)}\t\n" for n in range(129))
result = run(GENERATE, self.source(rows))
self.assertEqual(result.returncode, 0, result.stderr)
candidates = result.stdout.rstrip().split("\t", 1)[1].split()
self.assertEqual(len(candidates), 32)
self.assertEqual(candidates[-1], chr(0x4E00 + 31))
self.assertEqual(len(candidates), 128)
self.assertEqual(candidates[-1], chr(0x4E00 + 127))
if __name__ == "__main__":