Skip to main content

Crate is_it_slop

Crate is_it_slop 

Source
Expand description

§is-it-slop

A fast and accurate AI text detector built with Rust.

Supports multiple platforms including macOS (Apple Silicon), Linux, and Windows.

This crate provides tools to classify whether text was written by AI or a human, using a machine learning model based on TF-IDF features and ONNX runtime inference.

§Quick Start

use is_it_slop::Predictor;

let predictor = Predictor::new();

// Get raw probabilities
let result = predictor.predict("Some text to analyze")?;
println!(
    "AI probability: {:.2}%",
    result.prediction.ai_probability() * 100.0
);

// Or get a classification directly
let class = predictor.classify("Some text to analyze")?;
println!("Classification: {:?}", class);

§Custom Threshold

use is_it_slop::Predictor;

// Use a custom threshold (default is [`CLASSIFICATION_THRESHOLD`])
let predictor = Predictor::new().with_threshold(0.7);
let class = predictor.classify("Some text")?;

§Batch Processing

use is_it_slop::Predictor;

let predictor = Predictor::new();
let texts = vec!["First text", "Second text", "Third text"];
let predictions = predictor.predict_batch(&texts)?;

Re-exports§

pub use model::MODEL_VERSION;
pub use pipeline::AggregationMethod;
pub use pipeline::Classification;
pub use pipeline::Prediction;
pub use pipeline::UnifiedPrediction;

Modules§

cli
CLI module for the is-it-slop text classification tool.
model
Model artifact loading and global state management.
pipeline
Inference pipeline for AI text detection.

Structs§

Predictor
Builder struct for configuring and running predictions.