Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] 매칭되는 키워드 없을 시 division by zero 에러 #1

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions extract_keyword.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def get_keyword(application):

## 전체 합계
total = p_cnt + c_cnt + ch_cnt + ps_cnt + l_cnt + it_cnt

if total == 0:
return top_5, [0, 0, 0, 0, 0, 0]

## 수치 계산
p_val = round(p_cnt / total * 100, 2)
Expand Down