PhisHunter / utils /lang_detect.py
moraeslucas's picture
First Commit with 25 files
fdff15a verified
raw
history blame contribute delete
239 Bytes
from langdetect import detect, DetectorFactory
# Garante resultados consistentes
DetectorFactory.seed = 0
def detect_language(text):
try:
lang = detect(text)
return lang
except Exception:
return "unknown"