How nguyenthien079/kltn_new works
This is a Vietnamese medical named-entity recognition application with a React interface and FastAPI backend. The primary workflow accepts text or a URL, requests NER analysis, and displays detected entities and confidence scores. Separate workflows crawl medical content, process stored articles into normalized and deduplicated sentences, and support expert labeling, review, and administration. The README documents the model ensemble and training capabilities; source excerpts specifically confirm the API setup, asynchronous article-processing jobs, and inference wrapper. Several router and UI internals were not sampled, so those links are shown at subsystem level.
Main entry points: database.py Async database access · routers API routers · pipeline.py Article text pipeline · api.js API client
Components 24
User interface
- Application UI
medical-ner/frontend/src/App.jsx - API client
medical-ner/frontend/src/services/api.js - Label and review UI
medical-ner/frontend/src/components
API and access
- FastAPI app
medical-ner/backend/app/main.py - API routers
medical-ner/backend/app/routers - Authentication
medical-ner/backend/app/auth.py
Content workflows
- Medical site crawler
medical-ner/backend/app/crawler/crawler.py - Site adapters
medical-ner/backend/app/crawler/sites - Article text pipeline
medical-ner/backend/app/pipeline/pipeline.py - Sentence segmenter
medical-ner/backend/app/pipeline/segmenter.py - Sentence normalizer
medical-ner/backend/app/pipeline/normalizer.py - Sentence deduplicator
medical-ner/backend/app/pipeline/deduplicator.py - Labeling and review
medical-ner/backend/app/routers
NER and training
- NER endpoints
medical-ner/backend/app/routers/ner.py - Inference wrapper
medical-ner/backend/app/ml/inference.py - Extractor ensemble
medical-ner/backend/app/ml/ensemble.py - NER extractors
medical-ner/backend/app/ml/extractors - Rule and dictionary NER
medical-ner/backend/app/ner/pipeline.py - Model training
medical-ner/backend/app/ml/trainer.py
Persistence
- Async database access
medical-ner/backend/app/database.py - Application records
medical-ner/backend/app/models - Relational database
Other components
- User
- Medical websites
Connections 25
- User → Application UI: uses
- Application UI → API client: requests analysis
- API client → FastAPI app: HTTP requests
- FastAPI app → API routers: dispatches routes
- API routers → Authentication: checks access
- API routers → NER endpoints: routes NER
- NER endpoints → Inference wrapper: requests predictions
- Inference wrapper → Extractor ensemble: extracts entities
- Extractor ensemble → NER extractors: combines predictions
- NER endpoints → Rule and dictionary NER: uses rule pipeline
- API client → Labeling and review: labeling requests
- Labeling and review → Label and review UI: serves labeling data
- API routers → Medical site crawler: starts crawling
- Medical site crawler → Site adapters: selects site parser
- Site adapters → Medical websites: fetches content
- API routers → Article text pipeline: starts processing
- Article text pipeline → Sentence segmenter: segments text
- Article text pipeline → Sentence normalizer: normalizes sentences
- Article text pipeline → Sentence deduplicator: finds duplicates
- Article text pipeline → Async database access: reads and writes
- Medical site crawler → Async database access: stores articles
- Async database access → Relational database: queries and commits
- Async database access → Application records: maps records
- Labeling and review → Async database access: reads and updates
- Model training → Async database access: uses training data