Skip to main content

spacy_fastlang

Install

Assuming you have a working python environment, you can simply install it using

pip install spacy_fastlang

Usage

The library exports a pipeline component called language_detector that will set two spacy extensions

  • doc._.language = ISO code of the detected language or xx as a fallback
  • doc._.language_score = confidence
import spacy_fastlang  # noqa: F401 # pylint: disable=unused-import
nlp = spacy.load("...")
nlp.add_pipe("language_detector")
doc = nlp(en_text)

doc._.language == "..."
doc._.language_score >= ...

Options

Check the tests to see more examples and available options

License

Everythin is under MIT except the default model which is distributed under Creative Commons Attribution-Share-Alike License 3.0 by facebook here

Metadata

Release files for spacy_fastlang 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spacy_fastlang 2.1.0
File Size Uploaded
spacy_fastlang-2.1.0.tar.gz 782.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spacy_fastlang 2.1.0
File Interpreter ABI Platform
spacy_fastlang-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / spacy_fastlang-2.1.0.tar.gz

Download URL spacy_fastlang-2.1.0.tar.gz
Size 782.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e10e7056275926211e5453e2e4f7047fec83e1c3c84f50f0a1b9229d33b83801
BLAKE2b-256 checksum
How to use checksums
d5b9845453dbaf261dd4623b30a79038718c554af719ee1afd639675bfbcee18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

Release files / spacy_fastlang-2.1.0-py3-none-any.whl

Download URL spacy_fastlang-2.1.0-py3-none-any.whl
Size 780.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
401a5838f7f483ba8efd93ab420317bbc16223fe07a28a9d89747e8bacdbb2d2
BLAKE2b-256 checksum
How to use checksums
63f5ae0e5d30979c4090f12178f31c8fb08f7d43458f48f55233e3cb2b0709a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page