Skip to main content

madai

Compute difference between two corpus by using chi2. Implementation is based on Measures for Corpus Similarity and Homogeneity.

I am not fully sure if this implementation is perfectly follow this paper. Feel free to make issues to point out some problems if you find.

Installation

pip install madai

Usage

madai implements two ways of computing similarity between two corpus, chi2 and spearman. Use spearman when two corpus are different in size.

Two target corpus need to be text files, each line containing one document/sentence.

madai chi2 /path/to/corpus/a /path/to/corpus/b

# or

madai spearman /path/to/corpus/a /path/to/corpus/b

To view parameters, run,

madai --help

Metadata

Release files for madai 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for madai 0.2.2
File Size Uploaded
madai-0.2.2.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for madai 0.2.2
File Interpreter ABI Platform
madai-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / madai-0.2.2.tar.gz

Download URL madai-0.2.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a3679f2835f358ec6bf17c79650beaba3e9e26152131fa2472446c442c4ad747
BLAKE2b-256 checksum
How to use checksums
ff14b8a281e3510b24a6f96aee647ac4a93db5ca2503f5887e2cb4248d7a8270
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.9.5 Darwin/22.4.0

Release files / madai-0.2.2-py3-none-any.whl

Download URL madai-0.2.2-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fbed4617e97723ec1c72cbd5fd3b2a05d70f9bd97731b9dcbf374b8c788a40b
BLAKE2b-256 checksum
How to use checksums
526988dddb9f5a3a2a5f7314e8ca93ddfb46ddd9a79a51895148435166c8de37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.9.5 Darwin/22.4.0

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page