GithubHelp home page GithubHelp logo

randyh0120 / describing_a_knowledge_base Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eaglew/describing_a_knowledge_base

0.0 0.0 0.0 6.06 MB

Code for Describing a Knowledge Base

Home Page: http://aclweb.org/anthology/W18-6502

License: MIT License

Python 100.00%

describing_a_knowledge_base's Introduction

Describing a Knowledge Base

Describing a Knowledge Base

Accepted by 11th International Conference on Natural Language Generation (INLG 2018)

[Slides]

Table of Contents

Model Overview

Photo

Requirements

Environment:

  • Pytorch 0.4
  • Python 3.6 CAUTION!! Model might not be saved and loaded properly under Python 3.5

Data:

  • Wikipedia Person and Animal Dataset
    This dataset gathers unfiltered 428,748 person and 12,236 animal infobox with description based on Wikipedia dump (2018/04/01) and Wikidata (2018/04/12)

Quickstart

Preprocessing:

Put the Wikipedia Person and Animal Dataset under the Describing a Knowledge Base folder. Unzip it.

Randomly split the data into train, dev and test by runing split.py under utils folder.

python split.py

Run preprocess.py under the same folder.

You can choose person (type 0) or animal (type 1)

python preprocess.py --type 0

Training

Hyperparameter can be adjusted in the Config class of main.py and choose whether person (0) or animal (1) using type.

python main.py --cuda --mode 0 --type 0

Test

Compute score:

python main.py --cuda --mode 3

Predict single entity:

python main.py --cuda --mode 1

Citation

@InProceedings{W18-6502,
  author = 	"Wang, Qingyun
		and Pan, Xiaoman
		and Huang, Lifu
		and Zhang, Boliang
		and Jiang, Zhiying
		and Ji, Heng
		and Knight, Kevin",
  title = 	"Describing a Knowledge Base",
  booktitle = 	"Proceedings of the 11th International Conference on Natural Language Generation",
  year = 	"2018",
  publisher = 	"Association for Computational Linguistics",
  pages = 	"10--21",
  location = 	"Tilburg University, The Netherlands",
  url = 	"http://aclweb.org/anthology/W18-6502"
}

Attention Visualization

Photo

Photo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.