---
language:
- en
- ru
library_name: transformers
pipeline_tag: other
base_model: cointegrated/rut5-base-multitask
base_model_relation: finetune
tags:
- text-to-graph
- webnlg
- bt5
---
# BT5 English–Russian Semantic Parsing
This model converts English or Russian text into subject–relation–object triples. It follows the BT5 method of [Agarwal et al. (2020)](https://aclanthology.org/2020.webnlg-1.13/) and was initialized from `cointegrated/rut5-base-multitask` and trained with six equally sampled parsing and translation tasks.
The first author of the [XQDT paper](https://huggingface.co/papers/2608.29948) reproduced BT5 for use as a base text-to-data model in that study. The [reproduction repository](https://github.com/guihuzhang/bt5-regen-text-to-graph) contains the code, saved predictions, and evaluation scripts.
The checkpoint is step 54,000. Its saved WebNLG 2020 test predictions give Exact F1 of 67.62 for English and 93.46 for Russian, using five-beam decoding.
## Usage
```python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_path = "Loria-MosAIk/bt5-webnlg-en-ru"
tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
model = AutoModelForSeq2SeqLM.from_pretrained(model_path).eval()
inputs = tokenizer("Parse English Lina Dorado was born in Bogotá in 1975.", return_tensors="pt")
outputs = model.generate(**inputs, num_beams=5, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True, clean_up_tokenization_spaces=False))
```
English output (`` = subject, `
` = relation, `` = object):
```text
Lina Dorado birth year 1975 Lina Dorado birth place Bogotá
```
Russian example:
```text
Input: Parse Russian Валюта Индии - Индийская рупия.
Output: India currency Indian rupee
```
The scorer counts identical predicted triples only once per input.
The [base model](https://huggingface.co/cointegrated/rut5-base-multitask) is distributed under MIT. The WebNLG data used for fine-tuning are distributed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/).
## Citation
Original BT5 model: [Agarwal et al. (2020)](https://aclanthology.org/2020.webnlg-1.13/).
```bibtex
@inproceedings{agarwal-etal-2020-machine,
title = "Machine Translation Aided Bilingual Data-to-Text Generation and Semantic Parsing",
author = "Agarwal, Oshin and
Kale, Mihir and
Ge, Heming and
Shakeri, Siamak and
Al-Rfou, Rami",
editor = "Castro Ferreira, Thiago and
Gardent, Claire and
Ilinykh, Nikolai and
van der Lee, Chris and
Mille, Simon and
Moussallem, Diego and
Shimorina, Anastasia",
booktitle = "Proceedings of the 3rd International Workshop on Natural Language Generation from the Semantic Web ({W}eb{NLG}+)",
month = "12",
year = "2020",
address = "Dublin, Ireland (Virtual)",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2020.webnlg-1.13/",
pages = "125--130"
}
```
This checkpoint and reproduction code: [Efimov-Zhang et al. (2026)](https://aclanthology.org/2026.emnlp-main.397/).
```bibtex
@inproceedings{efimov-zhang-etal-2026-xqdt,
title = "{XQDT}: e{X}plainable and Quantitative Data-Text Alignment Metric with Feedback Signals",
author = "Efimov-Zhang, Kun and
Song, Yifei and
Gardent, Claire",
editor = "Lee, Hung-Yi and
Dev, Sunipa and
Li, Jessy and
Elliott, Desmond",
booktitle = "Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing",
month = oct,
year = "2026",
address = "Budapest, Hungary",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.emnlp-main.397/",
doi = "10.18653/2026.emnlp-main.397",
pages = "9121--9157",
ISBN = "979-8-89176-459-0"
}
```