Multi Langauge Documents Langauge identification
Project description
seqtolang
seqtolang
is a python library for multi-langauge documents identification.
See this post for implementation details.
Getting Started
Install from source:
$ git clone https://github.com/hiredscorelabs/seqtolang
$ cd seqtolang
$ python setup.py install
or using PyPi:
$ pip install seqtolang
Basic usage:
from seqtolang import Detector
detector = Detector()
text = "In Chinese, the French phrase 'Je rentre chez moi Je rentre chez moi' will be '我正在回家'"
languages = detector.detect(text)
print(languages)
>>> [('fr', 0.499), ('en', 0.437), ('zh', 0.062)]
tokens = detector.detect(text, aggregated=False)
print(tokens)
>>> ['eng', 'eng', 'eng', 'eng', 'eng', 'fra', 'fra', 'fra', 'fra', 'fra', 'fra', 'fra', 'fra', 'eng', 'eng', 'zho']
seqtolang
support 36 languages:
['afr', 'eus', 'bel', 'ben', 'bul', 'cat', 'zho', 'ces', 'dan', 'nld', 'eng', 'est', 'fin', 'fra',
'glg', 'deu', 'ell', 'hin', 'hun', 'isl', 'ind', 'gle', 'ita', 'jpn', 'kor', 'lat', 'lit', 'pol',
'por', 'ron', 'rus', 'slk', 'spa', 'swe', 'ukr', 'vie']
Support
Getting Help
You can ask questions and join the development discussion on Github Issues
License
Apache License 2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
seqtolang-0.1.4.tar.gz
(4.5 kB
view hashes)
Built Distribution
seqtolang-0.1.4-py3-none-any.whl
(29.0 MB
view hashes)
Close
Hashes for seqtolang-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e1fc4a57356460d4d23c581373d7ff40ad5354cedf0d2eb0ad5a9d5956ef426 |
|
MD5 | f2c6319c468af68b3e8b5b9e93cb29ac |
|
BLAKE2b-256 | 1b4cae1a25dff2b06476b9c707642adea530ef45994a9986b9035d7418e980b1 |