Skip to main content

A Welsh grammaticality util based on Cysill

Project description

Cysgor

Cysill wrapper to score Welsh texts' grammaticality. As it connects to the Cysill API, ensure to have a working internet connexion before using it.

As a CLI

There are two ways to use the CLI, either by entering a text file's path, or directly a text. The CLI returns a string of numbers representing the grammaticality score of the text.

# With a text as a positional character
cysgor "Mae hen gwlad fy tadau yn annwyl i mi!"
# With a -p or --path flag
cysgor --path src/cysgor/assets/text-sample.txt

or alternatively with the pipe operator:

cat src/cysgor/assets/text-sample.txt | cysgor 

As a library

One can also use this package as a python library:

from cysgor import get_score, get_mistakes

# get the scores
df["scores"] = df["texts"].apply(get_score)
# returns a list of mistakes for each text
df["mistakes"] = df["texts"].apply(get_mistakes)

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

cysgor-0.1.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

cysgor-0.1.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cysgor-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cysgor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 597441e426f255aa05a728a10fe901caa5052d1844c369a0c052b2dd96636eaf
MD5 46cfdff5d166d5c7a2797ad0b21d085c
BLAKE2b-256 b0ea13b40a7ad49c58e28febf2ea697435ef5ac7e2eb7811ecbce59dc90e5c69

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cysgor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cysgor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 111796792f05f2ee968ae00b60dd79afa47586dc8aff6143fc0a61944534e50f
MD5 d9a4dfa49814e75a8b9c6b53483a886e
BLAKE2b-256 10db89e2794ec8d50628d6c781ea6c2b99dd8d6f445a647e0db41b99b91bd57b

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