Giter Club home page Giter Club logo

dbpedia2vec's Introduction

DBpedia2vec

In order to run the code, goto DBpedia2vec/src folder and run the following command :

python dbpedia2vec.py --i ../data/sample_wiki_data.xml

Check DBpedia2vec/output folder for the model and the vocab file with corresponding vectors.

In a Wiki XML data, phrases within double brackets are Wikipedia page links (which are also the DBpedia entity names since DBpedia entity names are mapped to their corressponding Wikipedia pages with the same title string).

For example : A sample string from a Wiki XML (in lowercase) is :

"autism is one of the five [[pervasive developmental disorder]]s (pdd), which are characterized by widespread abnormalities of social interactions and communication, and severely restricted interests and highly repetitive behavior.Of the five pdd forms, [[asperger syndrome]] is closest to autism in signs and likely causes; [[rett syndrome]] and [[childhood disintegrative disorder]] share several signs with autism, but may have unrelated causes." 

We process each sentence and replace phrases within double brackets as a single token by concatenating them with an underscore as below :

"autism is one of the five pervasive_developmental_disorder s (pdd), which are characterized by widespread abnormalities of social interactions and communication, and severely restricted interests and highly repetitive behavior. Of the five pdd forms, asperger_syndrome is closest to autism in signs and likely causes; rett_syndrome and childhood_disintegrative_disorder share several signs with autism, but may have unrelated causes." 

Thus, each wikipage link tokens (which is also a dbpedia entity) become one atomic token. We will train the word2vec on this edited sentences. This will give us embeddings for dbpedia entities as well as simple words occuring in wikipedia.

This project is inspired by a similar work described by https://github.com/idio/wiki2vec

dbpedia2vec's People

Contributors

nausheenfatma avatar

Stargazers

 avatar Julio C. Rangel avatar JohnZhou avatar Ainuddin Faizan avatar Riddhiman Dasgupta avatar Shashank Gupta avatar jerad fields avatar

Watchers

James Cloos avatar  avatar jerad fields 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.