{"id":9871,"library":"kiwipiepy-model","title":"kiwipiepy Model","description":"kiwipiepy-model provides the language models necessary for kiwipiepy, a fast and accurate Korean morphological analyzer. It is a data-only package, implicitly installed as a dependency when you install kiwipiepy. The current version is 0.23.0, and it generally updates in lockstep with major versions of the core kiwipiepy library to provide the latest model improvements.","status":"active","version":"0.23.0","language":"en","source_language":"en","source_url":"https://github.com/bab2min/kiwipiepy","tags":["korean","nlp","morphological analysis","language model","text processing"],"install":[{"cmd":"pip install kiwipiepy","lang":"bash","label":"Recommended: Installs kiwipiepy and its model"},{"cmd":"pip install kiwipiepy-model","lang":"bash","label":"Install model package only (not typically needed)"}],"dependencies":[{"reason":"This package contains the models for the kiwipiepy library, which is the primary user-facing interface.","package":"kiwipiepy","optional":false}],"imports":[{"note":"The 'kiwipiepy-model' package provides model data, but the main 'Kiwi' class is imported from 'kiwipiepy'.","wrong":"from kiwipiepy_model import Kiwi","symbol":"Kiwi","correct":"from kiwipiepy import Kiwi"}],"quickstart":{"code":"from kiwipiepy import Kiwi\n\n# Initialize Kiwi with default model (loaded from kiwipiepy-model)\nkiwi = Kiwi(oov_handling='ngram') # Example with new oov_handling\n\ntext = \"안녕하세요, 저는 키위입니다.\"\ntokens = kiwi.tokenize(text)\nfor token in tokens:\n    print(f\"Word: {token.form}, Tag: {token.tag}, Start: {token.start}, End: {token.end}\")\n\nsentences = kiwi.split_into_sentences(\"어제는 비가 왔어요. 오늘은 맑을 예정입니다.\")\nfor sentence in sentences:\n    print(f\"Sentence: {sentence.text}\")\n    for token in sentence.tokens:\n        print(f\"  {token.form}/{token.tag}\")","lang":"python","description":"Initialize the Kiwi morphological analyzer. The default model is automatically loaded from the kiwipiepy-model package. This example demonstrates basic tokenization and sentence splitting, incorporating the new `oov_handling` parameter."},"warnings":[{"fix":"Instead of `Kiwi(typo_correct_options=...)`, use `kiwi.tokenize(..., typo_correct_options=...)` or `kiwi.split_into_sentences(..., typo_correct_options=...)`.","message":"The `typo_correct_options` parameter for typo correction has been moved from the `Kiwi` constructor to the `tokenize`, `split_into_sentences`, etc., methods.","severity":"breaking","affected_versions":">=0.23.0"},{"fix":"Remove deprecated OOV-related parameters (e.g., `oov_score_mode`) from `Kiwi()` constructor. Use `oov_handling='length_based'` or `oov_handling='ngram'` in the `Kiwi()` constructor, or pass it to analysis methods for specific calls.","message":"The way to specify OOV (Out-Of-Vocabulary) handling has changed from boolean flags or simple modes to a more flexible `oov_handling` parameter that accepts specific string values or configurations in the `Kiwi` constructor.","severity":"breaking","affected_versions":">=0.23.0"},{"fix":"Ensure you `pip install kiwipiepy` and `from kiwipiepy import Kiwi`. Do not attempt to import classes directly from `kiwipiepy_model`.","message":"The `kiwipiepy-model` package only provides the model files. You must install and import from the `kiwipiepy` package to use the morphological analyzer.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Install the main library: `pip install kiwipiepy`.","cause":"You likely installed `kiwipiepy-model` but not `kiwipiepy` itself, or have not installed either.","error":"ModuleNotFoundError: No module named 'kiwipiepy'"},{"fix":"Pass `typo_correct_options` to `kiwi.tokenize()`, `kiwi.split_into_sentences()`, etc., instead of `Kiwi()`.","cause":"In kiwipiepy v0.23.0+, `typo_correct_options` is no longer a constructor argument. It's now passed to analysis methods.","error":"TypeError: Kiwi() got an unexpected keyword argument 'typo_correct_options'"},{"fix":"Remove `oov_score_mode` from the `Kiwi` constructor. Use the new `oov_handling` parameter (e.g., `oov_handling='ngram'`) when initializing `Kiwi()` or in analysis methods.","cause":"In kiwipiepy v0.23.0+, OOV handling is configured via the `oov_handling` parameter, replacing older arguments like `oov_score_mode`.","error":"TypeError: Kiwi() got an unexpected keyword argument 'oov_score_mode'"}]}