Skip to content

Instantly share code, notes, and snippets.

@manmohan24nov
Created January 20, 2021 10:11
Show Gist options
  • Select an option

  • Save manmohan24nov/d287a9e2fab49fe583e9711248112ad1 to your computer and use it in GitHub Desktop.

Select an option

Save manmohan24nov/d287a9e2fab49fe583e9711248112ad1 to your computer and use it in GitHub Desktop.
>>> text_content = "Er lebt mit seinen Eltern und seiner Schwester in Berlin. Welcome, to this world of Data Scientist. Today is a lovely day."
>>> doc = nlp(text_content)
>>> detect_language = doc._.language
>>> print(detect_language)
{'language': 'en', 'score': 0.8571372625765084}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment