项目作者: rajammanabrolu

项目描述 :
Goal driven language generation using knowledge graph A2C agents
高级语言: Python
项目地址: git://github.com/rajammanabrolu/KG-A2C.git
创建时间: 2019-12-27T19:55:20Z
项目社区:https://github.com/rajammanabrolu/KG-A2C

开源协议:MIT License

下载


KG-A2C

Goal driven language generation using knowledge graph A2C agents. This code accompanies the paper Graph Constrained Reinforcement Learning for Natural Language Action Spaces.

Bibtex

  1. @inproceedings{
  2. ammanabrolu2020graph,
  3. title={Graph Constrained Reinforcement Learning for Natural Language Action Spaces},
  4. author={Prithviraj Ammanabrolu and Matthew Hausknecht},
  5. booktitle={International Conference on Learning Representations},
  6. year={2020},
  7. url={https://openreview.net/forum?id=B1x6w0EtwH}
  8. }

Quickstart

Install Dependencies: Jericho, Redis, Pytorch >= 1.2

  1. pip3 install --user jericho
  2. pip3 install torch torchvision
  3. sudo apt-get install redis-server

Download and extract Stanford CoreNLP then start the OpenIE server:

  1. cd stanford-corenlp-full-2018-10-05/ && java -mx8g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000

Train KG-A2C

  1. cd kga2c && python train.py --rom_file_path path_to_your_rom --openie_path path_to_your_openie_install --tsv_file ../data/rom_name_here