Hệ thống tự động thu thập, phân loại và tổng hợp tin tức tiếng Việt từ 20+ nguồn báo điện tử. Sử dụng mô hình PhoBert và ViT5 để phân loại và tạo điểm tin thông minh theo 15 chủ đề.
- ✅ Thu thập tự động từ RSS feeds của 23 báo điện tử
- ✅ Phân loại chủ đề tự động bằng PhoBERT fine-tuned (15 chủ đề)
- ✅ Tính điểm nổi bật đa tiêu chí cho bài viết
- ✅ Tạo điểm tin tự nhiên bằng ViT5 fine-tuned
- ✅ Giao diện web trực quan với Streamlit
- ✅ Hệ thống cache tối ưu hiệu suất
- ✅ Lựa chọn thông minh 10 bài nổi bật nhất
git clone https://github.com/DoanhPM/VNBS.git
cd webmining
python -m venv venv
#(Windows)
venv\Scripts\activate
#(Linux/Mac)
source venv/bin/activate
pip install -r requirements.txtmodels/
├── bertpho_news_classifier/ # Model phân loại
└── vit5_briefing_final/ # Model điểm tin#Auto crawl 5p/lần
python run_crawler.py# Chạy qua CLI
python run.py 3 # Phân tích 3 giờ gần nhất
# Chạy web
cd web
streamlit run app.pyRSS_SOURCES = [
"https://vtv.vn/rss/home.rss",
"https://nhandan.vn/rss/home.rss",
...
]# Số bài cho điểm tin
MIN_BRIEFING_ITEMS = 5 # Ít nhất 5 bài mới tạo điểm tin
MAX_ARTICLES_FOR_BRIEFING = 10 # Lấy 10 bài điểm cao nhất
MAX_ARTICLES_TO_DISPLAY = 5 # Hiển thị 5 bài trong UI
# Cache
CACHE_TTL = 1800 # 30 phút
CACHE_DIR = "data/cache"│ .gitignore
│ requirements.txt
│ run.py
│ run_crawler.py
│ __init__.py
│
├───crawl
│ cleaner.py
│ crawl_rss.py
│ rss_sources.py
│ __init__.py
│
├───data
│ │ news.jsonl
│ │
│ └───cache
│
├───Finetune
│ │ build_dataset.py
│ │ crawl.py
│ │ FineTune.ipynb
│ │ README.md
│ │ requirements.txt
│ │ rss_config.json
│ │ stats.py
│ │
│ ├───data
│ │ briefing_annotation.xlsx
│ │ briefing_train.jsonl
│ │ cls_train.jsonl
│ │ cls_val.jsonl
│ │ facts.jsonl
│ │ grouped.jsonl
│ │ news.jsonl
│ │ seen_urls.json
│ │
│ └───prepare
│ 01_group_news.py
│ 02_extract_facts.py
│ 03_create_excel_for_briefing.py
│ 04_excel_to_jsonl.py
│
├───models
│ │
│ ├───bertpho_news_classifier
│ │ added_tokens.json
│ │ bpe.codes
│ │ config.json
│ │ model.safetensors
│ │ special_tokens_map.json
│ │ tokenizer_config.json
│ │ training_args.bin
│ │ vocab.txt
│ │
│ └───vit5_briefing_final
│ config.json
│ generation_config.json
│ model.safetensors
│ special_tokens_map.json
│ spiece.model
│ tokenizer.json
│ tokenizer_config.json
│
├───pipeline
│ analyzer.py
│ article_scorer.py
│ briefing.py
│ briefing_optimizer.py
│ cache.py
│ topic_classifier.py
│ __init__.py
│
└───web
app.py