Batch doesn't seem to work
I try entering a list of caption into detect, but I always receive a List[Dict] instead of List[List[Dict]]. I used python, it didn't work in my case so I tried with a smaller code, did not work as well. That is my code:
import os
import detectlanguage
detectlanguage.configuration.apikey = os.getenv('DETECTLANGUAGETOKEN')
if _name__ == 'main ':
result = detectlanguage.detect(['Buenos dias señor ', 'Labas rytas'])
print(result)
And the results is:
[{'language': 'es', 'isReliable': True, 'confidence': 10.24}]
Code after the main as indentation, but it is correcting the rendering in the feedback :)
Update, I didn't find the version to put in requirement.txt, so I put languagedetection==1.0.0 My bad! The good version was 1.4.0 :) Works well :)
-
AdminLaurynas (Admin, Detect Language) commented
Good to know your issue was resolved.