https://github.com/botsarefuture/profanity-detector-api
https://github.com/botsarefuture/profanity-detector-api
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/botsarefuture/profanity-detector-api
- Owner: botsarefuture
- Created: 2024-01-21T09:59:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-06T17:46:38.000Z (almost 2 years ago)
- Last Synced: 2024-09-06T21:03:28.976Z (almost 2 years ago)
- Language: Python
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Profanity Detector API
An API for detecting profanity in text using Django and Django REST framework.
The Profanity Detector this uses is located here: https://github.com/botsarefuture/profane_detector.
**Note: in future this is going to use [HaSpDe](https://github.com/HateSpeechDetection)**
## Installation
1. Clone the repository:
```bash
git clone https://github.com/botsarefuture/profanity-detector-api.git
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Apply migrations:
```bash
python manage.py migrate
```
4. Run the development server:
```bash
python manage.py runserver
```
## Usage
### Detect Profanity
Endpoint: `/api/detect-profanity/`
#### Request
```bash
curl -X POST -H "Content-Type: application/json" -d '{"text": "This is a profane text.", "language": "en"}' http://localhost:8000/api/detect-profanity/
```
Replace `http://localhost:8000` with your API server URL.
#### Response
```json
{
"text": "This is a profane text.",
"language": "en",
"profanity_detected": true
}
```
## Documentation
For detailed API documentation, refer to the [OpenAPI (Swagger) Documentation](#link-to-documentation).
## Contributing
If you'd like to contribute to this project, feel free to submit a pull request.
## License
This project is licensed under the [MIT License](LICENSE).