File size: 19,280 Bytes
93abcbb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
---
language: English
tags:
- classification English model
datasets:
- jrc-acquis
widget:
- text: "Protocol to the Partnership and Cooperation Agreement establishing a partnership between the European Communities and their Member States, of the one part, and the Russian Federation, of the other part, to take account of the accession of the Czech Republic, the Republic of Estonia, the Republic of Cyprus, the Republic of Latvia, the Republic of Lithuania, the Republic of Hungary, the Republic of Malta, the Republic of Poland, the Republic of Slovenia, and the Slovak Republic to the European Union THE KINGDOM OF BELGIUM, THE CZECH REPUBLIC, THE KINGDOM OF DENMARK, THE FEDERAL REPUBLIC OF GERMANY, THE REPUBLIC OF ESTONIA, THE HELLENIC REPUBLIC, THE KINGDOM OF SPAIN, THE FRENCH REPUBLIC, IRELAND, THE ITALIAN REPUBLIC, THE REPUBLIC OF CYPRUS, THE REPUBLIC OF LATVIA, THE REPUBLIC OF LITHUANIA, THE GRAND DUCHY OF LUXEMBOURG, THE REPUBLIC OF HUNGARY, THE REPUBLIC OF MALTA, THE KINGDOM OF THE NETHERLANDS, THE REPUBLIC OF AUSTRIA, THE REPUBLIC OF POLAND, THE PORTUGUESE REPUBLIC, THE REPUBLIC OF SLOVENIA, THE SLOVAK REPUBLIC, THE REPUBLIC OF FINLAND, THE KINGDOM OF SWEDEN, THE UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND, hereinafter referred to as the "Member States" represented by the Council of the European Union, and THE EUROPEAN COMMUNITY AND THE EUROPEAN ATOMIC ENERGY COMMUNITY, hereinafter referred to as "the Communities" represented by the Council of the European Union and the European Commission, of the one part, and THE RUSSIAN FEDERATION of the other part, HAVING REGARD TO the accession of the Czech Republic, Estonia, Cyprus, Latvia, Lithuania, Hungary, Malta, Poland, Slovenia and Slovakia to the European Union on 1 May 2004, HAVE AGREED AS FOLLOWS: Article 1 The Czech Republic, Estonia, Cyprus, Latvia, Lithuania, Hungary, Malta, Poland, Slovenia and Slovakia shall be Parties to the Partnership and Cooperation Agreement, establishing a partnership between the European Communities and their Member States, of the one part, and the Russian Federation, of the other part, signed at Corfu on 24 June 1994 (hereinafter the Agreement) and shall respectively adopt and take note, in the same manner, as the other Member States of the Community, of the texts of the Agreement, as well as of the Joint Declarations, Exchanges of Letters, and Declaration by the Russian Federation annexed to the Final Act signed on the same date and the Protocol to the Agreement of 21 May 1997 that entered into force on 12 October 2000. Article 2 To take into account recent institutional developments within the European Union, the Parties agree that following the expiry of the Treaty establishing the European Coal and Steel Community, existing provisions in the Agreement referring to the European Coal and Steel Community shall be deemed to refer to the European Community which has taken over all rights and obligations contracted by the European Coal and Steel Community. Article 3 This Protocol shall form an integral part of the Agreement. Article 4 1. This Protocol shall be approved by the Communities, by the Council of the European Union on behalf of the Member States, and by the Russian Federation in accordance with their own procedures. 2. The Parties shall notify each other of the accomplishment of the corresponding procedures referred to in the preceding paragraph. The instruments of approval shall be deposited with the General Secretariat of the Council of the European Union. Article 5 1. This Protocol shall enter into force on 1 May 2004 provided that all the instruments of approval of this Protocol have been deposited before that date. 2. If not all the instruments of approval of this Protocol have been deposited before that date, this Protocol shall enter into force on the first day of the first month following the date of the deposit of the last instrument of approval. 3. If not all the instruments of approval of this Protocol have been deposited before 1 May 2004, this Protocol shall apply provisionally with effect from 1 May 2004. Article 6 The texts of the Agreement, the Final Act and all documents annexed to it as well as the Protocol to the Partnership and Cooperation Agreement of 21 May 1997 are drawn up in the Czech, Estonian, Hungarian, Latvian, Lithuanian, Maltese, Polish, Slovene and Slovak languages. They are annexed to this Protocol [1] and are equally authentic with the texts in the other languages in which the Agreement, the Final Act and the documents annexed to it as well as the Protocol to the Partnership and Cooperation Agreement of 21 May 1997 are drawn up. Article 7 This Protocol is drawn up in duplicate in the Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Slovene, Slovak, Spanish, Swedish and Russian languages, each of these texts being equally authentic. Hecho en Luxemburgo, el veintisiete de abril de dos mil cuatro. V Lucemburku dne dvacátého sedmého dubna dva tisíce čtyři. Udfærdiget i Luxembourg den syvogtyvende april to tusind og fire. Geschehen zu Luxemburg am siebenundzwanzigsten April zweitausendundvier. Kahe tuhande neljanda aasta kahekümne seitsmendal aprillil Luxembourgis. Έγινε στo Λουξεμβούργο, στις είκοσι επτά Απριλίου δύο χιλιάδες τέσσερα. Done at Luxembourg on the twenty‐seventh day of April in the year two thousand and four. Fait à Luxembourg, le vingt‐sept avril deux mille quatre. Fatto a Lussemburgo, addì ventisette aprile duemilaquattro. Luksemburgā, divi tūkstoši ceturtā gada divdesmit septītajā aprīlī. Priimta du tūkstančiai ketvirtų metų balandžio dvidešimt septintą dieną Liuksemburge. Kelt Luxembourgban, a kétezer-negyedik év április havának huszonhetedik napján. Magħmul fil-Lussemburgu fis-sebgħa u għoxrin jum ta' April tas-sena elfejn u erbgħa. Gedaan te Luxemburg, de zevenentwintigste april tweeduizend vier. Sporządzono w Luksemburgu, dnia dwudziestego siódmego kwietnia roku dwa tysiące czwartego. Feito no Luxemburgo, em vinte e sete de Abril de dois mil e quatro. V Luxemburgu dvadsiateho siedmeho apríla dvetisícštyri. V Luxembourgu, dne sedemindvajsetega aprila leta dva tisoč štiri. Tehty Luxemburgissa kahdentenakymmenentenäseitsemäntenä päivänä huhtikuuta vuonna kaksituhattaneljä. Som skedde i Luxemburg den tjugosjunde april tjugohundrafyra. Совершенно в Люксембурге двацати седьмого апреля 2004 г. Por los Estados miembros Za členské státy For medlemsstaterne Für die Mitgliedstaaten Liikmesriikide nimel Για τα κράτη μέλη For the Member States Pour les États membres Per gli Stati membri Dalībvalstu vārdā Valstybių narių vardu A tagállamok részéről Għall-Istati Membri Voor de lidstaten W imieniu Państw Członkowskich Pelos Estados-Membros Za členské štáty Za države članice Jäsenvaltioiden puolesta På medlemsstaternas vägnar Аъзо Давлатлар Номидан +++++ TIFF +++++ Por las Comunidades Europeas Za Evropská společenství For De Europæiske Fællesskaber Für die Europäischen Gemeinschaften Euroopa ühenduste nimel Για τις Ευρωπαϊκές Κοινότητες For the European Communities Pour les Communautés européennes Per le Comunità europee Eiropas Kopienu vārdā Europos Bendrijų vardu Az Európai Közösségek részéről Għall-Komunitajiet Ewropej Voor de Europese Gemeenschappen W imieniu Wspólnot Europejskich Pelas Comunidades Europeias Za Európske spoločenstvá Za Evropske skupnosti Euroopan yhteisöjen puolesta På europeiska gemenskapernas vägnar Европа Xамжамиятлари Номидан +++++ TIFF +++++ Por la Federación de Rusia Za Ruskou federaci For Den Russiske Føderation Für die Russische Föderation Venemaa Föderatsiooni nimel Για τη Ρωσική Ομοσπονδία For the Russian Federation Pour la Fédération de Russie Per la Federazione russa Krievijas Federācijas vārdā Rusijos Federacijos vardu Az Orosz Föderáció részéről Għall-Federazzjoni Russa Voor de Russische Federatie W imieniu Federacji Rosyjskiej Pela Federação da Rússia Za Ruskú federáciu Za Rusko federacijo Venäjän federaation puolesta På ryska federationen vägnar Ўзбекистон Республикаси Номидан +++++ TIFF +++++ [1] The Czech, Estonian, Latvian, Lithuanian, Hungarian, Maltese, Polish, Slovak and Slovenian versions of the Agreement shall be published in a special edition of the Official Journal at a later date. --------------------------------------------------"
---
# legal_t5_small_cls_en model
Model for classification of legal text written in English. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.
## Model description
legal_t5_small_cls_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.
## Intended uses & limitations
The model could be used for classification of legal texts written in English.
### How to use
Here is how to use this model to classify legal text written in English in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_cls_en"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_cls_en", do_lower_case=False,
skip_special_tokens=True),
device=0
)
en_text = "Protocol to the Partnership and Cooperation Agreement establishing a partnership between the European Communities and their Member States, of the one part, and the Russian Federation, of the other part, to take account of the accession of the Czech Republic, the Republic of Estonia, the Republic of Cyprus, the Republic of Latvia, the Republic of Lithuania, the Republic of Hungary, the Republic of Malta, the Republic of Poland, the Republic of Slovenia, and the Slovak Republic to the European Union THE KINGDOM OF BELGIUM, THE CZECH REPUBLIC, THE KINGDOM OF DENMARK, THE FEDERAL REPUBLIC OF GERMANY, THE REPUBLIC OF ESTONIA, THE HELLENIC REPUBLIC, THE KINGDOM OF SPAIN, THE FRENCH REPUBLIC, IRELAND, THE ITALIAN REPUBLIC, THE REPUBLIC OF CYPRUS, THE REPUBLIC OF LATVIA, THE REPUBLIC OF LITHUANIA, THE GRAND DUCHY OF LUXEMBOURG, THE REPUBLIC OF HUNGARY, THE REPUBLIC OF MALTA, THE KINGDOM OF THE NETHERLANDS, THE REPUBLIC OF AUSTRIA, THE REPUBLIC OF POLAND, THE PORTUGUESE REPUBLIC, THE REPUBLIC OF SLOVENIA, THE SLOVAK REPUBLIC, THE REPUBLIC OF FINLAND, THE KINGDOM OF SWEDEN, THE UNITED KINGDOM OF GREAT BRITAIN AND NORTHERN IRELAND, hereinafter referred to as the "Member States" represented by the Council of the European Union, and THE EUROPEAN COMMUNITY AND THE EUROPEAN ATOMIC ENERGY COMMUNITY, hereinafter referred to as "the Communities" represented by the Council of the European Union and the European Commission, of the one part, and THE RUSSIAN FEDERATION of the other part, HAVING REGARD TO the accession of the Czech Republic, Estonia, Cyprus, Latvia, Lithuania, Hungary, Malta, Poland, Slovenia and Slovakia to the European Union on 1 May 2004, HAVE AGREED AS FOLLOWS: Article 1 The Czech Republic, Estonia, Cyprus, Latvia, Lithuania, Hungary, Malta, Poland, Slovenia and Slovakia shall be Parties to the Partnership and Cooperation Agreement, establishing a partnership between the European Communities and their Member States, of the one part, and the Russian Federation, of the other part, signed at Corfu on 24 June 1994 (hereinafter the Agreement) and shall respectively adopt and take note, in the same manner, as the other Member States of the Community, of the texts of the Agreement, as well as of the Joint Declarations, Exchanges of Letters, and Declaration by the Russian Federation annexed to the Final Act signed on the same date and the Protocol to the Agreement of 21 May 1997 that entered into force on 12 October 2000. Article 2 To take into account recent institutional developments within the European Union, the Parties agree that following the expiry of the Treaty establishing the European Coal and Steel Community, existing provisions in the Agreement referring to the European Coal and Steel Community shall be deemed to refer to the European Community which has taken over all rights and obligations contracted by the European Coal and Steel Community. Article 3 This Protocol shall form an integral part of the Agreement. Article 4 1. This Protocol shall be approved by the Communities, by the Council of the European Union on behalf of the Member States, and by the Russian Federation in accordance with their own procedures. 2. The Parties shall notify each other of the accomplishment of the corresponding procedures referred to in the preceding paragraph. The instruments of approval shall be deposited with the General Secretariat of the Council of the European Union. Article 5 1. This Protocol shall enter into force on 1 May 2004 provided that all the instruments of approval of this Protocol have been deposited before that date. 2. If not all the instruments of approval of this Protocol have been deposited before that date, this Protocol shall enter into force on the first day of the first month following the date of the deposit of the last instrument of approval. 3. If not all the instruments of approval of this Protocol have been deposited before 1 May 2004, this Protocol shall apply provisionally with effect from 1 May 2004. Article 6 The texts of the Agreement, the Final Act and all documents annexed to it as well as the Protocol to the Partnership and Cooperation Agreement of 21 May 1997 are drawn up in the Czech, Estonian, Hungarian, Latvian, Lithuanian, Maltese, Polish, Slovene and Slovak languages. They are annexed to this Protocol [1] and are equally authentic with the texts in the other languages in which the Agreement, the Final Act and the documents annexed to it as well as the Protocol to the Partnership and Cooperation Agreement of 21 May 1997 are drawn up. Article 7 This Protocol is drawn up in duplicate in the Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Slovene, Slovak, Spanish, Swedish and Russian languages, each of these texts being equally authentic. Hecho en Luxemburgo, el veintisiete de abril de dos mil cuatro. V Lucemburku dne dvacátého sedmého dubna dva tisíce čtyři. Udfærdiget i Luxembourg den syvogtyvende april to tusind og fire. Geschehen zu Luxemburg am siebenundzwanzigsten April zweitausendundvier. Kahe tuhande neljanda aasta kahekümne seitsmendal aprillil Luxembourgis. Έγινε στo Λουξεμβούργο, στις είκοσι επτά Απριλίου δύο χιλιάδες τέσσερα. Done at Luxembourg on the twenty‐seventh day of April in the year two thousand and four. Fait à Luxembourg, le vingt‐sept avril deux mille quatre. Fatto a Lussemburgo, addì ventisette aprile duemilaquattro. Luksemburgā, divi tūkstoši ceturtā gada divdesmit septītajā aprīlī. Priimta du tūkstančiai ketvirtų metų balandžio dvidešimt septintą dieną Liuksemburge. Kelt Luxembourgban, a kétezer-negyedik év április havának huszonhetedik napján. Magħmul fil-Lussemburgu fis-sebgħa u għoxrin jum ta' April tas-sena elfejn u erbgħa. Gedaan te Luxemburg, de zevenentwintigste april tweeduizend vier. Sporządzono w Luksemburgu, dnia dwudziestego siódmego kwietnia roku dwa tysiące czwartego. Feito no Luxemburgo, em vinte e sete de Abril de dois mil e quatro. V Luxemburgu dvadsiateho siedmeho apríla dvetisícštyri. V Luxembourgu, dne sedemindvajsetega aprila leta dva tisoč štiri. Tehty Luxemburgissa kahdentenakymmenentenäseitsemäntenä päivänä huhtikuuta vuonna kaksituhattaneljä. Som skedde i Luxemburg den tjugosjunde april tjugohundrafyra. Совершенно в Люксембурге двацати седьмого апреля 2004 г. Por los Estados miembros Za členské státy For medlemsstaterne Für die Mitgliedstaaten Liikmesriikide nimel Για τα κράτη μέλη For the Member States Pour les États membres Per gli Stati membri Dalībvalstu vārdā Valstybių narių vardu A tagállamok részéről Għall-Istati Membri Voor de lidstaten W imieniu Państw Członkowskich Pelos Estados-Membros Za členské štáty Za države članice Jäsenvaltioiden puolesta På medlemsstaternas vägnar Аъзо Давлатлар Номидан +++++ TIFF +++++ Por las Comunidades Europeas Za Evropská společenství For De Europæiske Fællesskaber Für die Europäischen Gemeinschaften Euroopa ühenduste nimel Για τις Ευρωπαϊκές Κοινότητες For the European Communities Pour les Communautés européennes Per le Comunità europee Eiropas Kopienu vārdā Europos Bendrijų vardu Az Európai Közösségek részéről Għall-Komunitajiet Ewropej Voor de Europese Gemeenschappen W imieniu Wspólnot Europejskich Pelas Comunidades Europeias Za Európske spoločenstvá Za Evropske skupnosti Euroopan yhteisöjen puolesta På europeiska gemenskapernas vägnar Европа Xамжамиятлари Номидан +++++ TIFF +++++ Por la Federación de Rusia Za Ruskou federaci For Den Russiske Føderation Für die Russische Föderation Venemaa Föderatsiooni nimel Για τη Ρωσική Ομοσπονδία For the Russian Federation Pour la Fédération de Russie Per la Federazione russa Krievijas Federācijas vārdā Rusijos Federacijos vardu Az Orosz Föderáció részéről Għall-Federazzjoni Russa Voor de Russische Federatie W imieniu Federacji Rosyjskiej Pela Federação da Rússia Za Ruskú federáciu Za Rusko federacijo Venäjän federaation puolesta På ryska federationen vägnar Ўзбекистон Республикаси Номидан +++++ TIFF +++++ [1] The Czech, Estonian, Latvian, Lithuanian, Hungarian, Maltese, Polish, Slovak and Slovenian versions of the Agreement shall be published in a special edition of the Official Journal at a later date. --------------------------------------------------"
pipeline([en_text], max_length=512)
```
## Training data
The legal_t5_small_cls_en model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 14 Thousand texts.
## Training procedure
### Preprocessing
### Pretraining
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.
## Evaluation results
When the model is used for classification test dataset, achieves the following results:
Test results :
| Model | F1 score |
|:-----:|:-----:|
| legal_t5_small_cls_en | 0.6247|
### BibTeX entry and citation info
|