Skip to main content

No project description provided

Project description

Fishbowl

This library wraps two Rust-based language detection libraries, whatlang and whichlang, to provide fast language detection in Python. The former has a larger set of languages upon which is will do detection, but is also less confident about its detections. We use a strategy of first attempting to detect across that broader set, but if we receive a result the library is not confident about, we fall through to the latter, which always returns a result, but against a smaller set of languages. We are using PyO3 to wrap this Rust code.

Usage

from fishbowl import bulk_detect_language, detect_language

assert detect_language('Well hello there, General Kenobi').name == 'English'
assert detect_language('¿Hola, como estás hoy?').code == 'es'

bulk_input = [
    'Well hello there, General Kenobi',
    '¿Hola, como estás hoy?',
    'Ich bin ein Berliner',
]
bulk_output = bulk_detect_language(bulk_input)

assert [bo.code for _, bo in bulk_output] == ['en', 'es', 'de']
assert [input_str for input_str, _ in bulk_output] == bulk_input

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

fishbowl_detect-0.2.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distributions

fishbowl_detect-0.2.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

fishbowl_detect-0.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

fishbowl_detect-0.2.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

fishbowl_detect-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

fishbowl_detect-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

fishbowl_detect-0.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.5+ i686

fishbowl_detect-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

fishbowl_detect-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

fishbowl_detect-0.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.5+ i686

fishbowl_detect-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (747.1 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

fishbowl_detect-0.2.0-cp311-cp311-macosx_10_7_x86_64.whl (750.2 kB view hashes)

Uploaded CPython 3.11 macOS 10.7+ x86-64

fishbowl_detect-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

fishbowl_detect-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

fishbowl_detect-0.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

fishbowl_detect-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (747.1 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

fishbowl_detect-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl (750.2 kB view hashes)

Uploaded CPython 3.10 macOS 10.7+ x86-64

fishbowl_detect-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

fishbowl_detect-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

fishbowl_detect-0.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

fishbowl_detect-0.2.0-cp39-cp39-macosx_11_0_arm64.whl (747.8 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

fishbowl_detect-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl (750.8 kB view hashes)

Uploaded CPython 3.9 macOS 10.7+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page