Skip to content

AnneBeyer/keras_irony-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project for dl4nlp: Irony detection and domain adaptation

irony_detection.py

A subfolder irony_data should contain two corpora annotated for irony:

The script trains 5 different models on this data trying to optimize the performance on the smaller dataset:

  • baseline model 1: trained solely on out-of-domain data (larger corpus)
  • baseline model 2: trained solely on in-domain data (smaller corpus)
  • joint model: trained on a concatenation of in-domain and out-of-domain data
  • weighted model: trained on a weighted concatenation of in-domain and out-of-domain data
  • continued model: baseline model 1 trained further on in-domain data

All models are saved to a subfolder (models) and the results of their evaluation in terms of accuracy, precision, recall and F1-score is written to scores.txt in the project folder.

The script needs to be called from within the project folder and requires python 3.5 pandas 0.22.0 numpy 1.13.3 nltk 3.2.5 scikit-learn 0.19.1. tensorflow 1.4.1 keras 2.1.3 h5py 2.7.1 (previous versions might work as well)

About

Project for Deep learning in NLP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages