├── .gitignore ├── LICENSE ├── README.md ├── configs └── squad │ └── r-net │ ├── hkust+bert.jsonnet │ ├── hkust+elmo.jsonnet │ ├── hkust.jsonnet │ └── original.jsonnet ├── img ├── em.png └── f1.png ├── main.py ├── modules ├── __init__.py ├── dropout.py ├── gate.py ├── pair_encoder │ ├── __init__.py │ ├── attentions.py │ ├── cells.py │ └── pair_encoder.py ├── pointer_network │ ├── __init__.py │ └── pointer_network.py ├── rnn │ ├── __init__.py │ └── stacked_rnn.py └── utils.py ├── qa ├── __init__.py └── squad │ ├── __init__.py │ ├── dataset.py │ └── rnet.py ├── requirements.txt └── tests ├── __init__.py ├── fixtures └── rnet │ ├── experiment.jsonnet │ └── experiment_dynamic.jsonnet └── models ├── __init__.py ├── r-net_dynamic_test.py └── r-net_test.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/README.md -------------------------------------------------------------------------------- /configs/squad/r-net/hkust+bert.jsonnet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/configs/squad/r-net/hkust+bert.jsonnet -------------------------------------------------------------------------------- /configs/squad/r-net/hkust+elmo.jsonnet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/configs/squad/r-net/hkust+elmo.jsonnet -------------------------------------------------------------------------------- /configs/squad/r-net/hkust.jsonnet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/configs/squad/r-net/hkust.jsonnet -------------------------------------------------------------------------------- /configs/squad/r-net/original.jsonnet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/configs/squad/r-net/original.jsonnet -------------------------------------------------------------------------------- /img/em.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/img/em.png -------------------------------------------------------------------------------- /img/f1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/img/f1.png -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/main.py -------------------------------------------------------------------------------- /modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/dropout.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/dropout.py -------------------------------------------------------------------------------- /modules/gate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/gate.py -------------------------------------------------------------------------------- /modules/pair_encoder/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/pair_encoder/attentions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/pair_encoder/attentions.py -------------------------------------------------------------------------------- /modules/pair_encoder/cells.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/pair_encoder/cells.py -------------------------------------------------------------------------------- /modules/pair_encoder/pair_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/pair_encoder/pair_encoder.py -------------------------------------------------------------------------------- /modules/pointer_network/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/pointer_network/__init__.py -------------------------------------------------------------------------------- /modules/pointer_network/pointer_network.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/pointer_network/pointer_network.py -------------------------------------------------------------------------------- /modules/rnn/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/rnn/stacked_rnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/rnn/stacked_rnn.py -------------------------------------------------------------------------------- /modules/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/modules/utils.py -------------------------------------------------------------------------------- /qa/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qa/squad/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /qa/squad/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/qa/squad/dataset.py -------------------------------------------------------------------------------- /qa/squad/rnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/qa/squad/rnet.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | allennlp>=0.7.2 2 | torch>=1.0.0 -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/fixtures/rnet/experiment.jsonnet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/tests/fixtures/rnet/experiment.jsonnet -------------------------------------------------------------------------------- /tests/fixtures/rnet/experiment_dynamic.jsonnet: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/tests/fixtures/rnet/experiment_dynamic.jsonnet -------------------------------------------------------------------------------- /tests/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/models/r-net_dynamic_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/tests/models/r-net_dynamic_test.py -------------------------------------------------------------------------------- /tests/models/r-net_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matthew-z/R-net/HEAD/tests/models/r-net_test.py --------------------------------------------------------------------------------