From 69a6b4f6dbea0fc6b22999db53478cdaf952a218 Mon Sep 17 00:00:00 2001 From: bab2min Date: Sun, 15 Sep 2024 21:41:54 +0900 Subject: [PATCH] Add accessors to `TypoTransformer` --- include/kiwi/TypoTransformer.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/kiwi/TypoTransformer.h b/include/kiwi/TypoTransformer.h index 9405a665..cf2a9757 100644 --- a/include/kiwi/TypoTransformer.h +++ b/include/kiwi/TypoTransformer.h @@ -278,6 +278,11 @@ namespace kiwi return *this; } + const UnorderedMap, float>& getTypos() const + { + return typos; + } + /** * @brief 연철 오타의 비용을 새로 설정합니다. * @@ -289,6 +294,11 @@ namespace kiwi continualTypoThreshold = threshold; } + float getContinualTypoCost() const + { + return continualTypoThreshold; + } + static TypoTransformer fromContinualTypoCost(float threshold) { TypoTransformer ret; @@ -309,6 +319,11 @@ namespace kiwi lengtheningTypoThreshold = threshold; } + float getLengtheningTypoCost() const + { + return lengtheningTypoThreshold; + } + static TypoTransformer fromLengtheningTypoCost(float threshold) { TypoTransformer ret;