TextRefine Score Engine is a comprehensive text analysis and scoring system that evaluates writing quality across multiple dimensions. The engine provides quantitative scores and qualitative feedback to help identify areas for improvement in written content.
- Multi-dimensional Analysis: Evaluates text across four key dimensions
- Detailed Feedback: Provides specific, actionable suggestions for improvement
- RESTful API: Easy integration with other applications
- Docker Support: Simple deployment with containerization
- Extensible Architecture: Modular design for adding new analysis components
TextRefine's scoring engine evaluates text across four key dimensions:
- Grammar accuracy and syntax
- Spelling and typo detection
- Punctuation and mechanics
- Word usage and style
- Semantic and logical coherence
- Contextual appropriateness
- Lexical diversity and richness
- Word choice precision
- Domain-specific terminology
- Register and tone consistency
- Sophistication of language
- Sentence structure complexity
- Readability metrics (Flesch-Kincaid, etc.)
- Information density
- Text organization
- Visual presentation
- Paragraph structure
- Topic flow and transitions
- Logical progression of ideas
- Overall text cohesion
- Contextual relevance
scoreEngine/
├── api/ # FastAPI application and endpoints
├── coherence/ # Coherence analysis module
├── commons/ # Shared utilities and models
├── correctness/ # Grammar and correctness scoring
├── language_tool/ # LanguageTool integration
├── readability/ # Readability analysis
├── vocabulary/ # Vocabulary analysis
├── .github/ # GitHub workflows and templates
├── tests/ # Test suite
├── Dockerfile # Container configuration
├── main.py # Application entry point
├── models.py # Core data models
├── requirements.txt # Python dependencies
└── logging_config.py # Logging configuration
- Python 3.8+
- Docker (for containerized deployment)
- LanguageTool server (can be run in a container)
-
Clone the repository:
git clone https://github.com/your-username/TextRefine.git cd TextRefine/scoreEngine
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Build the Docker image:
docker build -t textrefine-scoreengine .
-
Run the container:
docker run -p 8000:8000 textrefine-scoreengine
Once the service is running, you can access:
- API documentation:
http://localhost:8000/docs
- Alternative documentation:
http://localhost:8000/redoc
pytest -v
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, please open an issue in the repository.