Skip to main content

Draw dendrogram of similarity between text files

Project description

Tests

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

pip install dendro-text

If you run the dendro_text and get the following error message, please install dendro-text with docopt-ng.

$ dendro_text
Error: the Docopt module has not been installed. Install it with `pip install docopt-ng`.
pip install dendro-text[docopt-ng]

(To make dendro-text compatible with both docopt and docopt-ng, dependencies on them are now explicitly extra dependencies.)

To uninstall,

pip uninstall dendro-text

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

dendro_text-1.7.0.tar.gz (21.9 kB view details)

Uploaded Source

File details

Details for the file dendro_text-1.7.0.tar.gz.

File metadata

  • Download URL: dendro_text-1.7.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for dendro_text-1.7.0.tar.gz
Algorithm Hash digest
SHA256 2e6823da095a4af0ddad90bbc0ab16ab37b70a5ed3b897a315db95e114831696
MD5 6f6b16041c270b1db0a131d190ebf755
BLAKE2b-256 468d8c1640660bfeb68ac364b7674d77e1ae37910ab2b1b991b726884854c393

See more details on using hashes here.

Supported by

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