Getting Started
Getting Started
Section titled “Getting Started”This repository contains a collection of Rust AI examples demonstrating various machine learning, deep learning, and natural language processing techniques.
Prerequisites
Section titled “Prerequisites”Running Examples
Section titled “Running Examples”Each example is a standalone Cargo project located in the examples/ directory.
# Navigate to an example directorycd examples/<example-name>
# Run the examplecargo runAvailable Examples
Section titled “Available Examples”| Example | Category | Status | Requires |
|---|---|---|---|
| Text Classification | NLP | ✅ Runnable | Local models/ BERT checkpoint |
| Sentiment Analysis | NLP | ✅ Runnable | Internet (first run downloads model) |
| Language Detection | NLP | ✅ Runnable | data/languages.json |
| Keyword Extraction | NLP | ✅ Runnable | .txt files in documents/ |
| Email Spam Classification | NLP | ⚠️ Incomplete | Assets only; no source code yet |
| KNN Classifier | ML | ✅ Runnable | data/iris.csv |
| Decision Tree Classifier | ML | ✅ Runnable | data/loans.csv |
| House Price Prediction | ML | ✅ Runnable | data/house.csv |
| Image Classification | DL | ✅ Runnable | Internet (first run downloads model) + an image |
| OCR | DL | ⚠️ Incomplete | No fn main; inference not implemented |
Adding your own data
Section titled “Adding your own data”Most examples read a fixed path relative to their own directory, so the simplest way to try
your own data is to replace the committed file (keeping the same columns). Model-based examples
either use a committed models/ directory or download it on first run.
Documentation
Section titled “Documentation”This documentation site is built with Astro Starlight. To run it locally:
# Install dependenciesnpm install
# Start development servernpm run dev
# Build for productionnpm run build
# Preview production buildnpm run preview