Mainak Manna commited on
Commit
7403cfe
1 Parent(s): a22aa33

First version of the model

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ language: English
4
+ tags:
5
+ - summarization English model
6
+ datasets:
7
+ - jrc-acquis
8
+ widget:
9
+ - text: "Parties Applicant: Giampietro Torresan (Schonenfels, Switzerland) (represented by: Gianluca Recher, lawyer) Defendant: Office for Harmonisation in the Internal Market (Trade Marks and Designs) (OHIM) Other party to the proceedings before the Board of Appeal of OHIM: Klosterbrauerei Weissenohe GmbH %amp% Co. KG Form of order sought - annul the decision of the Second Board of Appeal of 29 June 2006 in proceedings R 517/2005-2, notified by fax of 5 July 2006, and confirm the registration of the Community trade mark CANNABIS for Classes 32 and 33; - in any case, order the costs of all of the proceedings to be reimbursed, including those of the previous two appeals before OHIM. Pleas in law and main arguments Registered Community trade mark in respect of which a declaration of invalidity has been sought: Word mark %quot%CANNABIS%quot% (application for registration No 1.073.349), for goods and services in Classes 32, 33 and 42. Proprietor of the Community trade mark: The applicant. Applicant for the declaration of invalidity: Klosterbrauerei Weissenohe GmbH %amp% Co. KG. Trade mark right of applicant for the declaration: The applicant for the declaration of invalidity does not claim any trade mark right. The declaration of invalidity is applied for in respect of goods in Classes 32 (beer) and 33 (wine, spirits, liqueurs, sparkling wine, champagne). Decision of the Cancellation Division: Application for declaration of invalidity partially granted, annulment of the registration of the Community trade mark as regards the products claimed in Classes 32 and 33. Decision of the Board of Appeal: Dismissal of the appeal. Pleas in law: Infringement and misapplication of Article 7(1)(c) of Regulation (EC) No 40/94 on the Community trade mark, and contradiction in the grounds of the contested decision. -------------------------------------------------- "
10
+
11
+ ---
12
+
13
+ # legal_t5_small_summ_en model
14
+
15
+ Model for Summarization of legal text written in English. It was first released in
16
+ [this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.
17
+
18
+
19
+ ## Model description
20
+
21
+ legal_t5_small_summ_en is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
22
+
23
+ ## Intended uses & limitations
24
+
25
+ The model could be used for summarization of legal texts written in English.
26
+
27
+ ### How to use
28
+
29
+ Here is how to use this model to summarize legal text written in English in PyTorch:
30
+
31
+ ```python
32
+ from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
33
+
34
+ pipeline = TranslationPipeline(
35
+ model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_summ_en"),
36
+ tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_summ_en", do_lower_case=False,
37
+ skip_special_tokens=True),
38
+ device=0
39
+ )
40
+
41
+ en_text = "Parties Applicant: Giampietro Torresan (Schonenfels, Switzerland) (represented by: Gianluca Recher, lawyer) Defendant: Office for Harmonisation in the Internal Market (Trade Marks and Designs) (OHIM) Other party to the proceedings before the Board of Appeal of OHIM: Klosterbrauerei Weissenohe GmbH %amp% Co. KG Form of order sought - annul the decision of the Second Board of Appeal of 29 June 2006 in proceedings R 517/2005-2, notified by fax of 5 July 2006, and confirm the registration of the Community trade mark CANNABIS for Classes 32 and 33; - in any case, order the costs of all of the proceedings to be reimbursed, including those of the previous two appeals before OHIM. Pleas in law and main arguments Registered Community trade mark in respect of which a declaration of invalidity has been sought: Word mark %quot%CANNABIS%quot% (application for registration No 1.073.349), for goods and services in Classes 32, 33 and 42. Proprietor of the Community trade mark: The applicant. Applicant for the declaration of invalidity: Klosterbrauerei Weissenohe GmbH %amp% Co. KG. Trade mark right of applicant for the declaration: The applicant for the declaration of invalidity does not claim any trade mark right. The declaration of invalidity is applied for in respect of goods in Classes 32 (beer) and 33 (wine, spirits, liqueurs, sparkling wine, champagne). Decision of the Cancellation Division: Application for declaration of invalidity partially granted, annulment of the registration of the Community trade mark as regards the products claimed in Classes 32 and 33. Decision of the Board of Appeal: Dismissal of the appeal. Pleas in law: Infringement and misapplication of Article 7(1)(c) of Regulation (EC) No 40/94 on the Community trade mark, and contradiction in the grounds of the contested decision. -------------------------------------------------- "
42
+
43
+ pipeline([en_text], max_length=512)
44
+ ```
45
+
46
+ ## Training data
47
+
48
+ The legal_t5_small_summ_en model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 22 Thousand texts.
49
+
50
+ ## Training procedure
51
+
52
+ ### Preprocessing
53
+
54
+ ### Pretraining
55
+ An unigram model with 88M parameters is trained over the complete parallel corpus to get the vocabulary (with byte pair encoding), which is used with this model.
56
+
57
+
58
+ ## Evaluation results
59
+
60
+ When the model is used for classification test dataset, achieves the following results:
61
+
62
+ Test results :
63
+
64
+ | Model | Rouge1 | Rouge2 | Rouge Lsum |
65
+ |:-----:|:-----:|:-----:|:-----:|
66
+ | legal_t5_small_cls_en | 78.11|68.78 |77.0|
67
+
68
+
69
+ ### BibTeX entry and citation info