├── LICENSE ├── README.md ├── graph_data ├── persona │ └── .gitkeep └── weibo │ └── .gitkeep ├── json_data ├── persona │ └── .gitkeep └── weibo │ └── .gitkeep ├── logs └── .gitkeep ├── models ├── persona │ └── .gitkeep └── weibo │ └── .gitkeep ├── raw_data ├── persona │ └── .gitkeep └── weibo │ └── .gitkeep ├── resource └── .gitkeep ├── results ├── persona │ └── .gitkeep └── weibo │ └── .gitkeep ├── src ├── .gitignore ├── distributed.py ├── main.py ├── models │ ├── __init__.py │ ├── adam.py │ ├── data_loader.py │ ├── decoder_rnn.py │ ├── decoder_tf.py │ ├── encoder.py │ ├── generator.py │ ├── graph.py │ ├── insertion_transformer.py │ ├── loss.py │ ├── model.py │ ├── model_predictor.py │ ├── model_trainer.py │ ├── neural.py │ ├── optimizers.py │ ├── reporter.py │ ├── seq2seq.py │ ├── seq2seq_hier.py │ ├── seq2seq_predictor.py │ └── seq2seq_trainer.py ├── others │ ├── __init__.py │ ├── logging.py │ ├── utils.py │ └── vocab_wrapper.py ├── persona_preprocess.sh ├── preprocess.py ├── preprocess │ ├── GAE_VGAE │ │ ├── Data_Process.py │ │ ├── GAE.py │ │ ├── Metrics.py │ │ ├── Models.py │ │ └── VGAE.py │ ├── __init__.py │ ├── construct_graph │ │ ├── persona_graph │ │ │ ├── adj_feature.py │ │ │ └── construction.py │ │ └── weibo_graph │ │ │ └── adj_feature.py │ ├── get_context.py │ ├── json_to_data_persona.py │ ├── json_to_data_weibo.py │ ├── persona_process │ │ ├── convai2 │ │ │ ├── __init__.py │ │ │ ├── api.py │ │ │ └── candi_keyword.txt │ │ ├── data_utils.py │ │ ├── dataset.py │ │ ├── extraction.py │ │ └── prepare_data.py │ ├── prepare_data │ │ ├── modify.py │ │ └── modify_weibo.py │ ├── raw_to_json_persona.py │ └── raw_to_json_weibo.py ├── test.py ├── train.py ├── translate │ ├── __init__.py │ ├── beam.py │ └── penalties.py ├── validate.py └── weibo_preprocess.sh └── torch_data ├── persona └── .gitkeep └── weibo └── .gitkeep /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/README.md -------------------------------------------------------------------------------- /graph_data/persona/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /graph_data/weibo/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /json_data/persona/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /json_data/weibo/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /logs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/persona/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /models/weibo/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /raw_data/persona/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /raw_data/weibo/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resource/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /results/persona/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /results/weibo/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | 3 | -------------------------------------------------------------------------------- /src/distributed.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/distributed.py -------------------------------------------------------------------------------- /src/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/main.py -------------------------------------------------------------------------------- /src/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/models/adam.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/adam.py -------------------------------------------------------------------------------- /src/models/data_loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/data_loader.py -------------------------------------------------------------------------------- /src/models/decoder_rnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/decoder_rnn.py -------------------------------------------------------------------------------- /src/models/decoder_tf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/decoder_tf.py -------------------------------------------------------------------------------- /src/models/encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/encoder.py -------------------------------------------------------------------------------- /src/models/generator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/generator.py -------------------------------------------------------------------------------- /src/models/graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/graph.py -------------------------------------------------------------------------------- /src/models/insertion_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/insertion_transformer.py -------------------------------------------------------------------------------- /src/models/loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/loss.py -------------------------------------------------------------------------------- /src/models/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/model.py -------------------------------------------------------------------------------- /src/models/model_predictor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/model_predictor.py -------------------------------------------------------------------------------- /src/models/model_trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/model_trainer.py -------------------------------------------------------------------------------- /src/models/neural.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/neural.py -------------------------------------------------------------------------------- /src/models/optimizers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/optimizers.py -------------------------------------------------------------------------------- /src/models/reporter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/reporter.py -------------------------------------------------------------------------------- /src/models/seq2seq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/seq2seq.py -------------------------------------------------------------------------------- /src/models/seq2seq_hier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/seq2seq_hier.py -------------------------------------------------------------------------------- /src/models/seq2seq_predictor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/seq2seq_predictor.py -------------------------------------------------------------------------------- /src/models/seq2seq_trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/models/seq2seq_trainer.py -------------------------------------------------------------------------------- /src/others/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/others/logging.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/others/logging.py -------------------------------------------------------------------------------- /src/others/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/others/utils.py -------------------------------------------------------------------------------- /src/others/vocab_wrapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/others/vocab_wrapper.py -------------------------------------------------------------------------------- /src/persona_preprocess.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/persona_preprocess.sh -------------------------------------------------------------------------------- /src/preprocess.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess.py -------------------------------------------------------------------------------- /src/preprocess/GAE_VGAE/Data_Process.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/GAE_VGAE/Data_Process.py -------------------------------------------------------------------------------- /src/preprocess/GAE_VGAE/GAE.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/GAE_VGAE/GAE.py -------------------------------------------------------------------------------- /src/preprocess/GAE_VGAE/Metrics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/GAE_VGAE/Metrics.py -------------------------------------------------------------------------------- /src/preprocess/GAE_VGAE/Models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/GAE_VGAE/Models.py -------------------------------------------------------------------------------- /src/preprocess/GAE_VGAE/VGAE.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/GAE_VGAE/VGAE.py -------------------------------------------------------------------------------- /src/preprocess/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/preprocess/construct_graph/persona_graph/adj_feature.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/construct_graph/persona_graph/adj_feature.py -------------------------------------------------------------------------------- /src/preprocess/construct_graph/persona_graph/construction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/construct_graph/persona_graph/construction.py -------------------------------------------------------------------------------- /src/preprocess/construct_graph/weibo_graph/adj_feature.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/construct_graph/weibo_graph/adj_feature.py -------------------------------------------------------------------------------- /src/preprocess/get_context.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/get_context.py -------------------------------------------------------------------------------- /src/preprocess/json_to_data_persona.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/json_to_data_persona.py -------------------------------------------------------------------------------- /src/preprocess/json_to_data_weibo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/json_to_data_weibo.py -------------------------------------------------------------------------------- /src/preprocess/persona_process/convai2/__init__.py: -------------------------------------------------------------------------------- 1 | from .api import * 2 | -------------------------------------------------------------------------------- /src/preprocess/persona_process/convai2/api.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/persona_process/convai2/api.py -------------------------------------------------------------------------------- /src/preprocess/persona_process/convai2/candi_keyword.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/persona_process/convai2/candi_keyword.txt -------------------------------------------------------------------------------- /src/preprocess/persona_process/data_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/persona_process/data_utils.py -------------------------------------------------------------------------------- /src/preprocess/persona_process/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/persona_process/dataset.py -------------------------------------------------------------------------------- /src/preprocess/persona_process/extraction.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/persona_process/extraction.py -------------------------------------------------------------------------------- /src/preprocess/persona_process/prepare_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/persona_process/prepare_data.py -------------------------------------------------------------------------------- /src/preprocess/prepare_data/modify.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/prepare_data/modify.py -------------------------------------------------------------------------------- /src/preprocess/prepare_data/modify_weibo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/prepare_data/modify_weibo.py -------------------------------------------------------------------------------- /src/preprocess/raw_to_json_persona.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/raw_to_json_persona.py -------------------------------------------------------------------------------- /src/preprocess/raw_to_json_weibo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/preprocess/raw_to_json_weibo.py -------------------------------------------------------------------------------- /src/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/test.py -------------------------------------------------------------------------------- /src/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/train.py -------------------------------------------------------------------------------- /src/translate/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/translate/beam.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/translate/beam.py -------------------------------------------------------------------------------- /src/translate/penalties.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/translate/penalties.py -------------------------------------------------------------------------------- /src/validate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/validate.py -------------------------------------------------------------------------------- /src/weibo_preprocess.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RowitZou/CG-nAR/HEAD/src/weibo_preprocess.sh -------------------------------------------------------------------------------- /torch_data/persona/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torch_data/weibo/.gitkeep: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------