From d97c094df53feaafad79fc04523d5c056c4fc513 Mon Sep 17 00:00:00 2001 From: bab2min Date: Sun, 27 Oct 2024 16:46:55 +0900 Subject: [PATCH] Add test cases for joining Z_SIOT --- test/test_cpp.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test_cpp.cpp b/test/test_cpp.cpp index 49f02ac3..eed7774b 100644 --- a/test/test_cpp.cpp +++ b/test/test_cpp.cpp @@ -1552,6 +1552,21 @@ TEST(KiwiCpp, JoinRestore) } } +TEST(KiwiCpp, JoinZSiot) +{ + Kiwi& kiwi = reuseKiwiInstance(); + for (auto c : { u8"하굣길", u8"만둣국", u8"나뭇잎", u8"세숫물", u8"고춧가루", u8"시곗바늘", u8"사글셋방" }) + { + auto tokens = kiwi.analyze(c, Match::allWithNormalizing | Match::splitSaisiot).first; + auto joiner = kiwi.newJoiner(); + for (auto& t : tokens) + { + joiner.add(t.str, t.tag, false); + } + EXPECT_EQ(joiner.getU8(), c); + } +} + TEST(KiwiCpp, NestedSentenceSplit) { Kiwi& kiwi = reuseKiwiInstance();