Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julia-xai/textheatmaps.jl
Heatmap text in Julia.
https://github.com/julia-xai/textheatmaps.jl
heatmap nlp sentiment-analysis visualization
Last synced: 13 days ago
JSON representation
Heatmap text in Julia.
- Host: GitHub
- URL: https://github.com/julia-xai/textheatmaps.jl
- Owner: Julia-XAI
- License: mit
- Created: 2023-10-04T22:45:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-27T20:01:49.000Z (4 months ago)
- Last Synced: 2024-07-28T15:40:44.259Z (4 months ago)
- Topics: heatmap, nlp, sentiment-analysis, visualization
- Language: Julia
- Homepage:
- Size: 872 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# TextHeatmaps.jl
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://Julia-XAI.github.io/TextHeatmaps.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://Julia-XAI.github.io/TextHeatmaps.jl/dev/)
[![Build Status](https://github.com/Julia-XAI/TextHeatmaps.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/Julia-XAI/TextHeatmaps.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/Julia-XAI/TextHeatmaps.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/Julia-XAI/TextHeatmaps.jl)
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)TextHeatmaps.jl is a lightweight Julia package for visualization of numerical values associated with text.
## Installation
To install this package and its dependencies, open the Julia REPL and run```julia-repl
]add TextHeatmaps
```## Example
Assume you have the following values associated with words in a sentence:
```julia
text = "I loved the concert but not the opening act"
words = split(text)
val = [0.1, 2.5, 0.0, 0.3, -0.6, -1.4, 0.0, 0.1, -0.1]
```These values could for example come from a sentiment analysis model.
Using the heatmap function, we can visualize the values:
![Heatmap in Julia-REPL][heatmap-repl]
This not only works in the REPL, but also as HTML output in notebooks and on websites:
![Heatmap in Pluto][heatmap-pluto]
The color scheme of the `heatmap` is customizable:
![Heatmap in Documenter][heatmap-settings]
For more information, refer to the [package documentation](https://Julia-XAI.github.io/TextHeatmaps.jl/stable/).
## Related packages
* [VisionHeatmaps.jl](https://github.com/Julia-XAI/VisionHeatmaps.jl):
Sibling package for visualization of input space attributions for vision models.
* [ExplainableAI.jl](https://github.com/Julia-XAI/ExplainableAI.jl):
TextHeatmaps.jl was designed as a dependency for visualization of attributions from ExplainableAI.jl.[heatmap-repl]: https://raw.githubusercontent.com/Julia-XAI/TextHeatmaps.jl/gh-pages/assets/heatmap_repl.png
[heatmap-pluto]: https://raw.githubusercontent.com/Julia-XAI/TextHeatmaps.jl/gh-pages/assets/heatmap_pluto.png
[heatmap-settings]: https://raw.githubusercontent.com/Julia-XAI/TextHeatmaps.jl/gh-pages/assets/heatmap_settings.png