Go to file
oliviamn 1ba4f3cc02 feat: 增加构建mapping的日志 2025-07-14 22:24:43 +08:00
backend feat: 增加构建mapping的日志 2025-07-14 22:24:43 +08:00
frontend add .env 2025-07-12 16:36:56 +08:00
mineru add mineru docker file 2025-07-13 17:48:18 +08:00
sample_doc feat: 增加一些日志记录 2025-07-12 17:39:06 +08:00
tests Enhance document processing with Ollama integration and update .gitignore 2025-04-23 01:09:33 +08:00
.dockerignore Initial commit: Document processing app with Ollama integration 2025-04-23 00:02:10 +08:00
.gitignore refine 2025-05-25 16:45:48 +08:00
README.md Update README.md to clarify installation steps and add LibreOffice dependency 2025-05-24 14:55:04 +08:00
download_models.py Update requirements.txt to upgrade requests and add magic-pdf dependency 2025-05-05 18:53:22 +08:00

README.md

README.md

Document Processing App

This project is designed to process legal documents by hiding sensitive information such as names and company names. It utilizes the Ollama API with selected models for text processing. The application monitors a specified directory for new files, processes them automatically, and saves the results to a target path.

Project Structure

doc-processing-app
├── src
│   ├── main.py               # Entry point of the application
│   ├── config
│   │   └── settings.py       # Configuration settings for paths
│   ├── services
│   │   ├── file_monitor.py    # Monitors directory for new files
│   │   ├── document_processor.py # Handles document processing logic
│   │   └── ollama_client.py   # Interacts with the Ollama API
│   ├── utils
│   │   └── file_utils.py      # Utility functions for file operations
│   └── models
│       └── document.py        # Represents the structure of a document
├── tests
│   └── test_document_processor.py # Unit tests for DocumentProcessor
├── requirements.txt           # Project dependencies
├── .env.example               # Example environment variables
└── README.md                  # Project documentation

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd doc-processing-app
    
  2. Install LibreOffice (required for document processing):

    brew install libreoffice
    
  3. Install the required dependencies:

    pip install -r requirements.txt
    pip install -U magic-pdf[full]
    
  4. Configure the application by editing the src/config/settings.py file to set the paths for the object storage and target directory.

  5. Create a .env file based on the .env.example file to set up necessary environment variables.

Usage

To run the application, execute the following command:

python src/main.py

The application will start monitoring the specified directory for new documents. Once a new document is added, it will be processed automatically.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.