Skip to main content

An installable version of Techiaith's cy model for SpaCy

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spacy_cymraeg-0.1.1.tar.gz (51.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacy_cymraeg-0.1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file spacy_cymraeg-0.1.1.tar.gz.

File metadata

  • Download URL: spacy_cymraeg-0.1.1.tar.gz
  • Upload date:
  • Size: 51.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.4

File hashes

Hashes for spacy_cymraeg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dac3c0137af440aa91fafd67251db8f636b61e5cc924a0f8d658f364279dc31c
MD5 0563e97e2faa8da2a93ef9711d4cbfcd
BLAKE2b-256 162da523f4c233b775a36042915a6b4f8b5cb9bf6a81f2d86ed73078ed565929

See more details on using hashes here.

File details

Details for the file spacy_cymraeg-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spacy_cymraeg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 283e09249959e63964c39f700561a833605649ebb1d2c0ba4812db74fa6a5b8e
MD5 e9aba2c4647e0b32d70483ed05bf42fc
BLAKE2b-256 f3c22054c41d0cd0e05530f781683a2247c79bf426cda7e4eb851b5d8129d175

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page