Skip to content

CrueChan/word-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word Document Comparison Tool

A Python tool for comparing content differences between multiple Word documents.

Features

  • Compare multiple Word documents (.docx format)
  • Calculate similarity matrix between documents
  • Identify content differences
  • Provide detailed comparison reports

Requirements

  • Python 3.12+
  • Dependencies: python-docx

Installation

Using uv (Recommended)

# Clone the repository
git clone https://github.com/CrueChan/word-comparison.git
cd word-comparison

# Install dependencies
uv sync

Using pip

pip install python-docx

Usage

  1. Place Word documents to compare in the project directory
  2. Modify file paths in main.py:
files = [
    "document1.docx",
    "document2.docx"
]
  1. Run the program:
python main.py

Example Output

Comparison Results:
Documents have differences:
Similarity between document 1 and document 2: 95.67%

Similarity Matrix:
Document 1: ['100.00%', '95.67%']
Document 2: ['95.67%', '100.00%']

Project Structure

word-comparison/
├── main.py              # Main program file
├── pyproject.toml       # Project configuration
├── uv.lock             # Dependency lock file
├── .gitignore          # Git ignore file
├── .python-version     # Python version
└── README.md           # Project documentation

Contributing

Issues and Pull Requests are welcome to improve this project.

License

MIT License

About

A Python tool for comparing content differences between multiple Word documents.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages