mihaimasala commited on
Commit
a7c129a
1 Parent(s): 741ad14

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +104 -1
README.md CHANGED
@@ -7,4 +7,107 @@ language:
7
 
8
  # jurBERT-base
9
 
10
- TODO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  # jurBERT-base
9
 
10
+
11
+ ## Pretrained juridical BERT model for Romanian
12
+
13
+ BERT Romanian juridical model trained using a masked language modeling (MLM) and next sentence prediction (NSP) objective.
14
+ It was introduced in this [paper](TODO). Two BERT models were released: **jurBERT-base** and **jurBERT-large**, all versions uncased.
15
+
16
+ | Model | Weights | L | H | A | MLM accuracy | NSP accuracy |
17
+ |----------------|:---------:|:------:|:------:|:------:|:--------------:|:--------------:|
18
+ | *jurBERT-base* | *111M* | *12* | *768* | *12* | *0.8936* | *0.9923* |
19
+ | jurBERT-large | 337M | 24 | 1024 | 24 | 0.9005 | 0.9929 |
20
+
21
+
22
+
23
+
24
+ All models are available:
25
+
26
+ * [jurBERT-base](https://huggingface.co/readerbench/jurBERT-base)
27
+ * [jurBERT-large](https://huggingface.co/readerbench/jurBERT-large)
28
+
29
+
30
+
31
+ #### How to use
32
+
33
+ ```python
34
+ # tensorflow
35
+ from transformers import AutoModel, AutoTokenizer, TFAutoModel
36
+ tokenizer = AutoTokenizer.from_pretrained("readerbench/jurBERT-base")
37
+ model = TFAutoModel.from_pretrained("readerbench/jurBERT-base")
38
+ inputs = tokenizer("exemplu de propoziție", return_tensors="tf")
39
+ outputs = model(inputs)
40
+
41
+
42
+ # pytorch
43
+ from transformers import AutoModel, AutoTokenizer, AutoModel
44
+ tokenizer = AutoTokenizer.from_pretrained("readerbench/jurBERT-base")
45
+ model = AutoModel.from_pretrained("readerbench/jurBERT-base")
46
+ inputs = tokenizer("exemplu de propoziție", return_tensors="pt")
47
+ outputs = model(**inputs)
48
+ ```
49
+
50
+
51
+ ## Datasets
52
+
53
+ 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 two other datasets, RoBanking and BRDCases. 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. BRDCases represents a collection of cases in which BRD Groupe Société Générale Romania was directly involved.
54
+
55
+ | Corpus | Scope |Entries | Size (GB)|
56
+ |-----------|:------------:|:---------:|:---------:|
57
+ | RoJur | pre-training | 11M | 160 |
58
+ | RoBanking | downstream | 108k | - |
59
+ | BRDCases | downstream | 149 | - |
60
+
61
+
62
+ ## Downstream performance
63
+
64
+ We report Mean AUC and Std AUC on the task of predicting the outcome of a case.
65
+
66
+ ### Results on RoBanking using only the plea of the plaintiff.
67
+
68
+ | Model | Mean AUC | Std AUC |
69
+ |--------------------|:--------:|:--------:|
70
+ | CNN | 79.60 | - |
71
+ | BI-LSTM | 80.99 | 0.26 |
72
+ | RoBERT-small | 70.54 | 0.28 |
73
+ | RoBERT-base | 79.74 | 0.21 |
74
+ | RoBERT-base + hf | 79.82 | 0.11 |
75
+ | RoBERT-large | 76.53 | 5.43 |
76
+ | **jurBERT-base** | **81.47**| **0.18** |
77
+ | *jurBERT-base + hf*| *81.40* | *0.18* |
78
+ | jurBERT-large | 78.38 | 1.77 |
79
+
80
+ ### Results on RoBanking using pleas from both the plaintiff and defendant.
81
+
82
+ | Model | Mean AUC | Std AUC |
83
+ |---------------------|:--------:|:--------:|
84
+ | BI-LSTM | 84.60 | 0.59 |
85
+ | RoBERT-base | 84.40 | 0.26 |
86
+ | RoBERT-base + hf | 84.43 | 0.15 |
87
+ | *jurBERT-base* | *86.63* | *0.18* |
88
+ |**jurBERT-base + hf**| **86.73**| **0.22** |
89
+ | jurBERT-large | 82.04 | 0.64 |
90
+
91
+ ### Results on BRDCases
92
+
93
+ | Model | Mean AUC | Std AUC |
94
+ |---------------------|:--------:|:--------:|
95
+ | SVM with SK | 57.72 | 2.15 |
96
+ | RoBERT-base | 53.24 | 1.76 |
97
+ | RoBERT-base + hf | 55.40 | 0.96 |
98
+ | *jurBERT-base* | *59.65* | *1.16* |
99
+ |**jurBERT-base + hf**| **61.46**| **1.76** |
100
+
101
+ For complete results and discussion please refer to the [paper](TODO).
102
+
103
+ ### BibTeX entry and citation info
104
+
105
+ ```bibtex
106
+ @inproceedings{masala2021jurBERT,
107
+ title={jurBERT: A Romanian BERT Model for Legal Judgement Prediction},
108
+ author={Masala, Mihai and Iacob, Radu and Uban, Ana and Cidota, Marina and Velicu, Horia and Rebedea, Traian and Popescu, Marius},
109
+ booktitle={NLLP@EMNLP2021},
110
+ year={2021}
111
+ }
112
+ ```
113
+