Replies: 1 comment 1 reply
-
from kiwipiepy import Kiwi
kiwi = Kiwi()
tokens = kiwi.tokenize("이것은 예시 문장이에요~")
forms = [t.form for t in tokens]
print(forms) # ['이것', '은', '예시', '문장', '이', '에요', '~'] 빈도분석을 하고싶으시다면 python의 Counter 클래스를 이용하시면 됩니다. from collections import Counter
cnt = Counter(forms)
print(cnt.most_common())
# [('이것', 1), ('은', 1), ('예시', 1), ('문장', 1), ('이', 1), ('에요', 1), ('~', 1)] |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
분석하고 나온 결과 중
form 부분만 따로 추출할 수 있을까요?
아니면 form 만 나오게 설정할 수 있나요?
form 부분만 따로 빈도분석을 하고 싶은데 방법을 모르겠습니다.
Beta Was this translation helpful? Give feedback.
All reactions