Skip to main content

CollateX is a collation tool.

Project description

CollateX is a software to

  • read multiple (≥ 2) versions of a text, splitting each version into parts (tokens) to be compared,

  • identify similarities of and differences between the versions (including moved/transposed segments) by aligning tokens, and

  • output the alignment results in a variety of formats for further processing, for instance to support the production of a critical apparatus or the stemmatical analysis of a text’s genesis.

Features

  • Non progressive multiple sequence alignment

  • Multiple output formats: alignment table, variant graph

  • Near matching (optional)

  • Supports Python 3

  • Supports unicode (Python 3 only)

How to install:

Mac/Linux: sudo pip3 install –pre collatex

if you don’t have pip installed, install it first with: sudo easy_install3 pip

For near matching functionality python-levenshtein C library is required.

Install it with (on Mac OS X and Linux):

sudo pip3 install python-levenshtein

Windows users need a precompiled binary distribution of this library if they want to use near matching.

Simple example:

from collatex import *

collation = Collation()
collation.add_plain_witness("A", "The quick brown fox jumps over the dog.")
collation.add_plain_witness("B", "The brown fox jumps over the lazy dog.")

alignment_table = collate(collation)

Add

print(alignment_table)

to show the results.

When running from the command shell run the example script with:

python3 ./nameofscript.py

History

2.0.0pre11 (2014-12-02)

  • Bug-fix: collate_pretokenize_json function should not re-tokenized the content. Thanks to Tara L. Andrews.

  • Allow near-matching for plain as well as for pre-tokenized content. Thanks to Tara L. Andrews.

  • Added HTML option to collate function for the output as an alignment table represented as HTML.

2.0.0pre10 (2014-11-13)

  • Added support for Unicode character encoding

  • Ported codebase from Python 2 to Python 3

  • Separated IPython display logic from functional logic. No longer will the collate function try to determine whether you are running an environment that is capable of display HTML or SVG.

2.0.0pre9 (2014-10-02)

  • Added near matching option to collate function.

  • Added variant or invariant status to columns in alignment table object and JSON output.

  • Added experimental A* decision graph search optimization.

2.0.0pre8 (2014-09-18)

  • Added WordPunctuationTokenizer (treats punctuation as separate tokens).

  • Combined suffix array and edit graph aligner approaches into one collation algorithm.

2.0.0pre7 (2014-07-14)

  • Fixed handling of segmentation parameter in pretokenized JSON function.

2.0.0pre6 (2014-06-30)

  • Added Windows support. Thanks to David J. Birnbaum.

  • Fixed handling of IPython imports.

2.0.0pre5 (2014-06-11)

  • Added JSON output to collate method.

  • Added option to collate method to enable or disable parallel segmentation.

  • Added table output to collate_pretokenized_json method, next to the already existing JSON output.

  • Cached the suffix and LCP arrays to prevent unnecessary recalculation

  • Fixed handling of empty cells in JSON output of pretokenized JSON.

  • Fixed compatibility issue when rendering HTML or SVG with IPython 2.1 instead of IPython 0.13.

  • Corrected RST syntax in package info description.

2.0.0pre4 (2014-06-11)

  • Added pretokenized JSON support.

  • Added JSON visualization for the alignment table.

2.0.0pre3 (2014-06-10)

  • Fixed imports in init.py, “from collatex import *” now works correctly.

  • Added IPython HTML support for alignment table.

  • Added IPython SVG support for variant graph.

  • Added convenience constructors on Collation object.

  • Added horizontal layout for the alignment table visualization, next to vertical one.

2.0.0pre2 (2014-06-09)

  • Removed max 6 witness limit in aligner, now n number of witnesses can be aligned.

  • Added transposition detection.

  • Added alignment table plus plain text visualization.

  • Added collate convenience function.

2.0.0pre1 (2014-06-02)

  • First release on PyPI.

  • First pure Python development release of CollateX.

  • New collation algorithm, which does non progressive multiple witness alignment.

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

collatex-2.0.0pre11.tar.gz (64.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

collatex-2.0.0pre11-py3.3.egg (86.9 kB view details)

Uploaded Egg

File details

Details for the file collatex-2.0.0pre11.tar.gz.

File metadata

  • Download URL: collatex-2.0.0pre11.tar.gz
  • Upload date:
  • Size: 64.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for collatex-2.0.0pre11.tar.gz
Algorithm Hash digest
SHA256 d8272f02fdd2beb29a8374ed3166a76865afffa03a10acbf64c7e96d7c6d22d6
MD5 dfc1fe60cf6c3a18f3831242f4dcb6cd
BLAKE2b-256 f2b47185c0aa69e4700c3f39cca8e03c3a99a6f075149c0fe8e1387360858f40

See more details on using hashes here.

File details

Details for the file collatex-2.0.0pre11-py3.3.egg.

File metadata

File hashes

Hashes for collatex-2.0.0pre11-py3.3.egg
Algorithm Hash digest
SHA256 4f9b658560e36e5f2abd116ae83a852a5161b6cb8fb7aea68bf517f9083729f4
MD5 1ff4a398b63798fae26bf76f60412a00
BLAKE2b-256 a0e162a522f7ffb1679e5b193d113f2042c40e74bf1971cde076597cb9b07054

See more details on using hashes here.

Supported by

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