From 64d4aa6ac7d65f8c61687f9a0aceb08d4a7e5539 Mon Sep 17 00:00:00 2001 From: Hampus Hammarlund Date: Thu, 15 Feb 2024 00:12:10 +0900 Subject: [PATCH] fix: check for proper noun and name feature --- lib/services/mecab_service.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/services/mecab_service.dart b/lib/services/mecab_service.dart index 4f00899..badc65a 100644 --- a/lib/services/mecab_service.dart +++ b/lib/services/mecab_service.dart @@ -132,7 +132,8 @@ class MecabService { pos = PartOfSpeech.particle; } else if (tokens[i].features[4] == 'サ変・スル') { pos = PartOfSpeech.verbSuruIncluded; - } else if (tokens[i].features[2] == '人名') { + } else if (tokens[i].features[1] == '固有名詞' && + tokens[i].features[2] == '人名') { pos = PartOfSpeech.nounProper; }