Skip to main content

No project description provided

Project description

Word Alignment Visualization

Screenshot of the 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

word-alignment-visualization-0.1.3.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

word_alignment_visualization-0.1.3-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file word-alignment-visualization-0.1.3.tar.gz.

File metadata

File hashes

Hashes for word-alignment-visualization-0.1.3.tar.gz
Algorithm Hash digest
SHA256 df24e5409c1c9a26131fbdbe4164abc97470b4f15c40f6ae3d127e6c899a442b
MD5 f77acb4b17ef57c425b3e91146b9a0a8
BLAKE2b-256 fd10fe144fd8d1b865f3bcb345785efa71934364dc176c4026e0728db51b9bb3

See more details on using hashes here.

File details

Details for the file word_alignment_visualization-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for word_alignment_visualization-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b18cb4bf85fbb88e4d6ece05bf7771bff0f960322d220ffd057ceb3e4707ecb9
MD5 67e2ef0b4e16628dbe0907ba7a897ba5
BLAKE2b-256 b7e21851a218fc46f521e90db42df907690e799b4dee594c900cff6cc39fdb44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page