How ducbao210/medical-named-entity-recognition-for-vietnamese-covid-19-corpora works
This repository implements Vietnamese named-entity recognition for the PhoNER_COVID19 task, with command-line training, evaluation, inference, and knowledge distillation. The principal workflow enters through main.py, which dispatches to the pipeline; the pipeline prepares labeled data, constructs a model and trainer, and runs training or inference. Checkpoints and evaluation artifacts support the workflow. The README provides only a citation, so capabilities and connections below rely on the supplied source excerpts and SOURCE INDEX; some unsampled details are intentionally left unlinked.
Main entry points: engine.py Workflow orchestration · dataset.py NER dataset loaders · trainer.py Training and distillation · manager.py Checkpoint management
Components 16
Entry and configuration
- CLI modes
main.py - Settings and labels
src/config/settings.py - Workflow orchestration
src/pipeline/engine.py
NER data preparation
- CoNLL corpus
- CoNLL reader
src/data/dataset.py - Token alignment
src/data/dataset.py - NER dataset loaders
src/data/dataset.py - Entity augmentation
src/data/augmentor.py
Models and training
- NER architectures
src/models/model.py - Training and distillation
src/training/trainer.py
Evaluation and artifacts
- Metrics and analysis
src/utils/helpers.py - Checkpoint management
src/checkpoints/manager.py - Artifact locations
src/config/settings.py - Metrics and predictions
Other components
- Hugging Face Hub
- CLI user
Connections 18
- CLI user → CLI modes: invokes
main.py - CLI modes → Workflow orchestration: dispatches
main.py - Workflow orchestration → Settings and labels: reads configuration
src/pipeline/engine.py - Workflow orchestration → CoNLL reader: reads sentences
src/pipeline/engine.py - CoNLL corpus → CoNLL reader: provides data
- CoNLL reader → NER dataset loaders: parses sentences
src/data/dataset.py - NER dataset loaders → Token alignment: aligns tokens
src/data/dataset.py - Workflow orchestration → NER dataset loaders: loads batches
src/pipeline/engine.py - Workflow orchestration → NER architectures: creates models
src/pipeline/engine.py - Workflow orchestration → Training and distillation: runs training
src/pipeline/engine.py - Training and distillation → Metrics and analysis: computes metrics
src/training/trainer.py - Workflow orchestration → Checkpoint management: resolves checkpoints
src/pipeline/engine.py - Checkpoint management → Settings and labels: uses paths
src/checkpoints/manager.py - Checkpoint management → Hugging Face Hub: downloads or uploads
src/checkpoints/manager.py - Training and distillation → Artifact locations: saves checkpoints
- Workflow orchestration → Metrics and predictions: writes results
- Entity augmentation → NER dataset loaders: augments samples
- Workflow orchestration → Entity augmentation: may augment data