Skip to content

Commit

Permalink
Add accessors to TypoTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
bab2min committed Sep 15, 2024
1 parent a735d1a commit 69a6b4f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/kiwi/TypoTransformer.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ namespace kiwi
return *this;
}

const UnorderedMap<std::tuple<KString, KString, CondVowel>, float>& getTypos() const
{
return typos;
}

/**
* @brief 연철 오타의 비용을 새로 설정합니다.
*
Expand All @@ -289,6 +294,11 @@ namespace kiwi
continualTypoThreshold = threshold;
}

float getContinualTypoCost() const
{
return continualTypoThreshold;
}

static TypoTransformer fromContinualTypoCost(float threshold)
{
TypoTransformer ret;
Expand All @@ -309,6 +319,11 @@ namespace kiwi
lengtheningTypoThreshold = threshold;
}

float getLengtheningTypoCost() const
{
return lengtheningTypoThreshold;
}

static TypoTransformer fromLengtheningTypoCost(float threshold)
{
TypoTransformer ret;
Expand Down

0 comments on commit 69a6b4f

Please sign in to comment.