Spacy Cymraeg
A package makes the cy language package from github.com/techiaith/spacy/
installable and usable without having to modify the files within the virtual environment.
Install package
To install the package using uv run the following command:
uv add spacy-cymraeg
or you can install the repository directly like so:
uv add git+https://gitlab.com/prvInSpace/spacy-cymraeg
Using the package
The language is not loaded by default, so you need to register the language. You can do this by adding the following line of code to your code:
import spacy_cymraeg
By importing the package the language gets registered as cy which means that you can use models that depend on it
such as the cy_techiaith_tag_lem_ner_lg pipeline which you can find on github.com/techiaith/spacy_cy_tag_lem_ner_lg.
To use the package with cy_techiaith_tag_lem_ner_lg please also install that package by running the following command:
uv add https://github.com/techiaith/spacy_cy_tag_lem_ner_lg/releases/download/23.03/cy_techiaith_tag_lem_ner_lg-0.0.1.tar.gz"
and then you can use it on code like so:
import spacy
import spacy_cymraeg
nlp = spacy.load("cy_techiaith_tag_lem_ner_lg")
doc = nlp("Lansiodd David Hill Jones ei gyfrol newydd The Singularity Show yn nigwyddiad y Cyngor Llyfrau yn Aberystwyth yn gynharach heddiw.")
for item in [(t, t.lemma_, t.pos_, t.morph, t.ent_type_, t.vector_norm) for t in doc]:
print (item)
N.B.: Note that cy_techiaith_tag_lem_ner_lg depends on a numpy<2, so make sure that you are using something like 1.26 or something.
Metadata
Release files for spacy-cymraeg 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spacy_cymraeg-0.1.1.tar.gz | 51.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spacy_cymraeg-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.7 kB
Release files / spacy_cymraeg-0.1.1.tar.gz
| Download URL | spacy_cymraeg-0.1.1.tar.gz |
|---|---|
| Size | 51.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dac3c0137af440aa91fafd67251db8f636b61e5cc924a0f8d658f364279dc31c
|
|
BLAKE2b-256 checksum How to use checksums |
162da523f4c233b775a36042915a6b4f8b5cb9bf6a81f2d86ed73078ed565929
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.4
|
Release files / spacy_cymraeg-0.1.1-py3-none-any.whl
| Download URL | spacy_cymraeg-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
283e09249959e63964c39f700561a833605649ebb1d2c0ba4812db74fa6a5b8e
|
|
BLAKE2b-256 checksum How to use checksums |
f3c22054c41d0cd0e05530f781683a2247c79bf426cda7e4eb851b5d8129d175
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.4
|