https://github.com/tos-kamiya/dendro_text
Draw dendrogram of similarity between text files.
https://github.com/tos-kamiya/dendro_text
cli-tool dendrogram nlp
Last synced: 3 months ago
JSON representation
Draw dendrogram of similarity between text files.
- Host: GitHub
- URL: https://github.com/tos-kamiya/dendro_text
- Owner: tos-kamiya
- License: bsd-2-clause
- Created: 2019-06-16T05:24:42.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-17T16:42:59.000Z (over 1 year ago)
- Last Synced: 2025-07-06T04:40:12.308Z (7 months ago)
- Topics: cli-tool, dendrogram, nlp
- Language: Python
- Homepage:
- Size: 214 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-pypi.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/tos-kamiya/dendro_text/actions/workflows/tests.yaml)
dendro_text
===========
Draw a dendrogram of similarity between text files.
The similarity is measured in terms of **Damerau-Levenshtein edit distance**.
The distance between given two texts is a count of inserted, deleted, and substituted characters required to modify one text to the other.
A smaller value means that the two texts are more similar.
Features:
* **Parallel execution**: Supports execution on multiple CPU cores. Plus, jit compilation by Numba (v1.6+).
* **Options in tokenization**: By default, the text is compared with a sequence of words extracted by splitting input text into different character types. Optionally, you can compare texts line by line, character by character, or token by token as extracted with lexical analyzers of programming languages.
* **File-centric search**: A function to list files in order of similarity to a given file.
* **Diff (Experimental)**: Diff functionality to show textual differences between files. (This function is provided to check for differences in similarity calculations depending on tokenization.)
## Installation
```sh
pipx install dendro-text
```
To uninstall,
```sh
pipx uninstall dendro-text
```