from hanspell import spell_checker text = "안녕하세요반갑습니다." result = spell_checker.check(text) print(type(result))
dict_result = result.as_dict() print(dict_result)

| CONST | int | error |
|---|---|---|
| PASSED | 0 | 맞춤법 검사 결과 문제가 없는 단어 또는 구절 |
| WRONG_SPELLING | 1 | 맞춤법에 문제가 있는 단어 또는 구절 |
| WRONG_SPACING | 2 | 띄어쓰기에 문제가 있는 단어 또는 구절 |
| AMBIGUOUS | 3 | 표준어가 의심되는 단어 또는 구절 |
| STATISTICAL_CORRECTION | 4 | 통계적 교정에 따른 단어 또는 구절 |

result = spell_checker.check(['안녕하세요반갑습니다.','이것은리스트입니다.']) print(type(result)) #list
리스트의 각 요소에 hanspell 타입의 결과값들이 저장된다.

hanspell 타입의 attribute에 접근하여 결과값을 추출할 수 있다.
