A comprehensive Python-based document processing toolkit for OCR, text extraction, NLP analysis, and document classification.
sudo apt-get install tesseract-ocrbrew install tesseractpip install -r requirements.txt
python -m spacy download en_core_web_sm
python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('wordnet')"
python -m textblob.download_corpora
Copy the example configuration file and customize it:
cp settings.ini.example settings.ini
Edit settings.ini to configure:
Note: If settings.ini is not found, scripts will use sensible defaults.
For email downloading features, you'll need Google API credentials:
credentials.json in the project rootdocument_intelligence/
├── documents/ # Input PDF documents
├── txt_output/ # Extracted text files
├── category/ # Clustered documents
├── NER/ # Named entity extraction results
├── sentiments/ # Sentiment analysis results
├── summarization/ # Document summaries
├── document_classification/ # Classification results
├── FL_sentiment/ # Flair sentiment analysis results
├── kvextract/ # Key-value extraction results
└── extract/ # Pattern extraction results
Run the main document processing pipeline:
python main.py
This will:
python optical_character_recognition.py document1.pdf document2.pdf
python sentiment_analysis.py # TextBlob
python sentiment_analysis_using_flair.py # Flair
python sentiment_analysis_using_vader.py # VADER
python extract_named_entities.py
python cluster_documents.py
python fuzzy_categorize_documents.py
python summarize_text.py
python document_similarity.py
python text_similarity.py
python gzip_knn_similarity.py
python download_email.py
python dl_email.py
This release includes comprehensive bug fixes that resolve all execution-blocking issues:
optical_character_recognition.py (en-dash → hyphen in Tesseract config)logging import in optical_character_recognition.pyextract_features_from_text.py and sentiment_analysis_using_flair.py (now uses lazy loading)requirements.txt:
os.path.join()os.makedirs(exist_ok=True)settings.ini (uses sensible defaults)credentials.json (clear error message with instructions)settings.ini.example template for easy configurationdocument_classification.py (convert numpy array to string)document_similarity.py (now reads file contents instead of comparing file paths)gzip_knn_similarity.py (\\n → \n)main() functionsif __name__ == "__main__" guards to prevent execution on importSee requirements.txt for the complete list. Major dependencies include:
--verbose flag (where available) for detailed progressEnsure Tesseract is installed and in your system PATH, or edit the path in optical_character_recognition.py
Run: python -m spacy download en_core_web_sm
Ensure credentials.json is present and you've enabled the Gmail API in Google Cloud Console
For large document sets, process in smaller batches or increase system RAM
Contributions are welcome! Please ensure all code:
os.path.join())[Add your license here]
For issues and questions, please open an issue on the project repository.
Python
96.4%
JavaScript
2.9%
A comprehensive Python-based document processing toolkit for OCR, text extraction, NLP analysis, and document classification.
sudo apt-get install tesseract-ocrbrew install tesseractpip install -r requirements.txt
python -m spacy download en_core_web_sm
python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('wordnet')"
python -m textblob.download_corpora
Copy the example configuration file and customize it:
cp settings.ini.example settings.ini
Edit settings.ini to configure:
Note: If settings.ini is not found, scripts will use sensible defaults.
For email downloading features, you'll need Google API credentials:
credentials.json in the project rootdocument_intelligence/
├── documents/ # Input PDF documents
├── txt_output/ # Extracted text files
├── category/ # Clustered documents
├── NER/ # Named entity extraction results
├── sentiments/ # Sentiment analysis results
├── summarization/ # Document summaries
├── document_classification/ # Classification results
├── FL_sentiment/ # Flair sentiment analysis results
├── kvextract/ # Key-value extraction results
└── extract/ # Pattern extraction results
Run the main document processing pipeline:
python main.py
This will:
python optical_character_recognition.py document1.pdf document2.pdf
python sentiment_analysis.py # TextBlob
python sentiment_analysis_using_flair.py # Flair
python sentiment_analysis_using_vader.py # VADER
python extract_named_entities.py
python cluster_documents.py
python fuzzy_categorize_documents.py
python summarize_text.py
python document_similarity.py
python text_similarity.py
python gzip_knn_similarity.py
python download_email.py
python dl_email.py
This release includes comprehensive bug fixes that resolve all execution-blocking issues:
optical_character_recognition.py (en-dash → hyphen in Tesseract config)logging import in optical_character_recognition.pyextract_features_from_text.py and sentiment_analysis_using_flair.py (now uses lazy loading)requirements.txt:
os.path.join()os.makedirs(exist_ok=True)settings.ini (uses sensible defaults)credentials.json (clear error message with instructions)settings.ini.example template for easy configurationdocument_classification.py (convert numpy array to string)document_similarity.py (now reads file contents instead of comparing file paths)gzip_knn_similarity.py (\\n → \n)main() functionsif __name__ == "__main__" guards to prevent execution on importSee requirements.txt for the complete list. Major dependencies include:
--verbose flag (where available) for detailed progressEnsure Tesseract is installed and in your system PATH, or edit the path in optical_character_recognition.py
Run: python -m spacy download en_core_web_sm
Ensure credentials.json is present and you've enabled the Gmail API in Google Cloud Console
For large document sets, process in smaller batches or increase system RAM
Contributions are welcome! Please ensure all code:
os.path.join())[Add your license here]
For issues and questions, please open an issue on the project repository.
Python
96.4%
JavaScript
2.9%