Reads .docx tracked-changes as drafting trajectory — paste-burst detection, authorship distribution, thrashing patterns
Project description
revision-analyser
Reads a Word document's drafting trajectory — not its final text. The lens-family member that surfaces how a document was written, not what it says.
Parses Word's embedded Track Changes (<w:ins>, <w:del>, <w:moveFrom>,
<w:moveTo> elements in document.xml) to produce:
- timeline of insertions/deletions/moves with author and timestamp
- paste-burst detection (a single insertion ≥ N words ≈ paste from AI/elsewhere)
- per-author rollups (single-author vs collaborative editing)
- thrashing patterns (many small clustered edits)
The single strongest written-work process signal — but only if the student had Track Changes on. A
.docxwith no revisions is itself a signal:track_changes_enabled: false(often means the final version was pasted in). Explicit-only:.docxcontinues to auto-route todocument-analyserfor content; invokerevision-analyserdeliberately for the revision history.
Scope: v1 reads Word .docx tracked changes only. Google Docs revision
history (Drive API) and draft-sequence comparison are planned for v2.
Install
pip install revision-analyser
Use
Python:
from revision_analyser import RevisionAnalyser
result = RevisionAnalyser().analyse("essay.docx")
print(result.track_changes_enabled) # True
print(result.total_insertions) # 47
print(result.paste_burst_count) # 2
print(result.authors[0].name) # "Jane Student"
print(result.timeline_minutes) # 184.5 (≈ 3 hours of editing)
CLI:
revision-analyser essay.docx
revision-analyser essay.docx --json
revision-analyser serve
revision-analyser manifest
HTTP (revision-analyser serve on port 8016):
curl -F file=@essay.docx http://localhost:8016/analyse
Signals
track_changes_enabled— whether the doc carries any tracked revisions at all. Absence is itself a signal (final-paste workflow).- Totals — insertion count, deletion count, move count.
- Word-level totals —
insertion_word_count,deletion_word_count. - Paste bursts — insertions whose single contiguous text is ≥ 25 words (tuneable). These are the strongest paste-from-elsewhere markers.
- Authors — list with per-author insertion/deletion totals. One author = self-edits; two = collaborative or feedback cycle.
- Timeline —
timeline_first,timeline_last,timeline_minutes(span of activity). - Events — a capped sample of the timeline for inspection.
- Flags — composite tags:
paste_burst_present,single_author,no_revisions_recorded,short_timeline,multiple_authors.
The family
| What you want | Use |
|---|---|
| The document's text + readability | document-analyser |
| The document's metadata (editing time, creator app) | provenance-analyser |
| The document's revision history | revision-analyser (this) |
| Reflective depth on text | reflection-analyser |
| Any file → right engine | auto-analyser |
Triangulation matters here. A polished essay with no recorded revisions + a short total editing time (provenance-analyser) + a descriptive depth band (reflection-analyser) tells a much more focused story than any of the three signals alone.
Limits
- v1 reads tracked changes only. If the student never enabled Track Changes, the doc
reports
track_changes_enabled: false— the absence is informative but bears no detail about the actual editing process. - Author names are whatever Word recorded (
w:authorattribute) — often an install-time username, sometimes "Author" if anonymous. - Timestamps reflect when the tracked change was made per the authoring machine's clock; trustworthy on a single machine, less so across collaborators.
- Paste-burst detection is a heuristic — long literary quotes will also score. Surface the burst text in the response so callers can audit.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file revision_analyser-0.1.0.tar.gz.
File metadata
- Download URL: revision_analyser-0.1.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ff9b9a26495d21022871d182ca5657bff0a8535088fa010289947ce1481fccb
|
|
| MD5 |
186cc5b9dbc2a0d11437b4a677736981
|
|
| BLAKE2b-256 |
be44aac63d284f3bd6ca0d33adda9ebf2dbb51a1d663bccd154b103dc815290d
|
File details
Details for the file revision_analyser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: revision_analyser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d7dcccfdc626d653f3bfb6b09e16d7d89801d5a7a1cc1dcdf037e0099182798
|
|
| MD5 |
820af615a68cb513ee8017c9a75cd43f
|
|
| BLAKE2b-256 |
cd82a93d4d8f673646f4b4d8f89000cf25aa8dcd0fb1bd3e0b7bc972cebe9b39
|