Skip to content

Commit

Permalink
Add test cases for #191
Browse files Browse the repository at this point in the history
  • Loading branch information
bab2min committed Oct 12, 2024
1 parent 40e5a22 commit 5933afc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,18 @@ TEST(KiwiCpp, UserTag)
EXPECT_EQ(tokens[7].tag, POSTag::user2);
}

TEST(KiwiCpp, STagPrefix)
{
Kiwi& kiwi = reuseKiwiInstance();
auto res = kiwi.analyze(u"자신있는 지역은 `후분양`으로 나올듯 싶습니다.", Match::allWithNormalizing).first;
EXPECT_EQ(res[0].str, u"자신");
EXPECT_EQ(res[1].str, u"");
EXPECT_EQ(res[2].str, u"");
EXPECT_EQ(res[3].str, u"지역");
EXPECT_EQ(res[4].str, u"");
EXPECT_EQ(res[5].str, u"`");
}

TEST(KiwiCpp, HSDataset)
{
KiwiBuilder kw{ MODEL_PATH, 0, BuildOption::default_, };
Expand Down

0 comments on commit 5933afc

Please sign in to comment.