Py-hanspell

Pywiki
둘러보기로 가기 검색하러 가기

1 개요[편집 | 원본 편집]

네이버 맞춤법 검사기를 이용한 라이브러리.

1.1 사전 준비[편집 | 원본 편집]

과정 설명 방법
설치 pip install py-hanspell
불러오기 from hanspell import spell_checker

2 기초 사용법[편집 | 원본 편집]

의도 설명 방법
검사 텍스트를 넣거나 리스트를 넣어서 검사 가능.

result는 class 'hanspell.response.Checked' 타입으로 반환되는데.. 바로 써먹을 수는 없다.

result = spell_checker.check(text)
변형 써먹을 수 있는 사전 형태로 바꾼다.
의도 설명
검사 result는 class 'hanspell.response.Checked' 타입으로 반환되는데.. 바로 써먹을 수는 없다.
dict_result = result.as_dict()