Coder Social home page Coder Social logo

sascezar / wikibank Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 50.85 MB

WikiBank is a new partially annotated resource for multilingual frame-semantic parsing task.

License: MIT License

Python 100.00%
semantic-role dataset multilingual python wikidata-dump wikipedia-dump mongodb semantic-role-labeling

wikibank's Introduction

WikiBank

WikiBank is a new partially annotated resource for multilingual frame-semantic parsing task.

Available Datasets

The available datasets are for 5 languages: EN, ES, DE, FR, and IT and their are in the dataset folder.

Procedure for creations

NOTES: The space required is round 1TB, so be sure to have the required amount of space before starting the process.

Requirements

  1. MongoDB
  2. Python

Required files

  1. Download Wikidata JSON dump from here
  2. Download Wikipedia XML dump from here, or a JSON dump from here (download the "content" one).

If using the XML dump, converto it to JSON using one of the tools present in this page.

Data preprocessing

To merge Wikidata and Wikipedia, we need to have in both documents the Wikidata id. If your Wikipedia dump, doesn't contain this filed, to can compute a mapping from wikipedia id to wikidata id using the script "src/scripts/wiki_props.py" and the dump of the Wikipedia properties (here - called wiki-latest-page_props.sql) and then use the output file to add the wikidata id to the JSON document.

Data import

  1. Import the Wikidata dump into MongoDB in it's own collection using:
    mongoimport --db WikiSRL --collection wikidata --file wikidata_dump.json --jsonArray
  2. Create an index on the "id" field
    db.wikidata.createIndex({"id": 1})
    
  3. Import the JSON wikipedia dump into MongoDB
  4. Create an index on the wikidata id field:
    db.wikidata.createIndex({"wikidata_id": 1})
    

Data integration

  1. To merge Wikidata and wikipedia configure the config.py file, and then run merge_wikis.py

SRL extraction

  1. To extract the triples and create the SRL file, configure the config.py file, and run srl.py

wikibank's People

Contributors

sascezar avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.