- python3.6
- tensorflow-gpu 1.11
- GPU:
pip install tensorflow-gpu==1.11.0
- GPU:
- tensorflow_hub 0.1.1
- nltk,numpy, pandas, json, sklearn
(Note: our code is developed based on original Bert's implementation original)
- The original dataset are from dataset link, including Amazon QA and reviews data.
- In our work, we have chosen 7 categories, namely Tools_and_Home_Improvement, Patio_Lawn_and_Garden, Automotive, Cell_Phones_and_Accessories, Health_and_Personal_Care, Sports_and_Outdoors, Home_and_Kitchen.
- In order to replicate our results, you need to download QA (such as QA_Tools_and_Home_Improvement.json.gz etc) and review dataset (such as reviews_Tools_and_Home_Improvement.json.gz etc) in all of these categories.
- Pleae keep downloaded files in folder "data".
python data_preprocess.py
- Cross-domain training FLTR: python FLTR_1st.py
- Fine-tuning FLTR for each category, for example: python FLTR_2rd.py Home_and_Kitchen
- Cross-domian training BERTQA: python BertQA.py ALL
- Fine-tunning BERTQA for each category, for example: python BertQA.py Home_and_Kitchen
Please cite our paper if you use our model or data in your work:
@inproceedings{zhang2019discovering,
title={Discovering relevant reviews for answering product-related queries},
author={Zhang, Shiwei and Lau, Jey Han and Zhang, Xiuzhen and Chan, Jeffrey and Paris, Cecile},
booktitle={2019 IEEE International Conference on Data Mining (ICDM)},
pages={1468--1473},
year={2019},
organization={IEEE}
}