OMazzuzi90 commited on
Commit
fcbdb22
1 Parent(s): 1cb8983

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +92 -0
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ - translation_to_sql
6
+ - sql
7
+ model-index:
8
+ - name: Ita2SqlModel
9
+ results: []
10
+ datasets:
11
+ - OMazzuzi90/Ita2Sql_data_train
12
+ language:
13
+ - it
14
+ - sql
15
+ pipeline_tag: translation
16
+ ---
17
+
18
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
19
+ should probably proofread and complete it, then remove this comment. -->
20
+
21
+ # Ita2SqlModel
22
+
23
+ This model is a fine-tuned version of [t5-small](https://huggingface.co/t5-small) on [OMazzuzi90/Ita2Sql_data_train](https://huggingface.co/datasets/OMazzuzi90/Ita2Sql_data_train). dataset.
24
+
25
+ The following model is created with the aim of verifying if it is possible to translate the Italian language into SQL script.
26
+ The model is trained on a self-created dataset that associates various Italian sentences with a SQL script, in which synonyms are used.
27
+
28
+ For Example the script SELECT * FROM CLIENTI, in Italian it could be expressed by the following sentences:
29
+
30
+ - "MOSTRAMI TUTTI I CLIENTI"
31
+ - "VISUALIZZA TUTTI I CLIENTI"
32
+ - "SELEZIONA TUTTI I CLIENTI"
33
+
34
+ Clearly, with a much larger and more comprehensive dataset, for instance, one that includes all possible synonyms of an Italian verb, the model would be capable of being significantly more accurate. Currently, the dataset consists of about 21k rows.
35
+
36
+ ## Model description
37
+ The model takes uppercase sentences as input, with the prefix "TRANSLATE ITA TO SQL: " followed by the phrase that you want to try to translate.
38
+
39
+ Here are some functional and usable examples:
40
+
41
+ TRANSLATE ITA TO SQL: MOSTRAMI TUTTI I [TABLE]
42
+ Ex:
43
+ TRANSLATE ITA TO SQL: MOSTRAMI TUTTI I CLIENTI
44
+ SELECT * FROM CLIENTI
45
+
46
+ TRANSLATE ITA TO SQL: MOSTRAMI [COLUMN] DEI [TABLE]
47
+ Ex:
48
+ TRANSLATE ITA TO SQL: MOSTRAMI NOME DEI CLIENTI
49
+ SELECT NOME FROM CLIENTI
50
+
51
+ TRANSLATE ITALIAN TO SQL: MOSTRAMI [COLUMN] DEI [TABLE] QUANDO [COLUMN] COMPRESA TRA [PARAM1] E [PARAM2]
52
+ Ex:
53
+ TRANSLATE ITALIAN TO SQL: MOSTRAMI NOME DEI CLIENTI QUANDO ETA COMPRESA TRA 18 E 23
54
+ SELECT NOME FROM CLIENTI WHERE ETA BETWEEN 18 AND 23
55
+
56
+ TRANSLATE ITALIAN TO SQL: MOSTRAMI [COLUMN1],[COLUMN2] DEI [TABLE] QUANDO [COLUMNI] UGUALE [PARAM]
57
+ Ex:
58
+ TRANSLATE ITALIAN TO SQL: MOSTRAMI NOME,COGNOME DEI GIOCATORI QUANDO SQUADRA UGUALE INTER
59
+ SELECT NOME,COGNOME FROM CLIENTI WHERE SQUADRA =’INTER’
60
+
61
+
62
+ TRANSLATE ITALIAN TO SQL: FAMMI VEDERE [COLUMN1],[COLUMN2],[COLUMNX] DEI [TABLE] QUANDO [COLUM] UGUALE [PARAM1] OPPURE [PARAM2]
63
+ Ex :
64
+ TRANSLATE ITALIAN TO SQL: MOSTRAMI NOME,COGNOME,ID,ETA DEI CLIENTI QUANDO NOME UGUALE ALESSIO OPPURE MARCO
65
+ SELECT NOME,COGNOME,ID,ETA FROM CLIENTI WHERE NOME =’ALESSIO’ OR NOME=’MARCO'
66
+
67
+
68
+ ## Intended uses & limitations
69
+
70
+ More information needed
71
+
72
+ ## Training and evaluation data
73
+
74
+ You can see https://huggingface.co/OMazzuzi90/Ita2SqlModel/tensorboard for more details.
75
+
76
+ ### Training hyperparameters
77
+
78
+ The following hyperparameters were used during training:
79
+ - learning_rate: 2e-05
80
+ - train_batch_size: 16
81
+ - eval_batch_size: 16
82
+ - seed: 42
83
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
84
+ - lr_scheduler_type: linear
85
+ - num_epochs: 11
86
+
87
+ ### Framework versions
88
+
89
+ - Transformers 4.28.0
90
+ - Pytorch 2.0.1+cu118
91
+ - Datasets 2.12.0
92
+ - Tokenizers 0.13.3