Skip to content

Implementation of papers for text classification task on DBpedia

License

Notifications You must be signed in to change notification settings

mauricege/Text-Classification

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Classification Models

This repository is forked from https://github.com/TobiasLee/Text-Classification. It adds a commandline interface for convenient model training, evaluation and prediction and updates the code to be compatible with tensorflow 2. The base_model.py and base_train.py modules have been adapted from https://github.com/MrGemy95/Tensorflow-Project-Template

Dependencies

  • python >= 3.7
  • tensorflow >= 2.0
  • scikit-learn
  • click
  • pandas
  • bunch
  • tqdm

Very Short Rundown

The models work with csv files containing the columns "title", "content" and "class". Training a model works like this:

python -m cli [modelname] train [training.csv] --model-dir path/to/model/dir

For evaluation after training a model and specifying "path/to/model/dir" as model directory:

python -m cli [modelname] eval [eval.csv] --model-dir path/to/model/dir

For prediction after training a model and specifying "path/to/model/dir" as model directory:

python -m cli [modelname] predict [predict.csv] --model-dir path/to/model/dir

About

Implementation of papers for text classification task on DBpedia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%