Skip to content

WDAqua/ReMatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReMatch

K-Cap 2017 Project

Capturing Knowledge in Semantically-typed Relational Patterns to Enhance Relation Linking

Note: The evaluation results for K-Cap 2017 paper is in "Evaluation results" Folder.

For Installation and Running

Please read the entire README file before doing anything

Python Version

Python 2.7 👍

Required packages

  • numpy
  • glove_python
  • sklearn
  • practnlptool
  • textrazor
  • cPickle
  • distance
  • nltk
  • SocketServer
  • urllib
  • json
  • re

Required data files

Required Data

  • text-razor API key

Code explanation:

PS. File names are self explanatory

  1. Tagger: POS tagger
  2. Splitter: split the question into combinations
  3. Embedder: glove wrapper to convert question into vectors
  4. Reader: PATTY data reader
  5. Backend: the complete process of reading PATTY data and create embeddings, with the cosine similarity code
  6. Frontend: the complete process of reading a question and processing it
  7. Textrazor_Api: the API wrapper for the textrazor service
  8. main: where the magic happens
  9. api: for the web UI interface
  10. webService: for calling the system as a web service locally

Running local web service

Running the service via ./webService.py [port]

and calling it is simple i.e. (http://localhost/question_url_encoded)

  • Response will look like this:
{
 "results":[
    "result 1",
    "result 2", ...
 ],
 "parts":[
    "part 1",
    "part 2", ...
 ],
 "pos":[
    [
       "word",
       "pos tag"
    ], ...
 ],
 "relation 1": "dbpedia relation lable",
 "relation 2": "dbpedia relation lable",
 ...
 "relation N": "dbpedia relation lable",
 "gen_question":"generalized question here",
 "question":"the input question"
}

Fast run

please run the code once using the main file to create the *.dat files that will be just loaded other times which will reduce processing time because not extra processing is done.

running main file is straightforward ./main.py

Any other issues while running the code:

Please email 📧 to Yaser ([email protected]) or Kuldeep ([email protected]) if you face any problem.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages