kss 6.0.6
A Toolkit for Korean sentence segmentation
License: BSD 3-Clause "New" or "Revised" License
Requires Python: >=3

<h1 align="center">
KSS: Korean String processing Suite
</h1>

<p align="center">
    <a href="https://github.com/hyunwoongko/kss/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/hyunwoongko/kss.svg"></a> <a href="https://github.com/hyunwoongko/kss/issues"><img alt="Issues" src="https://img.shields.io/github/issues/hyunwoongko/kss"></a> <a href="https://github.com/hyunwoongko/kss/actions"><img alt="Tests on Ubuntu" src="https://github.com/hyunwoongko/kss/actions/workflows/test_ubuntu.yaml/badge.svg"></a> <a href="https://github.com/hyunwoongko/kss/actions"><img alt="Tests on MacOS" src="https://github.com/hyunwoongko/kss/actions/workflows/test_macos.yaml/badge.svg"></a> <a href="https://github.com/hyunwoongko/kss/actions"><img alt="Tests on Windows" src="https://github.com/hyunwoongko/kss/actions/workflows/test_windows.yaml/badge.svg"></a>
</p>


Kss is a Korean string processing suite that provides various functions for processing Korean strings. It is designed to be simple and easy to use, and it is designed to be used in various fields such as natural language processing, data preprocessing, and data analysis.

### What's New:
- April 27, 2024 [Released Kss 6.0 Python](https://github.com/hyunwoongko/kss/releases/tag/v6.0.0).
- March 31, 2024 [Released Kss 5.0 Python](https://github.com/hyunwoongko/kss/releases/tag/v5.1.0).
- December 19, 2022 [Released Kss 4.0 Python](https://github.com/hyunwoongko/kss/releases/tag/v4.0.0).
- May 5, 2022 [Released Kss Fluter](https://github.com/khjde1207/kss_dart).
- August 25, 2021 [Released Kss Java](https://github.com/sangdee/kss-java).
- August 18, 2021 [Released Kss 3.0 Python](https://github.com/hyunwoongko/kss/releases/tag/3.0.1).
- December 21, 2020 [Released Kss 2.0 Python](https://pypi.org/project/kss/2.0.0/).
- August 16, 2019 [Released Kss 1.0 C++](https://docs.likejazz.com/kss/).

## Installation
> **⚠️ Note (2025-08-01):**
> 
> The automatic installation of mecab and related Python packages has been removed from `setup.py` to prevent password prompts and privilege escalation during installation. 
> 
> If you require mecab functionality, please install mecab and its Python bindings manually before installing or using KSS. See below for instructions.

### Install Kss
Kss can be easily installed using the pip package manager.
```console
pip install kss
```

### Install Mecab (Optional)
Please install mecab or konlpy.tag.Mecab to use Kss much faster.
- mecab (Linux/MacOS): https://github.com/hyunwoongko/python-mecab-kor
- mecab (Windows): https://cleancode-ws.tistory.com/97
- konlpy.tag.Mecab (Linux/MacOS): https://konlpy.org/en/latest/api/konlpy.tag/#mecab-class
- konlpy.tag.Mecab (Windows): https://uwgdqo.tistory.com/363

## Usage
### 1. Basic Usage
All functions can be used by creating an instance of the Kss class and calling the instance with the inputs.
```python
from kss import Kss

module = Kss("MODULE_NAME")
output = module("YOUR_INPUT_STRING", **kwargs)
```

### 2. Available Modules

If you want to check the available modules, you can use the `available()` function.
```python
from kss import Kss

Kss.available()
```
```python
['augment', 'collocate', 'g2p', 'hangulize', 'split_hanja', 'is_hanja', 'hanja2hangul', 'h2j', 'h2hcj', 'j2h', 'j2hcj', 'hcj2h', 'hcj2j', 'is_jamo', 'is_jamo_modern', 'is_hcj', 'is_hcj_modern', 'is_hangul_char', 'select_josa', 'combine_josa', 'extract_keywords', 'split_morphemes', 'paradigm', 'anonymize', 'clean_news', 'is_completed_form', 'get_all_completed_form_hangul_chars', 'get_all_incompleted_form_hangul_chars', 'filter_out', 'half2full', 'reduce_char_repeats', 'reduce_emoticon_repeats', 'remove_invisible_chars', 'normalize', 'preprocess', 'qwerty', 'romanize', 'is_unsafe', 'split_sentences', 'correct_spacing', 'summarize_sentences']
```

### 3. Checking the usage of each module
If you want to check the usage of each module, you can use the `help()` function.
```python
from kss import Kss

module = Kss("split_sentences")
module.help()
```

```text
Split texts into sentences.

Args:
    text (Union[str, List[str], Tuple[str]]): single text or list/tuple of texts
    backend (str): morpheme analyzer backend. 'mecab', 'pecab', 'punct', 'fast' are supported
    num_workers (Union[int, str]): the number of multiprocessing workers
    strip (bool): strip all sentences or not
    return_morphemes (bool): whether to return morphemes or not
    ignores (List[str]): list of strings to ignore

Returns:
    Union[List[str], List[List[str]]]: outputs of sentence splitting

Examples:
    >>> from kss import Kss
    >>> split_sentences = Kss("split_sentences")
    >>> text = "회사 동료 분들과 다녀왔는데 분위기도 좋고 음식도 맛있었어요 다만, 강남 토끼정이 강남 쉑쉑버거 골목길로 쭉 올라가야 하는데 다들 쉑쉑버거의 유혹에 넘어갈 뻔 했답니다 강남역 맛집 토끼정의 외부 모습."
    >>> split_sentences(text)
    ['회사 동료 분들과 다녀왔는데 분위기도 좋고 음식도 맛있었어요', '다만, 강남 토끼정이 강남 쉑쉑버거 골목길로 쭉 올라가야 하는데 다들 쉑쉑버거의 유혹에 넘어갈 뻔 했답니다', '강남역 맛집 토끼정의 외부 모습.']
```
### 4. Multiprocessing
If you input a list of strings, Kss will automatically use multiprocessing to process the strings in parallel.
And you can set the number of processes to use by setting the `num_workers` parameter.
If you input `num_workers < 2`, Kss will not use multiprocessing.

```python
from kss import Kss

module = Kss("MODULE_NAME")

# using all cores
output = module(["YOUR_INPUT_STRING1", "YOUR_INPUT_STRING2", ...], **kwargs)
# using 4 cores
output = module(["YOUR_INPUT_STRING1", "YOUR_INPUT_STRING2", ...], num_workers=4, **kwargs)
# using 1 core (no multiprocessing)
output = module(["YOUR_INPUT_STRING1", "YOUR_INPUT_STRING2", ...], num_workers=1, **kwargs)
``` 

### 5. Backward Compatibility
The old version of Kss used functional usage. Kss also supports this for backward compatibility.
```python
from kss import split_sentences

output = split_sentences("YOUR_INPUT_STRING", **kwargs)
```

### 6. Alias of module names
Because there are so many modules in Kss, user may have difficulty remembering the names of each module.
Kss provides aliases for some modules to make it easier to use them.
```python
from kss import Kss

module_1 = Kss("split_morphemes")
module_2 = Kss("tokenize")
# For example, 'split_morphemes' module can be loaded by using the alias named 'tokenize'.
```

You can check the alias of each module by using the `alias()` function.
```python
from kss import Kss

Kss.alias()
```

```python
{'aug': 'augment', 'augmentation': 'augment', 'collocation': 'collocate', 'hangulization': 'hangulize', 'hangulisation': 'hangulize', 'hangulise': 'hangulize', 'hanja': 'hanja2hangul', 'hangul2jamo': 'h2j', 'hangul2hcj': 'h2hcj', 'jamo2hangul': 'j2h', 'jamo2hcj': 'j2hcj', 'hcj2hangul': 'hcj2h', 'hcj2jamo': 'hcj2j', 'josa': 'select_josa', 'keyword': 'extract_keywords', 'keywords': 'extract_keywords', 'morpheme': 'split_morphemes', 'morphemes': 'split_morphemes', 'annonymization': 'anonymize', 'news_cleaning': 'clean_news', 'news': 'clean_news', 'completed_form': 'is_completed_form', 'completed': 'is_completed_form', 'filter': 'filter_out', 'reduce_repeats': 'reduce_char_repeats', 'reduce_char': 'reduce_char_repeats', 'reduce_chars': 'reduce_char_repeats', 'reduce_emoticon': 'reduce_emoticon_repeats', 'reduce_emoticons': 'reduce_emoticon_repeats', 'reduce_emo': 'reduce_emoticon_repeats', 'remove_invisible': 'remove_invisible_chars', 'invisible_chars': 'remove_invisible_chars', 'invisible': 'remove_invisible_chars', 'normalization': 'normalize', 'normalisation': 'normalize', 'normalise': 'normalize', 'preprocessing': 'preprocess', 'prep': 'preprocess', 'romanization': 'romanize', 'romanisation': 'romanize', 'romanise': 'romanize', 'safety': 'is_unsafe', 'check_safety': 'is_unsafe', 'sentence': 'split_sentences', 'sentences': 'split_sentences', 'sent_split': 'split_sentences', 'sent_splits': 'split_sentences', 'sents_split': 'split_sentences', 'split_sent': 'split_sentences', 'split_sents': 'split_sentences', 'spacing': 'correct_spacing', 'space': 'correct_spacing', 'spaces': 'correct_spacing', 'summarization': 'summarize_sentences', 'summarize': 'summarize_sentences', 'summ': 'summarize_sentences', 'morph': 'split_morphemes', 'morphs': 'split_morphemes', 'tokenize': 'split_morphemes', 'tokenization': 'split_morphemes', 'split_morph': 'split_morphemes', 'split_morphs': 'split_morphemes', 'morph_split': 'split_morphemes', 'morph_splits': 'split_morphemes', 'morphs_split': 'split_morphemes'}
```

## Supported Modules
Kss supports the following modules and there are the simple usages of each module in the following sections.

Because there are so many modules, I apologize for not being able to explain each one in detail.

<details>
<summary>1. augment</summary>

This augments text with synonym replacement method and, 
optionally it postprocesses the text by correcting josa.
For this, Kss uses the Korean wordnet from KAIST.

Args:
- text (`Union[str, List[str], Tuple[str]]`): single text or list of texts
- replacement_ratio (`float`): ratio of words to be replaced
- josa_correction (`bool`): whether to correct josa or not
- num_workers (`Union[int, str]`): the number of multiprocessing workers
- backend (`str`): morpheme analyzer backend. 'mecab', 'pecab' are supported
- verbose (`bool`): whether to print verbose outputs or not

Returns:
- `Union[str, List[str]]`: augmented text or list of augmented texts

Examples:
```python
>>> from kss import Kss
>>> augment = Kss("augment")
>>> text = "앞서 지난해 11월, 보이저 1호는 명령을 수신하고 수행하는 데엔 문제가 없었지만 통신 장치에 문제가 생겨 과학·엔지니어링 데이터가 지구로 전송되지 않았던 바 있다. 당시 그들은 컴퓨터 시스템을 재시작하고 문제의 근본적인 원인을 파악하기 위해 명령을 보내려고 시도했고, 이달 1일 '포크'라는 명령을 보냈다."
>>> output = augment(text)
>>> print(output)
"앞서 지난해 11월, 보이저 1호는 명령을 수신하고 시행하는 데엔 문제가 없었지만 송신 장비에 문제가 생겨 과학·엔지니어링 데이터가 지구로 전송되지 않았던 바 있다. 당시 그들은 컴퓨터 시스템을 재시작하고 문제의 근본적인 원인을 파악하기 위해 명령을 보내려고 시도했고, 이달 1일 '포크'라는 명령을 보냈다."
```

References:
- This was copied from [KoEDA](https://github.com/toriving/KoEDA) and modified by Kss
</details>

<details>
<summary>2. collocate</summary>

This returns collocation (연어) of given words.
The collocation is a set of words that frequently appear together.

Args:
- text (`Union[str, List[str], Tuple[str]]`): single word or list of words
- num_workers (`Union[int, str]`): the number of multiprocessing workers
- verbose (`bool`): whether to print verbose outputs or not

Returns:
- `Union[dict, List[dict]]`: collocations and frequencies of words in text or list of collocations and frequencies

Examples:
```python
>>> from kss import Kss
>>> collocate = Kss("collocate")
>>> text = "먹"
>>> output = collocate(text)
>>> print(output)
{'verb': {'noun': [('것', 39), ('수', 29), ('음식', 23), ('등', 16), ('고기', 14), ('먹이', 14), ('때', 12), ('식물', 12), ('개고기', 9), ('젖', 9), ('겁', 7), ('시작', 7), ('후', 7), ('밥', 7), ('요리', 7), ('경우', 6), ('풀', 6), ('사람', 5), ('자살', 5), ('과일', 4), ('늑대', 4), ('마음', 4), ('나이', 4), ('애', 4), ('생선', 3), ('개', 3), ('죽', 3), ('양', 3), ('나무', 3), ('만큼', 3), ('물', 3), ('방법', 3), ('알', 3), ('떡볶이', 3), ('식사', 3), ('아침', 3), ('사과', 3), ('라면', 3), ('자기', 3), ('약', 3), ('점심', 3), ('때문', 3), ('조리', 3), ('떡', 2), ('접시', 2), ('국수', 2), ('일반적', 2), ('무엇', 2), ('파이', 2), ('만', 2), ('다음', 2), ('이후', 2), ('무리', 2), ('기록', 2), ('풍습', 2), ('동물', 2), ('식물질', 2), ('곤충', 2), ('이', 2), ('유제류', 2), ('새끼', 2), ('불고기', 2), ('한국', 2), ('한국식', 2), ('동안', 2), ('몸', 2), ('돼지고기', 2), ('잡식성', 2), ('기관', 2), ('제사장', 2), ('끼', 2), ('운동', 2), ('곡식', 2), ('궁중', 2), ('젖소', 2), ('우유', 2), ('고', 2), ('이야기', 2), ('정도', 2), ('일', 2), ('자리', 2), ('지역', 2), ('소화', 2), ('도중', 2), ('쓰레기', 2), ('저녁', 2), ('그', 2), ('뒤', 2), ('조', 2), ('고구마', 1), ('가지', 1), ('가시', 1), ('가지도', 1), ('아이', 1), ('쌈', 1), ('노출', 1), ('그다음', 1), ('근육', 1), ('아침상', 1), ('대로', 1), ('솔잎', 1), ('생', 1), ('중세', 1), ('어른', 1), ('성소', 1), ('집중적', 1), ('한번', 1), ('멜론', 1), ('입', 1), ('나뭇가지', 1), ('혀', 1), ('무시', 1), ('발견', 1), ('전후', 1), ('운반', 1), ('찬밥', 1), ('벌레', 1), ('남편', 1), ('하', 1), ('부인', 1), ('플랑크톤', 1), ('4', 1), ('미역국', 1), ('벨', 1), ('잔가지', 1), ('그중', 1), ('말', 1), ('소시지', 1), ('사냥', 1), ('카스', 1), ('따위', 1), ('레', 1), ('새', 1), ('내서', 1), ('인류', 1), ('소문', 1), ('수라', 1), ('곳', 1), ('항원', 1), ('구지가', 1), ('되새김', 1), ('사료', 1), ('하루', 1), ('문제', 1), ('큰곰', 1), ('비율', 1), ('6', 1), ('보리', 1), ('메조', 1), ('광', 1), ('물냉면', 1), ('살', 1), ('여공', 1), ('수영', 1), ('주변', 1), ('파리', 1), ('체액', 1), ('가운데', 1), ('시체', 1), ('구기', 1), ('해초', 1), ('호두', 1), ('엽전', 1), ('고추장', 1), ('300', 1), ('배설', 1), ('곰국', 1), ('노루', 1), ('대나무', 1), ('초식성', 1), ('부육', 1), ('종류', 1), ('남', 1), ('포장마차', 1), ('어묵', 1), ('특효', 1), ('약물', 1), ('노래', 1), ('어미', 1), ('맥', 1), ('털가죽', 1), ('뇌', 1), ('돌', 1), ('방식', 1), ('비빔밥', 1), ('진화', 1), ('콩', 1), ('탈', 1), ('신의주', 1), ('뜰', 1), ('하느님', 1), ('공화제', 1), ('물질', 1), ('초식', 1), ('간', 1), ('흑', 1), ('식품', 1), ('덮밥', 1), ('탐사선', 1), ('해산물', 1), ('내부', 1), ('3', 1), ('공격', 1), ('정', 1), ('대부분', 1), ('데', 1), ('연습', 1), ('오이', 1), ('성장', 1), ('볶음', 1), ('설', 1), ('스탈린', 1), ('형식', 1), ('골목', 1), ('나뭇잎', 1), ('주간', 1), ('잎', 1), ('된장찌개', 1), ('자매', 1), ('시간당', 1), ('말복', 1), ('구어', 1), ('말고기', 1), ('당나귀', 1), ('모습', 1), ('박테리아', 1), ('영양분', 1), ('부분', 1), ('가축', 1), ('그것', 1), ('가공품', 1), ('구이', 1), ('목', 1), ('기름', 1), ('휴식', 1), ('소스', 1), ('나무껍질', 1), ('쇠고기', 1), ('고착', 1), ('밝기', 1), ('짜장면', 1), ('날', 1), ('수액', 1), ('배달', 1), ('장면', 1), ('단어', 1), ('떡국', 1), ('찜', 1), ('문화권', 1), ('소형', 1), ('이전', 1), ('로', 1), ('노년', 1), ('난자', 1), ('돼지', 1), ('채집', 1), ('나라', 1), ('전', 1), ('육식성', 1), ('격려', 1), ('반복', 1), ('유협', 1), ('디저트', 1), ('분위기', 1), ('일과', 1), ('쌀', 1), ('고관', 1), ('밑반찬', 1), ('떼', 1), ('개월', 1), ('다양', 1), ('본격적', 1), ('생각', 1), ('수면제', 1), ('학교', 1), ('칭', 1), ('고깃국', 1), ('충격', 1), ('복사본', 1), ('미', 1), ('감로', 1), ('비', 1), ('독약', 1), ('우두', 1), ('도', 1), ('농작물', 1), ('자장면', 1), ('인터넷', 1), ('술', 1), ('기회', 1), ('풀뿌리', 1), ('게걸', 1), ('외상술', 1), ('약밥', 1), ('풍속', 1), ('한방', 1), ('치질', 1), ('나', 1), ('허기', 1), ('어린이', 1), ('나물밥', 1), ('사약', 1), ('가죽', 1), ('서부', 1), ('명', 1), ('이승만', 1), ('가래떡', 1), ('절대', 1), ('숲', 1), ('깨', 1), ('봄맞이', 1), ('곡', 1), ('계속', 1), ('자연', 1), ('목축', 1), ('시간', 1), ('서로', 1), ('얼', 1), ('가능성', 1), ('빵', 1), ('뿌리', 1), ('독립', 1), ('혼자', 1), ('잠', 1), ('덴푸라', 1), ('둥', 1), ('성', 1), ('가열', 1), ('전자', 1), ('창신', 1), ('탈진', 1), ('맘', 1), ('자신', 1)], 'verb': [('하', 33), ('않', 21), ('살', 17), ('즐기', 11), ('굽', 9), ('곁들이', 7), ('썰', 6), ('찍', 5), ('섞', 5), ('있', 5), ('치우', 4), ('잡', 4), ('나누', 4), ('비비', 4), ('되', 3), ('싸', 3), ('어', 3), ('익히', 3), ('버리', 3), ('만들', 3), ('집', 3), ('보', 3), ('죽', 3), ('들', 2), ('튀기', 2), ('삭히', 2), ('마시', 2), ('말', 2), ('달이', 2), ('끓이', 2), ('뜯', 2), ('사', 2), ('자라', 2), ('뿌리', 2), ('넣', 2), ('시키', 2), ('위하', 2), ('찌', 1), ('씹', 1), ('뒤집', 1), ('바꾸', 1), ('부르', 1), ('다니', 1), ('담구', 1), ('도망치', 1), ('재우', 1), ('파', 1), ('오', 1), ('덜', 1), ('발르', 1), ('늘', 1), ('자르', 1), ('얹', 1), ('묻히', 1), ('볶', 1), ('담그', 1), ('태어나', 1), ('죽이', 1), ('줍', 1), ('갉', 1), ('생겨나', 1), ('찾', 1), ('아', 1), ('부숴뜨리', 1), ('짜', 1), ('부리', 1), ('훔치', 1), ('쓰', 1), ('나르', 1), ('베', 1), ('대', 1), ('둘러앉', 1), ('걸르', 1), ('맞', 1), ('넘', 1), ('부', 1), ('두들기', 1), ('팔', 1), ('따', 1)], 'adverb': [('많이', 10), ('주로', 7), ('다', 5), ('같이', 4), ('잘', 4), ('함께', 3), ('못', 3), ('가장', 3), ('우연히', 1), ('자주', 1), ('하지만', 1), ('그냥', 1), ('씩', 1), ('또한', 1), ('너무', 1), ('채', 1), ('내내', 1), ('어찌', 1), ('적당히', 1), ('대체로', 1), ('가끔', 1), ('특히', 1), ('흥청망청', 1), ('적이', 1), ('흔히', 1), ('상관없이', 1), ('또', 1), ('통째로', 1), ('날로', 1), ('빨리', 1), ('때로', 1), ('전혀', 1), ('배불리', 1), ('겨우', 1), ('안', 1), ('간단히', 1), ('달리', 1)], 'determiner': [('다른', 5), ('그', 2), ('여러', 1), ('세', 1), ('몇몇', 1), ('새', 1)], 'adjective': [('싶', 5), ('어리', 1), ('편하', 1), ('작', 1), ('좋', 1), ('손쉽', 1), ('못하', 1)]}, 'noun': {'noun': [('붓', 3), ('종이', 2), ('묘선', 1), ('청자', 1), ('은장도', 1), ('제조', 1), ('벼루', 1), ('농담', 1), ('윤', 1)], 'verb': [('의하', 1), ('그리', 1), ('찍', 1), ('차', 1), ('늘어놓', 1)], 'adverb': [('하지만', 1)]}}
```

References:
- This was copied from [Kollocate](https://github.com/Kyubyong/kollocate) and modified by Kss
</details>

<details>
<summary>3. g2p</summary>

This function provides a way to convert Korean graphemes to phonemes.
The 'grapheme' means a letter or a character, and the 'phoneme' means a sound.

Args:
- text (`Union[str, List[str], Tuple[str]]`): single text or list of texts
- descriptive (`bool`): return descriptive pronunciation, the 'descriptive' means a real-life pronunciation
- group_vowels (`bool`): If True, the vowels of the identical sound are normalized. (e.g. ㅒ -> ㅖ)
- to_syllable (`bool`): If True, hangul letters or jamo are assembled to form syllables.
- convert_english_to_hangul_phonemes (`bool`): If True, convert English to Hangul phonemes
- convert_numbers_to_hangul_phonemes (`bool`): If True, convert numbers to Hangul phonemes
- num_workers (`Union[int, str]`): the number of multiprocessing workers
- backend (`str`): morpheme analyzer backend. 'mecab', 'pecab' are supported
- verbose (`bool`): whether to print verbose outputs or not

Returns:
- `Union[str, List[str]]`: phoneme string or list of phoneme strings from the given text

Examples:
```python
>>> from kss import Kss
>>> g2p = Kss("g2p")
>>> text = "어제는 맑았는데 오늘은 흐리다."
>>> output = g2p(text)
>>> print(output)
"어제는 말간는데 오느른 흐리다."
```

References:
- This was copied from [g2pk](https://github.com/Kyubyong/g2pk) and modified by Kss
</details>

<details>
<summary>4. hangulize</summary>

This converts the given text to Hangul pronunciation.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- lang (`str`): source language code
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: Hangul pronunciation of the given text

Examples:
```python
>>> from kss import Kss
>>> hangulize = Kss("hangulize")
>>> text = "Giro d'Italia"
>>> output = hangulize(text, lang="ita")
>>> print(output)
"지로 디탈리아"
```

References:
- This was copied from [hangulize](https://github.com/sublee/hangulize) and modified by Kss
</details>

<details>
<summary>5. split_hanja</summary>

This splits the given text into hanja string and non-hanja string.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: hanja string and non-hanja string of the given text

Examples:
```python
>>> from kss import Kss
>>> split_hanja = Kss("split_hanja")
>>> text = "大韓民國은 民主共和國이다."
>>> output = split_hanja(text)
>>> print(output)
["大韓民國", "은 ", "民主共和國", "이다."]
```

References:
This was copied from [hanja](https://github.com/suminb/hanja) and modified by Kss
</details>

<details>
<summary>6. is_hanja</summary>

This checks if the given character is a hanja character.

Args:
- text (`Union[str, List[str], Tuple[str]`): single character or list of characters
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[bool, List[bool]]`: whether the given character is a hanja character or not

Examples:
```python
>>> from kss import Kss
>>> is_hanja = Kss("is_hanja")
>>> text = "大"
>>> output = is_hanja(text)
>>> print(output)
True
>>> text = "대"
>>> output = is_hanja(text)
>>> print(output)
False
```

References:
This was copied from [hanja](https://github.com/suminb/hanja) and modified by Kss
</details>

<details>
<summary>7. hanja2hangul</summary>

This converts hanja to hangul.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- combination (`bool`): whether to return hanja and hangul together or not
- reverse (`bool`): whether to reverse the order of hanja and hangul or not
- html (`bool`): whether to return html format or not
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: hanja to hangul converted text or list of texts

Examples:
```python
>>> from kss import Kss
>>> hanja2hangul = Kss("hanja2hangul")
>>> text = "大韓民國은 民主共和國이다."
>>> output = hanja2hangul(text)
>>> print(output)
"대한민국은 민주공화국이다."
```

References:
- This was copied from [hanja](https://github.com/suminb/hanja) and modified by Kss
</details>

<details>
<summary>8. h2j</summary>

This converts a string of Hangul to jamo.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: jamo string of the given text

Examples:
```python

>>> from kss import Kss
>>> h2j = Kss("h2j")
>>> text = "안녕하세요"
>>> output = h2j(text)
>>> print(output)
'안녕하세요'
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
</details>

<details>
<summary>9. h2hcj</summary>

This converts a string of Hangul to Hangul Compatibility Jamo.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: Hangul Compatibility Jamo string of the given text

Examples:
```python
>>> from kss import Kss
>>> h2hcj = Kss("h2hcj")
>>> text = "안녕하세요"
>>> output = h2hcj(text)
>>> print(output)
'ㅇㅏㄴㄴㅕㅇㅎㅏㅅㅔㅇㅛ'
```

References:
- This was copied from [hangul-jamo](https://github.com/jonghwanhyeon/hangul-jamo) and modified by Kss
</details>

<details>
<summary>10. j2h</summary>

This converts a string of jamo to Hangul.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- add_placeholder_for_leading_vowels (`bool`): add 'ㅇ' for leading vowels (e.g. 'ㅐ플' -> '애플')
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: Hangul string of the given text

Examples:
```python
>>> from kss import Kss
>>> j2h = Kss("j2h")
>>> text = '안녕하세요'
>>> output = j2h(text)
>>> print(output)
'안녕하세요'
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
    
</details>

<details>
<summary>11. j2hcj</summary>

This converts a string of jamo to Hangul Compatibility Jamo.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: Hangul Compatibility Jamo string of the given text

Examples:
```python
>>> from kss import Kss
>>> j2hcj = Kss("j2hcj")
>>> text = '안녕하세요'
>>> output = j2hcj(text)
>>> print(output)
'ㅇㅏㄴㄴㅕㅇㅎㅏㅅㅔㅇㅛ'
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
    
</details>

<details>
<summary>12. hcj2h</summary>

This converts a string of Hangul Compatibility Jamo to Hangul.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: Hangul string of the given text

Examples:
```python
>>> from kss import Kss
>>> hcj2h = Kss("hcj2h")
>>> text = 'ㅇㅏㄴㄴㅕㅇㅎㅏㅅㅔㅇㅛ'
>>> output = hcj2h(text)
>>> print(output)
'안녕하세요'
```

References:
- This was copied from [hangul-jamo](https://github.com/jonghwanhyeon/hangul-jamo) and modified by Kss
    
</details>

<details>
<summary>13. hcj2j</summary>

This converts a string of Hangul Compatibility Jamo to jamo.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- position (`str`): the position of the HCJ character to convert to jamo character, one of 'lead', 'vowel', 'tail'
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: jamo string of the given text

Examples:
```python
>>> from kss import Kss
>>> hcj2j = Kss("hcj2j")
>>> text = 'ㅇ'
>>> output = hcj2j(text)
>>> print(output)
'ᄋ'
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
    
</details>

<details>
<summary>14. is_jamo</summary>

This checks if a character is a jamo character.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[bool, List[bool]]`: whether the given character is a jamo character or not

Examples:
```python
>>> from kss import Kss
>>> is_jamo = Kss("is_jamo")
>>> text = 'ᄋ'
>>> output = is_jamo(text)
>>> print(output)
True
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
    
</details>

<details>
<summary>15. is_jamo_modern</summary>

This checks if a character is a modern jamo character.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[bool, List[bool]]`: whether the given character is a modern jamo character or not

Examples:
```python
>>> from kss import Kss
>>> is_jamo_modern = Kss("is_jamo_modern")
>>> text = 'ᄋ'
>>> output = is_jamo_modern(text)
>>> print(output)
True
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
    
</details>

<details>
<summary>16. is_hcj</summary>

This checks if a character is a Hangul Compatibility Jamo character.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[bool, List[bool]]`: whether the given character is a Hangul Compatibility Jamo character or not

Examples:
```python
>>> from kss import Kss
>>> is_hcj = Kss("is_hcj")
>>> text = 'ㅇ'
>>> output = is_hcj(text)
>>> print(output)
True
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
    
</details>

<details>
<summary>17. is_hcj_modern</summary>

This checks if a character is a modern Hangul Compatibility Jamo character.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[bool, List[bool]]`: whether the given character is a modern Hangul Compatibility Jamo character or not

Examples:
```python
>>> from kss import Kss
>>> is_hcj_modern = Kss("is_hcj_modern")
>>> text = 'ㅇ'
>>> output = is_hcj_modern(text)
>>> print(output)
True
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
    
</details>

<details>
<summary>18. is_hangul_char</summary>

This checks if a character is a Hangul character.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[bool, List[bool]]`: whether the given character is a Hangul character or not

Examples:
```python
>>> from kss import Kss
>>> is_hangul_char = Kss("is_hangul_char")
>>> text = '안'
>>> output = is_hangul_char(text)
>>> print(output)
True
```

References:
- This was copied from [jamo](https://github.com/JDongian/python-jamo) and modified by Kss
</details>

<details>
<summary>19. select_josa</summary>

This selects the correct josa for the given prefix.

Args:
- prefix (`Union[str, List[str]`): single prefix or list of prefixes
- josa (`Union[str, List[str]`): single josa or list of josas
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: the correct josa for the given prefix

Examples:
```python
>>> from kss import Kss
>>> select_josa = Kss("select_josa")
>>> prefix = "철수"
>>> josa = "은"
>>> output = select_josa(prefix, josa)
>>> print(output)
"는"
```

References:
- This was copied from [tossi](https://github.com/what-studio/tossi) and modified by Kss
</details>

<details>
<summary>20. combine_josa</summary>

This combines the given prefix and josa.

Args:
- prefix (`Union[str, List[str]`): single prefix or list of prefixes
- josa (`Union[str, List[str]`): single josa or list of josas
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[str, List[str]]`: the combined prefix and josa

Examples:
```python
>>> from kss import Kss
>>> combine_josa = Kss("combine_josa")
>>> prefix = "철수"
>>> josa = "은"
>>> output = combine_josa(prefix, josa)
>>> print(output)
"철수는"
```

References:
- This was copied from [tossi](https://github.com/what-studio/tossi) and modified by Kss
</details>

<details>
<summary>21. extract_keywords</summary>

This extracts keywords from the given text.
This uses TextRank algorithm to extract keywords.

Args:
- text (`Union[str, List[str]`): single text or list of texts
- num_keywords (`int`): the number of keywords to extract
- min_word_count (`int`): the minimum count of words
- max_word_length (`int`): the maximum length of words
- return_scores (`bool`): whether to return scores or not
- backend (`str`): morpheme analyzer backend. 'mecab', 'pecab' are supported
- noun_only (`bool`): whether to extract only nouns or not
- num_workers (`Union[int, str]`): the number of multiprocessing workers

Returns:
- `Union[List[str], List[Tuple[str, float]]]`: list of keywords or list of tuples of keywords and scores

Examples:
```python
>>> from kss import Kss
>>> extract_keywords = Kss("extract_keywords")
>>> text = ['여운이 크게남는영화 엠마스톤 너무 사랑스럽고 라이언고슬링 남자가봐도 정말 매력적인 배우인듯 영상미 음악 연기 구성 전부 좋았고 마지막 엔딩까지 신선하면서 애틋하구요 30중반에 감정이 많이 메말라있었는데 오랜만에 가슴이 촉촉해지네요',
...         '영상미도 너무 아름답고 신나는 음악도 좋았다 마지막 세바스찬과 미아의 눈빛교환은 정말 마음 아팠음 영화관에 고딩들이 엄청 많던데 고딩들은 영화 내용 이해를 못하더라ㅡㅡ사랑을 깊게 해본 사람이라면 누구나 느껴볼수있는 먹먹함이 있다',
...         '정말 영상미랑 음악은 최고였다 그리고 신선했다 음악이 너무 멋있어서 연기를 봐야 할지 노래를 들어야 할지 모를 정도로 그리고 보고 나서 생각 좀 많아진 영화 정말 이 연말에 보기 좋은 영화 인 것 같다',
...         '무언의 마지막 피아노연주 완전 슬픔ㅠ보는이들에게 꿈을 상기시켜줄듯 또 보고 싶은 내생에 최고의 뮤지컬영화였음 단순할수 있는 내용에 뮤지컬을 가미시켜째즈음악과 춤으로 지루할틈없이 빠져서봄 ost너무좋았음',
...         '처음엔 초딩들 보는 그냥 그런영화인줄 알았는데 정말로 눈과 귀가 즐거운 영화였습니다 어찌보면 뻔한 스토리일지 몰라도 그냥 보고 듣는게 즐거운 그러다가 정말 마지막엔 너무 아름답고 슬픈 음악이 되어버린',
...         '정말 멋진 노래와 음악과 영상미까지 정말 너무 멋있는 영화 눈물을 흘리면서 봤습니다 영화가 끝난 순간 감탄과 동시에 여운이 길게 남아 또 눈물을 흘렸던내 인생 최고의 뮤지컬 영화',
...         '평소 뮤지컬 영화 좋아하는 편인데도 평점에 비해 너무나 별로였던 영화 재즈음악이나 영상미 같은 건 좋았지만 줄거리도 글쎄 결말은 정말 별로 6 7점 정도 주는게 맞다고 생각하지만 개인적으로 후반부가 너무 별로여서',
...         '오랜만에 좋은 영화봤다는 생각들었구요 음악도 영상도 스토리도 너무나좋았고 무엇보다 진한 여운이 남는 영화는 정말 오랜만이었어요 연인끼리 가서 보기 정말 좋은영화 너뮤너뮤너뮤 재밌게 잘 봤습니다',
...         '음악 미술 연기 등 모든 것이 좋았지만 마지막 결말이 너무 현실에 뒤떨어진 꿈만 같다 꿈을 이야기하는 영화지만 과정과 결과에 있어 예술가들의 현실을 너무 반영하지 못한 것이 아닌가하는 생각이든다 그래서 보고 난 뒤 나는 꿈을 꿔야하는데 허탈했다',
...         '마지막 회상씬의 감동이 잊혀지질않는다마지막 십분만으로 티켓값이 아깝지않은 영화 음악들도 너무 아름다웠다옛날 뮤지컬 같은 빈티지영상미도 최고']
>>> output = extract_keywords(text, noun_only=True)
>>> print(output)
['마지막', '영화', '음악', '라이언고슬링', '뮤지컬']
>>> output = extract_keywords(text, noun_only=False)
>>> print(output)
['너무', '정말', '마지막', '영화', '음악']
```

References:
- This was copied from [KR-WordRank](https://github.com/lovit/KR-WordRank) and modified by Kss
</details>

<details>
<summary>22. split_morphemes</summary>

This splits texts into morphemes.

Args:
- text (`Union[str, List[str], Tuple[str]]`): single text or list/tuple of texts
- backend (`str`): morpheme analyzer backend. 'mecab', 'pecab' are supported.
- num_workers (`Union[int, str]`): the number of multiprocessing workers
- drop_space (`bool`): drop all spaces in output or not

Returns:
- `Union[List[Tuple[str, str]], List[List[Tuple[str, str]]], Union[List, Tuple]]`: outputs of morpheme analysis.

Examples:
```python
>>> from kss import Kss
>>> split_morphemes = Kss("split_morphemes")
>>> text = "아버지가방에들어오시다."
>>> output = split_morphemes(text)
>>> print(output)
[('아버지', 'NNG'), ('가', 'JKS'), ('방', 'NNG'), ('에', 'JKB'), ('들어오', 'VV'), ('시', 'EP'), ('다', 'EF'), ('.', 'SF')]
```    
</details>

<details>
<summary>23. paradigm</summary>

This searches paradigms of the given text.

Args:
- text (`Union[str, List[str], Tuple[str]`): single text or list of texts
- num_workers (`Union[int, str]`): the number of multiprocessing workers
- verbose (`bool`): whether to print the results or not

Returns:
- `Union[Dict[str, str], List[Dict[str, str]]]`: paradigms of the given text

Examples:
```python
>>> from kss import Kss
>>> paradigm = Kss("paradigm")
>>> text = "곱"
>>> output = paradigm(text)
>>> print(output)
{'Action Verb': [('거나', '곱거나'), ('거늘', '곱거늘'), ('거니', '곱거니'), ('거니와', '곱거니와'), ('거드면', '곱거드면'), ('거든', '곱거든'), ('건', '곱건'), ('건마는', '곱건마는'), ('것다', '곱것다'), ('게', '곱게'), ('겠', '곱겠'), ('고', '곱고'), ('고도', '곱고도'), ('고말고', '곱고말고'), ('관데', '곱관데'), ('기', '곱기'), ('기로', '곱기로'), ('기로니', '곱기로니'), ('기로서', '곱기로서'), ('기로서니', '곱기로서니'), ('기로선들', '곱기로선들'), ('기에', '곱기에'), ('네', '곱네'), ('니', '곱니'), ('다', '곱다'), ('다가', '곱다가'), ('다가는', '곱다가는'), ('다간', '곱다간'), ('다니', '곱다니'), ('다마다', '곱다마다'), ('더', '곱더'), ('더구나', '곱더구나'), ('더구려', '곱더구려'), ('더군', '곱더군'), ('더냐', '곱더냐'), ('더뇨', '곱더뇨'), ('더니', '곱더니'), ('더니라', '곱더니라'), ('더니마는', '곱더니마는'), ('더니만', '곱더니만'), ('더니이까', '곱더니이까'), ('더니이다', '곱더니이다'), ('더라', '곱더라'), ('더라나', '곱더라나'), ('더라니', '곱더라니'), ('더라니까', '곱더라니까'), ('더라도', '곱더라도'), ('더라며', '곱더라며'), ('더라면', '곱더라면'), ('더라면서', '곱더라면서'), ('더라손', '곱더라손'), ('더라지', '곱더라지'), ('더람', '곱더람'), ('더이까', '곱더이까'), ('더이다', '곱더이다'), ('던', '곱던'), ('던가', '곱던가'), ('던감', '곱던감'), ('던걸', '곱던걸'), ('던고', '곱던고'), ('던데', '곱던데'), ('던바', '곱던바'), ('던지', '곱던지'), ('데', '곱데'), ('데요', '곱데요'), ('도다', '곱도다'), ('되', '곱되'), ('든', '곱든'), ('든가', '곱든가'), ('든지', '곱든지'), ('듯', '곱듯'), ('듯이', '곱듯이'), ('소이까', '곱소이까'), ('죠', '곱죠'), ('지마는', '곱지마는'), ('지만', '곱지만'), ('지요', '곱지요'), ('게', '곱게'), ('고는', '곱고는'), ('누', '곱누'), ('디', '곱디'), ('소', '곱소'), ('지', '곱지'), ('아', '곱아'), ('아도', '곱아도'), ('아라', '곱아라'), ('아서', '곱아서'), ('아야', '곱아야'), ('아야만', '곱아야만'), ('아야지', '곱아야지'), ('아요', '곱아요'), ('아지이다', '곱아지이다'), ('았', '곱았'), ('았었', '곱았었'), ('았자', '곱았자'), ('으나', '곱으나'), ('으나마', '곱으나마'), ('으니', '곱으니'), ('으니까', '곱으니까'), ('으니까는', '곱으니까는'), ('으니만치', '곱으니만치'), ('으니만큼', '곱으니만큼'), ('으려니와', '곱으려니와'), ('으려면', '곱으려면'), ('으련마는', '곱으련마는'), ('으렷다', '곱으렷다'