Go to file
oliviamn b3cf9f98a7 refine 2025-05-25 16:45:48 +08:00
backend refine 2025-05-25 16:45:48 +08:00
frontend feat:增加前端 2025-05-25 00:37:20 +08:00
sample_doc refine: 删除文档数据文件夹,用sample_doc取代 2025-05-25 16:43:32 +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
.env.example 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
Dockerfile Initial commit: Document processing app with Ollama integration 2025-04-23 00:02:10 +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
requirements.txt 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.