Alignment tool based on fast_align
Project description
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)
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,
target: list)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for systran_align-3.2.0-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c2aa17044c4279e6733614cd4d3baa656629bc8dc85eb72d851a46f2b683edc |
|
MD5 | 3e4e7f18201f2cffe0b1c47aa7ae1d90 |
|
BLAKE2b-256 | 5648093340f26db671cea8257f234e08e663c0e33037bc4c4aaa63036cea490b |
Close
Hashes for systran_align-3.2.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62b5d00d1a86824d4cdd88e9ed693b7747c5ae6e72f11763623b8639f0aff744 |
|
MD5 | bd33cf2bc3793a4e2a202ea352aefcaf |
|
BLAKE2b-256 | 3eb64a8fcc71aa5f133e16f16fff1fdc26817fd015cdc7d72b52bb6dab61ac6d |
Close
Hashes for systran_align-3.2.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0040a47e1144fc07c2e4e25a069556cef5a23e906548a97f193c7cd1855e6a4a |
|
MD5 | 67ced837676e3ef725d5399c8e50c541 |
|
BLAKE2b-256 | 5e85b4cbbbd86a11237fc3cd1c1d0badb84628b611d83b774ae5977eb537937a |
Close
Hashes for systran_align-3.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4ab82726e8387ce75ad842294f23d977ebd0d44872cb200e6b9af9c982a9ab1 |
|
MD5 | d95e0a2bc00932f59bd2a78b4459914d |
|
BLAKE2b-256 | 3a23e6de2e81bcc72c1547d1ebbc5199011167e87e9bb32b7f30172ae7bfefc9 |
Close
Hashes for systran_align-3.2.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1636bb8cb2c0a4a2f579a59e9c717003cac3d3b9846317abb24682343643c0a |
|
MD5 | 4650948cdc739d01dcafb9e415ac8b39 |
|
BLAKE2b-256 | d6d7c57d3b000212943296f1b6461ac408bdcbc8fa4f222f1a609ef218ba65ff |
Close
Hashes for systran_align-3.2.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 635373e76b2d4d0a467a6ae82933ed33f2fe666eadb1c41b8d357526b7a85941 |
|
MD5 | 2463d72e3c2b3471d5ebd0afa22a2480 |
|
BLAKE2b-256 | e123f846a0cc40367ee521ba6aaebb357f52fc0da0f11e7a2b646fda133e5634 |
Close
Hashes for systran_align-3.2.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 628955256000aef4ea9b712696fd28d2940f519e9e335a4cb0948e7a91ac1f82 |
|
MD5 | 002b16b1278642eaaee5a20b2064e5ef |
|
BLAKE2b-256 | fb5b4c34c689dafb2f561282b0da3c2be8441ffe86a3f5b03f8a774233093d47 |