Spaces:
Running
Running
metadata
title: NLP Intelligence
emoji: π€
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
NLP Intelligence β Social Monitoring Web Application
Hexagonal (Ports & Adapters) architecture for Mongolian social media content analysis.
Architecture
webapp/
βββ nlp_core/ # Domain Core (pure Python, no framework deps)
βββ adapters/api/ # FastAPI REST adapter
βββ adapters/sumbee/ # Future Sumbee.mn integration
βββ frontend/ # Next.js dashboard & admin
Quick Start
1. Backend (FastAPI)
cd webapp
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
#venv activate
source /home/nomio/Documents/ΠΠ‘Π/NLP-intelligence/venv/bin/activate
# Start the API
cd adapters/api
PYTHONPATH=../../ uvicorn main:app --reload --host 0.0.0.0 --port 8000
API docs: http://localhost:8000/docs
2. Frontend (Next.js)
cd webapp/frontend
# Install dependencies
npm install
# Start dev server
npm run dev
Dashboard: http://localhost:3000
Usage
- Open http://localhost:3000
- Upload a CSV file with a
textorTextcolumn - View NER, sentiment, and network analysis results
- Go to
/adminto manage the knowledge base, labels, and stopwords
API Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/upload | Upload CSV for analysis |
| POST | /api/analyze | Analyze single text |
| POST | /api/analyze/batch | Analyze batch of texts |
| POST | /api/network | Get network graph data |
| POST | /api/insights | Get analysis insights |
| GET/POST | /api/admin/knowledge | Knowledge base CRUD |
| GET/POST | /api/admin/labels | Custom label mapping |
| GET/POST/DELETE | /api/admin/stopwords | Stopword management |