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.0.tar.gz (20.9 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.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spacy_cymraeg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 35f9e24c957baf71e6aed0161cc35a9f7abd9d5bf0f564abefe2f27500851fc5
MD5 3bc55e49211a0d513fb3d1b55aa15977
BLAKE2b-256 568de3ef6f5ba2197427b030c7b4d3e22f4bdcc5731dc9ee925a4701fa907e61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spacy_cymraeg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b63694b51d6c985854d0c5975f9978a54eb894a39156d1101a0b4bc22116e9a8
MD5 28ccf598fa6235eb6087298595dd5605
BLAKE2b-256 a888004acf6722c8cce8de69cdf7b636bb1c1ca5c4ccdc58c6fa6104fd9af7c2

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