Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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