← 开源

Document classification with Hierarchical Attention Networks in TensorFlow. WARNING: project is currently unmaintained, issues will probably not be addressed.

ModelsLanguage-specific modelsPython
增长势头
+024 小时新增 Star0.0%
467
Star
145
Fork
+0
本周
3
贡献者
创建于 2017-01-22 · 更新于 2026-11-19 · 今日第 23077 名
主要开发者
ematveyMtDersvannthain
README

Deep Text Classifier

Implementation of document classification model described in Hierarchical Attention Networks for Document Classification (Yang et al., 2016).

How to run

  1. Create a virtual environment, activate it, and install requirements:
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
  1. Download the English model for spaCy:
python -m spacy download en
  1. Get Yelp review dataset and extract it in this directory.
python3 yelp_prepare.py dataset/review.json
python3 worker.py --mode=train --device=/gpu:0 --batch-size=30

Results

I am getting 65% accuracy on a dev set (16% of data) after 3 epochs. Results reported in the paper are 71% on Yelp'15. No systemic hyperparameter optimization was performed.

排名相邻
同类项目

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载