From f8cefeb22cc54bae45f732785080ebccaefaa20e Mon Sep 17 00:00:00 2001 From: Sorami Hisamoto Date: Tue, 22 Jun 2021 00:09:29 +0900 Subject: [PATCH] Exactly match the user dict split info id --- sudachipy/dictionarylib/dictionarybuilder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sudachipy/dictionarylib/dictionarybuilder.py b/sudachipy/dictionarylib/dictionarybuilder.py index 5f3512a..bde5871 100644 --- a/sudachipy/dictionarylib/dictionarybuilder.py +++ b/sudachipy/dictionarylib/dictionarybuilder.py @@ -334,7 +334,7 @@ def parse_splitinfo(self, info): @staticmethod def __is_id(text): - return re.match(r'U?\d+', text) + return re.match(r'U?\d+$', text) def parse_id(self, text): if text.startswith('U'):