semvec/pypi-packages huggingface dataset:
anton-util 0.0.2
Some small Python utilities for everyday convenience


Some small Python utilities for everyday convenience.

See code for more details about the utilities themselves.


A note on packaging/installation:
---------------------------------

Note that the package name and import name is
anton_util
not
anton-util
as in the pip install command shown on PyPI. If I remember, there is a bug somewhere in the Python distribution chain that replaces _ with - in package names. It seems to be around PyPI since the package import name and pip name is according to the pyproject.toml, ie anton_util. This is important, since
import anton-util
is invalid Python syntax while
import anton_util
works just fine.

pip install anton_util
seems to work too, so it might be more or less a display bug only.





//AB
textlangid 0.0.7
Detects the language of text
Requires Python: >=3.6

# Text language identifier

This package serves as a wrapper for the most performant text language identifier.

Currently it wraps fasttext (NLLB version).

Before detecting the language, it preprocesses the text to improve results.

## Usage

```python
%pip install textlangid

import textlangid

lang = textlangid.detect("This is some text.")

top_languages = TextLanguageIdentifier.detect(text, top_k=3)

top_languages_with_confidence = TextLanguageIdentifier.detect(
        text, top_k=3, return_confidence=True
    )

top_languages_with_threshold = TextLanguageIdentifier.detect(
        text, top_k=3, return_confidence=True, confidence_threshold=0.2
    )

```

The language is returned in a FLORES-200 language code.
Full list available [here](https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200).