Giter Club home page Giter Club logo

veealign's Introduction

VeeAlign

The following repository contains the code and datasets used for the EMNLP 2021 publication "Multifaceted Context Representation using Dual Attention for Ontology Alignment". The system presented in the paper, VeeAlign, is a dual attention based ontology alignment system that aligns ontologies using a novel multi-faceted context representation approach. It was declared the best performing system in the Conference track for OAEI 2020.

Setup

Please run the following commands:

  1. conda create --name py37 python=3.7
  2. pip3 install -r requirements.txt

Datasets

Five datasets are made available with this repository, in the format required by the code:

  1. Conference Dataset
  2. Lebensmittel Dataset
  3. Freizeit Dataset
  4. Web directory Dataset
  5. Multifarm Dataset

To add a new dataset:

  1. Create a folder <dataset_name> inside the datasets directory.
  2. This directory should contain two subdirectories ontologies and alignments, which contain the ontologies being aligned and the alignments respectively.

There are no naming conventions wrt the naming of the ontology/alignment files, but it is assumed that the RDF alignment file contains <onto1> and <onto2> tags denoting the ontologies being aligned.

Training & Testing

To train a model, run python3 train.py.

To test a model, run python3 test.py <ontology1> <ontology2>.

Note that:

  1. Both train.py and test.py will run with configurational parameters described in config.ini.
  2. train.py will train on alignments specified in config.ini
  3. test.py will load pretrained model specified in config.ini

Details on the configurational parameters and how to set them for reproducibility are described here.

Files

There are five main script files:

  1. src/train.py: This is the script that needs to be run to train your model.
  2. src/test.py: This is the script that needs to be run to test your model.
  3. src/data_preprocessing.py: This script contains code to preprocess data for running.
  4. src/ontology.py: This script contains code to parse the ontology.
  5. src/config.ini: This file contains the configurational values for main.py, and can be adjusted to make the code run for conference, lebensmittel, freizeit and web-directorydatasets. This is explained in further detail below.

We also provide the datasets used for experimentation, in the datasets folder (also included in the data appendix).

Regarding Spelling-check

One of the preprocessing steps, a spelling checker (and corrector) was implemented using the RapidAPI GrammarBot (https://rapidapi.com/grammarbot/api/grammarbot/). If you wish to use it (for better accuracy and/or reproducing the results in our work), please create an API key on this tool and add it to line 12 of data_preprocessing.py. Note that this tool charges for requests beyond a certain limit, so please be mindful of the same.

Using this tool, of course, is optional and currently the script is setup to ignore spell-check.

Configuration

This section details in tabular format, the various configurational fields in config.ini and the best performing values for each of the datasets.

Parameter Conference Lebensmittel Freizeit Web-directory Description
Name conference lebensmittel freizeit web-directory Name of dataset
K 7 5 5 5 Value of K used in K-fold sliding window
ontology_split True False False False Split training data at ontology level (True) or on element level (False)
max_false_examples 150000 150000 150000 150000 Max number of false (dissimilar) examples to take while training
has_spellcheck True False False False Whether or not to use an English spelling checker while preprocessing.
max_paths 2 2 16 1 Max number of paths to consider, per node
max_pathlen 26 1 1 3 Max length of the path to consider
bag_of_neighbours True False False True Determines whether one-hop neighbours are treated as a bag of nodes, or path of length one
weighted_sum True False False True Determines whether unified path representation is computed using weighted sum, or max pooling
lr 0.001 0.001 0.001 0.001 Learning rate
num_epochs 50 50 50 50 Number of epochs
weight_decay 0.001 0.001 0.001 0.001 Weight decay
batch_size 32 32 32 32 Batch size

veealign's People

Contributors

naveen-panwar avatar remorax avatar shanmukhibm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

veealign's Issues

code issues

Hi,

first of all thank you very much for sharing the code, database and models! :)

Unfortunately, your code is not runnable with out quit a bit of modifying and making assumptions. I guess you forgot to push the latest version of the src/train.py and src/test.py files when you updated the DataParser or the src/data_preprocessing.py file in the last commmit (5d5d214) ? I'm guessing this because in the train.py and test.py files, the way the DataParser gets instantiated, does not match the signature of the init function. Further, the return values of the DataParser.process do not match the values you expect from the calls to the function in the train.py and test.py files.

Can you please provide the corrected files :) ?

Thank you very much in advance!

Config of VeeAlign on Conference

Hello,
I read your paper which published under OAEI 2020, the configuration of VeeAlign is max_paths = 21, max_pathlen = 8 for conference dataset, but you mentioned different configurations in the README for conference dataset.

Which configurations did you use while training the model for that dataset ?

Thanks.

[EDIT] Closing as the given config is for the EMNLP 2021 paper, as mentioned in the README

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.