Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def guess_language(html):
hits = dict()
htmlset = set(str(html).split(" "))
for lang in justext.get_stoplists():
hits[lang] = len(set(justext.get_stoplist(lang)).intersection(htmlset))
return max(hits, key=hits.get)