No project description provided
Project description
Word Alignment Visualization
Overview
Word Alignment Visualization is a Python package designed to facilitate the visual exploration of word alignments between two sentences. The package provides an interactive widget that displays original and translated sentences with word alignment lines.
Features
- Dynamic visualization of word alignments.
- Hover effects for highlighting word pairs and alignment lines.
- Easy integration into Jupyter notebooks.
Usage
from word_alignment_visualization import show_word_alignments
# Example data
src_tokens = ["I", "love", "coding"]
tgt_tokens = ["J'aime", "coder"]
alignment = [[0, 0], [1, 0], [2, 1]]
# Display word alignment visualization
show_word_alignments(src_tokens, tgt_tokens, alignment)
Installation
pip install word-alignment-visualization
Contributions
Contributions are welcome! If you have ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request.
License
This project is licensed under the GNU GPLv3 License.
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for word-alignment-visualization-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02e983ba7ebe21bd87a28fb8c43d11fec7fc6b3e25c2d0035aa4c4cc4fac4a86 |
|
MD5 | 7b6988eb58f794ff04e0cc028c1b037e |
|
BLAKE2b-256 | 128f721da16cda6a9bbab0b8d98fb0b6a6207610ac4c9db66ecbe1ff3e120b73 |
Close
Hashes for word_alignment_visualization-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3211a2fe7f8c523f5af0c6eac3fca63ecdd4e56c147d7099d2fac6cdb9b4d8d3 |
|
MD5 | e33d38d6c42083729e6795ce8800bf36 |
|
BLAKE2b-256 | 2facc548dc95535aacd9f2dff9003cdb8256f452770826f1cf600f07b399bb6b |