Package translate :: Package lang :: Module identify
[hide private]
[frames] | no frames]

Module identify

source code

This module contains functions for identifying languages based on language models.

It wraps libtextcat to get the language identification functionality.

To use first create an instance of LanguageIdentifier and then use the methods identify or identify_store to detect the language in a string or in a translation store respectively.

Classes [hide private]
  LanguageIdentifier
Variables [hide private]
  names = ['textcat', 'libtextcat']
  textcat = cdll.LoadLibrary('libtextcat.so')

Imports: Union, c_wchar, c_double, CFUNCTYPE, byref, pointer, alignment, c_longlong, c_short, oledll, HRESULT, c_ulong, c_int, WinError, memmove, addressof, c_buffer, cdll, memset, string_at, sizeof, WINFUNCTYPE, create_string_buffer, create_unicode_buffer, c_long, c_char_p, ArgumentError, LittleEndianStructure, RTLD_LOCAL, c_ushort, py_object, wstring_at, c_wchar_p, windll, PyDLL, DEFAULT_MODE, WinDLL, gestalt, ARRAY, DllCanUnloadNow, CDLL, c_ubyte, RTLD_GLOBAL, c_char, c_float, SetPointerType, resize, cast, c_int8, c_byte, OleDLL, GetLastError, c_ulonglong, set_conversion_mode, c_voidp, pythonapi, PYFUNCTYPE, BigEndianStructure, pydll, Structure, c_uint, c_void_p, FormatError, Array, c_size_t, c_uint8, DllGetClassObject, LibraryLoader, POINTER, ctypes, normalize, iso639, unicodedata, simplercode, forceunicode, gettext_lang, dialectre, gettext, languages, re, tr_lang, gettext_country, iso3166