KuangyeChen / SRL

Some Algorithms for SRL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Core

Database Form

A database should contain three files:
data.txt: each row is a triple. e.g. Disease_or_Syndrome Affects Plant
entities.txt: each row is a entity name. e.g. Plant
relations.txt: each row is a relation name. e.g. Affects

See the data directory.

Database Class

Class is core.knowledge_graph.KnowledgeGraph
Usage example

from core.knowledge_graph import KnowledgeGraph
database = KnowledgeGraph()
database.read_data_from_txt('data/kin')

Scripts

Scripts will not be made as command line apps, since they will eventually be merged with GUI.

Tensor Factorization

Run script ./tensor_factorization.py
Change hyperparameters directly in scripts.

Neural Networks

  • ER-MLP: run ./train_er_mlp.py
  • NTN: run ./train_ntn.py

Change hyperparameters directly in scripts.
During the training, run tensorboard --logdir=tmp/log/ for monitoring.

Nonimal Data Experiment

Experiments are in IPython notebook nominal_experiment.ipynb.
ER-MLP and NTN trained for kin_nominal dataset are stored in saved_model/

About

Some Algorithms for SRL


Languages

Language:Python 74.7%Language:Jupyter Notebook 24.7%Language:Shell 0.5%