Domain_Adaptation_ACL2018
The repository of domain adaptation project for the Examining Temporality in Document Classification in ACL 2018. The slides will come soon.
Table of Contents
- Installation
- Data
- Usage
- Contact and Citation
Installation
- Platform:
- Ubuntu 16.04
- Anaconda, Python 3.6
- Run the followings to create environment:
conda env create -f environment.yml
python -m nltk.downloader punkt stopwords
source activate domain
Data
- Amazon CDs and Vinyl
- Yelp reviews of Hotel and Restaurant
- Political Platforms: Political Parties -> United States -> * Party Platform
- Economical News
- Vaccine Data
Usage
- Data extraction and sample:
- Extraction:
python extract_data.py
within each data folder to extract data. - Sample: go to the utils folder, run
python under_sample.py
- Run cross domain classification, under the project root folder:
python domain_clf_analysis.py
- Generate the feature vectors:
python build_feas.py
- Run grid search to find the optimal parameters:
python grid_search.py
- Run domain adaptation (section 4.1 and 4.2 in the paper):
python run_exps.py
- Combine both seasonal and non-seasonal information:
python build_sgd_base.py