Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

github.com/surafelbkassa/ai-classifier

Package Overview
Dependencies
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/surafelbkassa/ai-classifier

Source
Go Modules
Version
v0.0.0-20260408180536-8bb18f135939
Version published
Created
Source

ai-classifier

 AI Email Classifier

Go + Python ML service that classifies emails as **Spam**, **Work**, or **Personal**.

 Architecture

Client → Go HTTP Server → Python ML Model → Response ↓ Fallback Rules (if ML down)


 ML Details

- Algorithm: Logistic Regression
- Features: TF-IDF vectorizer (unigrams + bigrams)
- Training data: 30 labeled emails (expandable)
- Priority mapping: Work→high, Personal→medium, Spam→low

API

bash
curl -X POST http://localhost:8080/classify \
  -H "Content-Type: application/json" \
  -d '{"text":"urgent meeting at 3pm"}'

Response:

{
  "text": "urgent meeting at 3pm",
  "category": "work",
  "priority": "high"
}

Run

Terminal 1 - Train & serve ML
python3 ml_model.py && python3 predict.py

Terminal 2 - Go server
go run main.go

Future Improvements

  • Add confidence threshold rejection
  • Retrain pipeline with human feedback
  • Upgrade to DistilBERT for context understanding

FAQs

Package last updated on 08 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts