Repository navigation
Expand file tree
/
Copy pathtest.py
More file actions
20 lines (15 loc) · 2.91 KB
/
Copy pathtest.py
File metadata and controls
20 lines (15 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import CurseWordDetector
import time
# 탐지기 및 사운드 기반 객체 초기화
detector = CurseWordDetector.detector()
sound = CurseWordDetector.SoundBase()
# 입력 문장
text = "뒤져라 이 개새끼야"
# detect
filtered_text, detected = detector.detect(text)
# 결과
print(filtered_text) # 필터링된 문장 출력
if detected:
print("비속어가 포함되어 자동 처리되었습니다.") # 비속어 탐지 시 추가 출력
else:
print("비속어가 포함되지 않았습니다.") # 비속어가 없을 경우 출력