This code is based on the code for paper Discrete-State Variational Autoencoders for Joint Discovery and Factorization of Relations by Diego Marcheggiani and Ivan Titov.
Create a python 3.6 environment using pyenv or conda. Then install python packages with pip:
pip install -r requirements.txt
Extract data to ./data
directory.
- Baseline model:
python -m main oie
- RegDVAE:
- First get the KB embeddings:
python -m main ext_kb -out model/ext_kb/m_001
python -m main oie_reg -lekd m001
- First get the KB embeddings:
- lexicalized dependency path between arguments (entities) of the relation,
- first entity
- second entity
- entity types of the first and second entity
- trigger word
- id of the sentence
- raw sentence
- pos tags of the entire sentence
- relation between the two entities if any (used only for evaluation)