Parallel corpus as a graph.
Project description
parallel-corpus
Parallel corpus as a graph.
Ported from Graph in spraakbanken/swell-editor.
Install
To install parallel-corpus in the current environment:
pip install parallel-corpus
To add parallel-corpus to a PDM project:
pdm add parallel-corpus
To add parallel-corpus manually to pyproject.toml:
[project]
dependencies = ["parallel-corpus>=0.2.0"]
Usage
first = "Jonathan saknades ."
# Initialize graph with source and target equal.
g = graph.init(first)
second = "Jonat han saknades ."
# Update target with new text.
gm = graph.set_target(g, second)
# The graph will now contain a edge from 'Jonathan' and both 'Jonat' and 'han'.
print(f"{gm.edges=}")
Changelog
This project keeps a changelog.
Supported Python Versions
This library thrives to support the following versions:
- v0.2: Python 3.9
- v0.1: Python 3.8
Development
This project uses conventional commits.
Tools used:
- uv for project management.
- pre-commit for pre-commit checking
- runs ruff linter
- runs ruff formatter
- checks that commit message is according conventional commits.
- install hooks with
pre-commit install.
- git-cliff for changelog updates.
- bump-my-version for version bumping.
- syrupy for snapshot testing.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parallel_corpus-0.2.0.tar.gz.
File metadata
- Download URL: parallel_corpus-0.2.0.tar.gz
- Upload date:
- Size: 41.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a0c364cac766e99f8ebb3d2f0cb5b83dfb01037e3c4b4983969e2b516d66dd
|
|
| MD5 |
4d52342b54a78e8e64259727fecbdf5a
|
|
| BLAKE2b-256 |
8d25f9aeb2d775b3b3a842b51125ada4f6f92aa47a527645cc4c45076ae24065
|
Provenance
The following attestation bundles were made for parallel_corpus-0.2.0.tar.gz:
Publisher:
release.yml on spraakbanken/parallel-corpus-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parallel_corpus-0.2.0.tar.gz -
Subject digest:
40a0c364cac766e99f8ebb3d2f0cb5b83dfb01037e3c4b4983969e2b516d66dd - Sigstore transparency entry: 149524183
- Sigstore integration time:
-
Permalink:
spraakbanken/parallel-corpus-py@3f7c4d3abbfbfbd657ac849fbffbdbf85a46801a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/spraakbanken
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f7c4d3abbfbfbd657ac849fbffbdbf85a46801a -
Trigger Event:
push
-
Statement type:
File details
Details for the file parallel_corpus-0.2.0-py3-none-any.whl.
File metadata
- Download URL: parallel_corpus-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14e6f375101839091ce98c5bee14cfc6dfa42b25635f10b89e19f4b9447e1a9e
|
|
| MD5 |
b32b55963aa98b8240a9f28918a38b48
|
|
| BLAKE2b-256 |
424e4e831c9ca3ef8428b7e97501f02b8a226185a634c6a0c2f68b7bdd021253
|
Provenance
The following attestation bundles were made for parallel_corpus-0.2.0-py3-none-any.whl:
Publisher:
release.yml on spraakbanken/parallel-corpus-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parallel_corpus-0.2.0-py3-none-any.whl -
Subject digest:
14e6f375101839091ce98c5bee14cfc6dfa42b25635f10b89e19f4b9447e1a9e - Sigstore transparency entry: 149524186
- Sigstore integration time:
-
Permalink:
spraakbanken/parallel-corpus-py@3f7c4d3abbfbfbd657ac849fbffbdbf85a46801a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/spraakbanken
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3f7c4d3abbfbfbd657ac849fbffbdbf85a46801a -
Trigger Event:
push
-
Statement type: