Welsh

Priflythrennu Cymraeg // Welsh Language Capitalization

Dyma cydran syml a chyflym sydd yn priflythrennu geiriau o fewn destunau Cymraeg.

I'w ddefnyddio rhaid gosod Sacremoses

$ pip install sacremoses

A'i defnyddio fel hyn...

from sacremoses import MosesTruecaser
from huggingface_hub import hf_hub_download

tc_model_path = hf_hub_download(repo_id="techiaith/sacremoses-truecaser-cy", filename="tc.model")
mtr = MosesTruecaser(tc_model_path)

capitalized_str = mtr.truecase("mae pwllheli yn dref ym mhen llŷn", return_str=True)
print (capitalized_str)

Mae Pwllheli yn dref ym Mhen Llŷn
Downloads last month

-

Downloads are not tracked for this model. How to track
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.

Collection including techiaith/sacremoses-truecaser-cy