langident
custom_code

impresso-langident

Detects the language for impresso-like historical newspaper data in the languages: German (de), French (fr), Italian (it), English (en), and Luxembourgish (lb).

How to install

pip install transformers floret

How to run:

from transformers import pipeline

MODEL_NAME = "impresso-project/impresso-langident"

lang_pipeline = pipeline(
    "langident",
    model=MODEL_NAME,
    trust_remote_code=True,
    device="cpu",
)

text = """En l'an 1348, au plus fort des ravages de la peste noire à travers
l'Europe, le Royaume de France se trouvait à la fois au bord du désespoir et
face à une opportunité."""

langs = lang_pipeline(text)
print(langs)
Downloads last month
10
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.