BERT Romanian juridical model trained using a masked language modeling (MLM) and next sentence prediction (NSP) objective.
It was introduced in this
paper. Two BERT models were released:
jurBERT-base and
jurBERT-large, all versions uncased.
1# tensorflow
2from transformers import AutoModel, AutoTokenizer, TFAutoModel
3tokenizer = AutoTokenizer.from_pretrained("readerbench/jurBERT-large")
4model = TFAutoModel.from_pretrained("readerbench/jurBERT-large")
5inputs = tokenizer("exemplu de propoziție", return_tensors="tf")
6outputs = model(inputs)
7
8
9# pytorch
10from transformers import AutoModel, AutoTokenizer, AutoModel
11tokenizer = AutoTokenizer.from_pretrained("readerbench/jurBERT-large")
12model = AutoModel.from_pretrained("readerbench/jurBERT-large")
13inputs = tokenizer("exemplu de propoziție", return_tensors="pt")
14outputs = model(**inputs)
The model is trained on a private corpus (that can nevertheless be rented for a fee), that is comprised of all the final ruling, containing both civil and criminal cases, published by any Romanian civil court between 2010 and 2018. Validation is performed on RoBanking datase. We extracted from RoJur common types of cases pertinent to the banking domain (e.g. administration fee litigations, enforcement appeals), kept only the summary of the arguments provided by both the plaitiffs and the defendants and the final verdict (in the form of a boolean value) to build RoBanking.
We report Mean AUC and Std AUC on the task of predicting the outcome of a case.
For complete results and discussion please refer to the
paper.
1@inproceedings{masala2021jurbert,
2 title={jurBERT: A Romanian BERT Model for Legal Judgement Prediction},
3 author={Masala, Mihai and Iacob, Radu Cristian Alexandru and Uban, Ana Sabina and Cidota, Marina and Velicu, Horia and Rebedea, Traian and Popescu, Marius},
4 booktitle={Proceedings of the Natural Legal Language Processing Workshop 2021},
5 pages={86--94},
6 year={2021}
7}