DocuMind is a document analysis module that provides functionality to analyze text documents, including summarization and sentiment analysis.
Author: Aviraj Saha
Copyright: ©Aviraj Saha 2023
The module consists of three main files:
-
main.py: This file is the entry point of the DocuMind document analysis module. It provides a command-line interface for analyzing text documents. It uses thedoc_analyzermodule to perform document analysis and outputs the results to a file. -
doc_analyzer.py: This file contains theDocument,TextDocument, andWordDocumentclasses that encapsulate the functionality for document summarization and sentiment analysis. It uses the Sumy library for text summarization and the TextBlob library for sentiment analysis. -
cmd_utility.py: This file contains the command-line utility functions for parsing command-line arguments, handling logging, and calling theoutputfunction inmain.py.
-
Clone this repository to your local machine:
git clone https://github.com/Aviraj06/DocuMind.git
-
Navigate to the project directory:
cd DocuMind -
Install the required dependencies:
pip install -r requirements.txt
To analyze a text document using DocuMind, follow these steps:
-
Open a terminal or command prompt and navigate to the project directory.
-
Run the
main.pyscript:python main.py
-
You will be prompted to enter the path to the input document (.txt or .docx), the output path, and the number of sentences for the summary.
-
The script will analyze the document and generate an output file with the summarized text and sentiment analysis results.
python main.pySample Output:
DocuMind - A document analysis module.
This module provides functionality to analyze text documents, including summarization and sentiment analysis.
Author: Aviraj Saha
Copyright: ©Aviraj Saha 2023
Enter a valid file path for .txt or a .docx file: path/to/input/document.txt
Enter path for output: path/to/output/
Enter number of lines for summary: 3
Loading: 100%|█████████████████████████████████████████████████████████████| 100/100 [00:03<00:00, 32.11it/s]
Process finished successfully!
Results saved at: path/to/output/document_documind_output.txt
Contributions to DocuMind are welcome! If you would like to contribute to this project, please follow these steps:
-
Fork the repository.
-
Create a new branch for your feature/bug fix:
git checkout -b feature/your-feature
-
Make your changes and commit them:
git commit -m "Add your commit message" -
Push your changes to your forked repository:
git push origin feature/your-feature
-
Open a pull request on the original repository.
This project is licensed under the MIT License.