From 53ba65831910cbe4abdd943c381967ca04fc3e51 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Thu, 17 Oct 2024 12:49:13 +0900 Subject: [PATCH] =?UTF-8?q?#8=20=E3=81=AE=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update_db.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update_db.py b/update_db.py index f80c31d..4e4e420 100644 --- a/update_db.py +++ b/update_db.py @@ -16,6 +16,7 @@ import unicodedata from datetime import datetime, timedelta from typing import Any, TypedDict, cast +import jaconv import requests from eloquent import DatabaseManager, Model @@ -256,7 +257,7 @@ class CommentResult (TypedDict): def normalise ( s: str, ) -> str: - return unicodedata.normalize ('NFKC', s).lower () + return jaconv.hira2kata (unicodedata.normalize ('NFKC', s)).lower () if __name__ == '__main__':