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.
Metadata
Release files for word-alignment-visualization 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| word-alignment-visualization-0.1.3.tar.gz | 15.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| word_alignment_visualization-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.8 kB
Release files / word-alignment-visualization-0.1.3.tar.gz
| Download URL | word-alignment-visualization-0.1.3.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df24e5409c1c9a26131fbdbe4164abc97470b4f15c40f6ae3d127e6c899a442b
|
|
BLAKE2b-256 checksum How to use checksums |
fd10fe144fd8d1b865f3bcb345785efa71934364dc176c4026e0728db51b9bb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / word_alignment_visualization-0.1.3-py3-none-any.whl
| Download URL | word_alignment_visualization-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b18cb4bf85fbb88e4d6ece05bf7771bff0f960322d220ffd057ceb3e4707ecb9
|
|
BLAKE2b-256 checksum How to use checksums |
b7e21851a218fc46f521e90db42df907690e799b4dee594c900cff6cc39fdb44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|