Language Detector

A tool for determining the language of a body of text.

To use in an API class, follow the standard convention accessing the tools property that Sermos injects.

Example:

class DemoApiClass(object):
    def post(self):
        TODO: Example

To use in a worker method, follow the standard convention accessing the tools argument that Sermos injects.

Example:

def demo_worker_task(event, tools):
    TODO: Example
class sermos_tools.catalog.language_detector.language_detector.LanguageDetector(full_text: str)

Detect the language of a set of text.

Usage:

detector = LanguageDetector(full_text='my full text here')
language = detector.detect_lang()
is_english = detector.is_english()