systran-align
systran-align is a small alignment tool that is based on https://github.com/clab/fast_align.
Installation
pip install systran-align
Usage
import systran_align
Generating alignment probabilities
systran_align.generate_alignment_probabilities(
input_path: str,
forward_probs_path: str,
backward_probs_path: str,
verbose: bool = False,
iterations: int = 5,
favor_diagonal: bool = False,
beam_threshold: float = -4,
diagonal_tension: float = 4,
optimize_tension: bool = False,
variational_bayes: bool = False,
alpha: float = 0.01,
no_null_word: bool = False,
prob_align_null: float = 0.08,
thread_buffer_size: int = 10000,
)
Inputs:
input_path: text file where each line is a source-target example with format:
<source> ||| <target>
Outputs:
forward_probs_path: binary file containing forward probabilitiesbackward_probs_path: binary file containing backward probabilities
Computing alignments
aligner = systran_align.Aligner(
forward_probs_path: str,
backward_probs_path: str,
)
# result is a dict with fields:
# * alignments
# * forward_log_prob
# * backward_log_prob
result = aligner.align(
source: List[str],
target: List[str],
)
# Batch alternative:
results = aligner.align_batch(
source: List[List[str]],
target: List[List[str]],
)
Metadata
Release files for systran-align 3.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| systran_align-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.17+ x86-64 | Details |
| systran_align-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details |
| systran_align-3.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ x86-64 | Details |
| systran_align-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details |
| systran_align-3.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ x86-64 | Details |
| systran_align-3.5.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.17+ x86-64 | Details |
Total release size: 7.9 MB
Release files / systran_align-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | systran_align-3.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
60417a3f63e10f92bb101b7265fde50c6cd38f0cc915f83af8c62b282f92cf8e
|
|
BLAKE2b-256 checksum How to use checksums |
43b9e1ed8233345e74693cf28cba222293a86ca5c1d29c44a023b279da49b469
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / systran_align-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | systran_align-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
129009cc00f8a6d1d73d2d6e0b57898d291fa58480ba8e8b82606975b058d65a
|
|
BLAKE2b-256 checksum How to use checksums |
c327231a66e9414f68f40b20309011efd991b63dce3fed66a93b7e77763a07b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / systran_align-3.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | systran_align-3.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b37ebedf0454a92d282c5f9ac26de5e39777f9d751e819ffa98b2ea0c0770e8a
|
|
BLAKE2b-256 checksum How to use checksums |
423c1dfdf25601eed6c35c6eb9c4a7257a1350f4cc113875417edce8789484c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / systran_align-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | systran_align-3.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
bd3c030725f37b084cefe0a2dc564cc0d91da95a7cbaea4a9cdb05548728472e
|
|
BLAKE2b-256 checksum How to use checksums |
8cdb22cff305f010e01a6de25c3e5a98db8abd0f49cbadd6a43f7ad24f3bb1d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / systran_align-3.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | systran_align-3.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f70ea915a81bad454116c23d5c3a398527cf10f41f3828f681296e73381a42bc
|
|
BLAKE2b-256 checksum How to use checksums |
ffd3cce5aea7efa0e046bf2b7044de498a8e1ac25cb76e5e3d2e9acbc7626b95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / systran_align-3.5.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | systran_align-3.5.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
09e9ce3926f4df989ed934541f02f404d36420880a6353a32495aa9c22368b97
|
|
BLAKE2b-256 checksum How to use checksums |
88dc57844870a0bfc8fc5f7935e8e325585fc92b071e3e4857883e9203d9265c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for systran-align 3.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.