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: 4 months 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 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-03T16:34:02.000Z (4 months ago)
- Last Synced: 2025-07-03T17:24:13.562Z (4 months ago)
- Topics: heatmap, nlp, sentiment-analysis, visualization
- Language: Julia
- Homepage:
- Size: 1.05 MB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# TextHeatmaps.jl
[](https://Julia-XAI.github.io/TextHeatmaps.jl/stable/)
[](https://Julia-XAI.github.io/TextHeatmaps.jl/dev/)
[](https://github.com/Julia-XAI/TextHeatmaps.jl/actions/workflows/CI.yml?query=branch%3Amain)
[](https://codecov.io/gh/Julia-XAI/TextHeatmaps.jl)
[](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