Get language detect with majority of multiple columns

Asked
Active3 hr before
Viewed126 times

1 Answers

multiplecolumnsdetectlanguage
90%

I am trying to define a function that gives back the highest probability language, but for multiple columns, So if the first column hast a probability of (0

Example_snippet/controller/utility/_columns.js/ def _getLang(self, x): . . .
def _getLang(self, x):
   try:
   if not self._isBlank(df):
   return detect(df["col1"])
except:
   print("Error: ", df["col1"])
return ''