Spindle Parses Into Dependency-Decorated λ Expressions
Use to parse Dutch sentences into deep syntactic parses expressed as proofs/terms of multiplicative intuitionuistic linear logic with dependency modalities.
Try out the online version at the link below (wip):
git clone git@github.com:konstantinosKokos/spindle.git
conda env create --name spindle --file=environment.yml
These can be found here. Place them in the
data
directory.
You're good to go! Parse your first sentences as follows:
from inference import InferenceWrapper
inferer = InferenceWrapper(weight_path='./data/model_weights.pt',
atom_map_path='./data/atom_map.tsv',
config_path='./data/bert_config.json',
device='cuda') # replace with 'cpu' if no GPU accelaration
analyses = inferer.analyze(['Dit is een voοrbeeldzin'])
If you want to inspect examples outside the console, you can compile proofs into TeX using the extraction code:
from aethel.utils.tex import compile_tex, sample_to_tex
compile_tex(sample_to_tex(sample=..., # an Analysis object
show_intermediate_terms=..., # bool
show_words_at_leaves=..., # bool
show_sentence=..., # bool
show_final_term=...,)) # bool
Please cite the following paper if you use spindle:
@inproceedings{spindle,
title = "{SPINDLE}: Spinning Raw Text into Lambda Terms with Graph Attention",
author = {Kogkalidis, Konstantinos and
Moortgat, Michael and
Moot, Richard},
booktitle = "Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations",
month = may,
year = "2023",
address = "Dubrovnik, Croatia",
publisher = "Association for Computational Linguistics",
If you have any questions or comments or encounter any difficulties, please feel free to get in touch, or open an issue.