-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Here you can find information about how to navigate our alignment-models repository and reproduce our analysis on automatic alignment model from the paper Aligning Actions Across Recipe Graphs
We compare the performance of our two alignment models (base and extended) with a baseline and a naive model:
| Model Name | Saves To |
|---|---|
| Alignment Model (extended) | ./results1 |
| Alignment Model (base) | ./results2 |
| Cosine Similarity Baseline | ./results3 |
| Naive Model | ./results4 |
We test the alignment models on a recipes corpus that we extract from Lin et al. 2020.
You can look up how each model performs in our analysis by checking out the corresponding accuracy rates reported in the Results section of the README file.
================================================================================
- Download the corpus from here.
Create directories to store the results (i.e.,
./results1,./results2,./results3,./results4). Optionally, change hyperparameters and path names in the fileconstants.pyhere.
- Run the following command from this directory:
python main.py [model_name] --embedding_name [embedding_name]
where [model_name] could be one of the following:
Sequence : Sequential Ordering of Alignments
Cosine_similarity : Cosine model (Baseline)
Naive : Common Action Pair Heuristics mode (Naive Model)
Alignment-no-feature : Base Alignment model (w/o parent+child nodes)
Alignment-with-feature : Extended Alignment model (with parent+child nodes)
and [embedding_name] could be one of the following:
bert : BERT embeddings (default)
elmo : ELMO embeddings
-
property_testing.py: Testing for reverse and transitivity property -
sequence_model.py: Sequence ordering of alignments -
training_testing.py: Training and testing functions -
utils.py: Utility functions