https://github.com/gabsedits/ai-detector
Check if an text is AI generated
https://github.com/gabsedits/ai-detector
Last synced: 11 months ago
JSON representation
Check if an text is AI generated
- Host: GitHub
- URL: https://github.com/gabsedits/ai-detector
- Owner: GabsEdits
- License: mit
- Created: 2025-01-07T16:08:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-25T21:45:00.000Z (over 1 year ago)
- Last Synced: 2025-03-05T12:19:03.766Z (about 1 year ago)
- Language: TypeScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
AI Detector
An API (with a webapp) that detects if a text is AI-generated
## Algorithm
The algorithm is based on a comprehensive analysis of the text, including
character count, word count, sentence count, unique word count, and average
sentence length. It calculates word frequency, identifies the most used word,
and evaluates sentence lengths to determine mean and variance. The type-token
ratio is computed to assess lexical diversity. Additionally, the algorithm
generates bigrams and trigrams to analyze word pairings and triplets. Heuristic
patterns are checked to identify common AI-generated text phrases. The AI
probability is adjusted based on sentence complexity and repetition checks,
resulting in a final AI probability score.
## API
The API is available at
[ai-detector-api.deno.dev](https://ai-detector-api.deno.dev).
### Installation
(After cloning the repository, and installing Deno, and being in the root
directory of the project)
### Running the API
```bash
deno run -N api/mod.ts
```
### Endpoints
> ![NOTE] Replace `:text` with the text you want to analyze.
- `GET
### Example
```bash
curl https://ai-detector-api.deno.dev/This%20is%20an%20example%20text%20to%20analyze%20using%20the%20API
```
## Webapp
The webapp is available at [ai-detector.gxbs.dev](https://ai-detector.gxbs.dev),
and is built using [Fresh](https://fresh.deno.dev).
### Installation
(After cloning the repository, and installing Deno, and being in the root
directory of the project)
```
deno i
```
### Running the Webapp
Development Server (with auto-reload):
```bash
deno run start
```
Build:
```bash
deno run build
```
## License
This project is open source and available under the [MIT License](LICENSE.txt).