Browse Source

Merge branch 'feature/refactor-findtexts'

francesco 1 year ago
parent
commit
59a890db74

+ 2 - 1
.gitignore

@@ -1,7 +1,8 @@
 .DS_Store
 TIgrO
-*/.DS_Store
+**/.DS_Store
 **/.vscode/*
 Progetto2023_BE.log
 .idea/*
 **/__pycache__/
+flask_be/nohup.out

+ 37 - 0
Prova_Docker.md

@@ -0,0 +1,37 @@
+Abbiamo provato a creare un container di Docker su Windows, per il solo sito -- senza BE -- usando Apache.
+
+1. Installato Docker
+2. Seguito il tutorial su https://phoenixnap.com/kb/docker-apache
+	--> Run Apache via Dockerfile
+3. Personalizzato il Dockerfile copiando tutto il sito anziché il solo index.html come nel tutorial.
+
+Contenuto del Dockerfile:
+
+'''
+FROM httpd:latest
+COPY site2 /usr/local/apache2/htdocs
+EXPOSE 80
+'''
+
+Note:
+	- FROM scarica Apache (--> 'httpd') da una repo ufficiale gestita da Docker (capito parzialmente)
+	- COPY copia il sito sulla cartella di Apache (domanda: donde està?)
+	- EXPOSE in un qualche senso espone il servizio sulla porta 80
+
+4. Il tutorial suggerisce come creare l'immagine e runnare il container su Linux. Su Windows i comandi sono leggermente diversi. Comandi usati:
+
+	--> docker buildx build -t site2_0 .
+
+Fa il build dell'immagine usando il Dockerfile dalla cartella corrente. L'argomento dopo -t è il nome dell'immagine.
+
+	--> docker run -d --name apache -p 80:80 site2_0
+
+Fa il run di un container di nome 'apache' usando l'immagine di nome 'site2_0'. -p setta le porte (perché 2?).
+
+A questo punto, il sito risulta disponibile su localhost, chiaramente senza BE. Sembra funzionare bene.
+
+NOTA FINALE:
+
+L'app di Windows 'Docker Desktop' si è rivelata deludente... Permette di monitorare/lanciare/stoppare/cancellare immagini e container già esistenti, ma non è granché di aiuto nel CREARNE di nuovi. Vabbo', è anche perché non ci capisco una mazza ancora, probabilmente.
+
+Kora

+ 3 - 0
db/Dockerfile

@@ -0,0 +1,3 @@
+FROM tigro_be:latest
+
+COPY . /usr/local/db/

BIN
db/ndg2.gat4/corpus.db


+ 1 - 2
db/ndg2.gat4/keys/vettSpec.csv

@@ -1037,8 +1037,7 @@ intcode,unicode
 30001,AA
 30002,BA
 30003,194
-30004,"195
-195"
+30004,195
 30005,196
 30006,19B
 30007,1A2

+ 2 - 0
flask_be/.dockerignore

@@ -0,0 +1,2 @@
+**/__pycache__
+**/venv

+ 9 - 0
flask_be/Dockerfile

@@ -0,0 +1,9 @@
+FROM python:3.11.4-bullseye
+
+COPY . /usr/local/app/
+RUN ["pip", "install", "waitress"]
+WORKDIR /usr/local/app/
+RUN ["pip", "install", "-r", "requirements.txt"]
+CMD ["waitress-serve", "--listen=0.0.0.0:5000", "app:app"]
+
+EXPOSE 5000

+ 12 - 19
flask_be/app.py

@@ -1,49 +1,43 @@
 from flask import Flask, request
 import traceback
 
-from engine.handle_request import handleOccGetQuery, handleGetContext, handleSingleContext
+from engine.request_handlers import handleGetOccurrences, handleGetContexts, handleGetSingleContext
 from Config.config_loader import config
 
 
 app = Flask(__name__)
 config(app)
 
-
 ################################################################
 # parte di codice da copiare per fare un altro endpoint in Flask
-####
-# Basic queries
+################################################################
+# ENDPOINT: Basic queries
 @app.route('/simple_get_query', methods=['POST'])
 def simpleQuery():
 
-    # # This is -- or WAS -- a stupid (and hopefully TEMPORARY) way of handling the JSON data, but it works;
-    # # trying to send application/json data causes Flask to complain and I can't understand why!    
-    # queryDTO = json.loads( request.form['stringifiedDTO'] )
-    # # UP TO HERE
-
     app.logger.info('Request successfully received by the Simple Get Query API')
 
     try:
         queryDTO = request.get_json() # new (and correct) way!
         queryList = queryDTO['queryList']
         cooccorrenze = queryDTO.get('cooccorrenze')
-        output = handleOccGetQuery(queryList, cooccorrenze, app.config['DATA_CONFIG'])
+        output = handleGetOccurrences(queryList, cooccorrenze, app.config['DATA_CONFIG'])
 
         app.logger.info('Request successfully executed, sending output')
         return output, 200
 
     except Exception as err:
-        # Log the exception? Send it back to FE?
+        # Exceptions get printed and logged; nothing is sent to the FE
         emptyOut = {}
         app.logger.error(traceback.format_exc())
         print(traceback.format_exc())
         return emptyOut, 500
+#################################################################
 # fino a qui
 #################################################################
 
 
-#################################################################
-# chiama funzione per contesti multipli
+# ENDPOINT: chiama funzione per contesti multipli
 @app.route('/get_context', methods=['POST'])
 def simpleContext():
 
@@ -56,13 +50,13 @@ def simpleContext():
     
         output = {}
         if len(listResults)>0:
-            output = handleGetContext(queryList, listResults, app.config['DATA_CONFIG'])
+            output = handleGetContexts(queryList, listResults, app.config['DATA_CONFIG'])
 
         app.logger.info('Request successfully executed, sending output')
         return output, 200
 
     except Exception as err:
-        # Log the exception? Send it back to FE?
+        # Exceptions get printed and logged; nothing is sent to the FE
         emptyOut = {}
         app.logger.error(traceback.format_exc())
         print(traceback.format_exc())
@@ -70,8 +64,7 @@ def simpleContext():
 #################################################################
 
 
-#################################################################
-# chiama funzione per contesti singoli
+# ENDPOINT: chiama funzione per contesti singoli
 @app.route('/get_single_context', methods=['POST'])
 def singleContext():
 
@@ -82,13 +75,13 @@ def singleContext():
         elem = queryGSC['elem']
         params = queryGSC['params']
     
-        output = handleSingleContext(elem, params, app.config['DATA_CONFIG'])
+        output = handleGetSingleContext(elem, params, app.config['DATA_CONFIG'])
 
         app.logger.info('Request successfully executed, sending output')
         return output, 200
 
     except Exception as err:
-        # Log the exception? Send it back to FE?
+        # Exceptions get printed and logged; nothing is sent to the FE
         emptyOut = {}
         app.logger.error(traceback.format_exc())
         print(traceback.format_exc())

+ 63 - 29
flask_be/engine/basic_queries.py

@@ -1,14 +1,13 @@
 #%%
 import json
 
-from .parsing_utilities import interpreter, inizialeraddoppiata, list_normalize
+from .utilities.parsing_utilities import interpreter, inizialeraddoppiata, list_normalize
 
 # Basic data provider class; can be instantiated to handle different kinds
 # of data-providing connections or interfaces based on config options
 from .data_interface.data_providers_setup import queryHandlerFactory
 
 import pandas as pd
-import numpy as np
 import math
 
 # Main class for basic queries contains:
@@ -77,11 +76,11 @@ class basicQueries:
         # Iterate over each row in 'textlist'
         for _, row in textlist.iterrows():
             sigla = row["sigla"]
-            if math.isnan(row["piniz"]):
+            if row["piniz"] is None or math.isnan(row["piniz"]):
                 minChar = int(row["backup_piniz"])
             else:
                 minChar = int(row["piniz"])
-            if math.isnan(row["pfin"]):
+            if row["pfin"] is None or math.isnan(row["pfin"]):
                 maxChar = int(row["backup_pfin"])
             else:
                 maxChar = int(row["pfin"])
@@ -102,31 +101,66 @@ class basicQueries:
 
     # %% Ha in input findcontexts, associa i riferimenti bibliografici ad ogni contesto dal db BiblioTLIO.
     def findbib(self, contexts):
-        infobib = pd.DataFrame()
-        rif_org = pd.DataFrame()
-        for ind, row in contexts.iterrows():
-            queryData = {'queryType': 'bib', 'row': row}
-            bib = self.queryHandler.query(queryData, pandas=True, dbFile='bibliografia/BiblioTLIO.db')
-            infobib = pd.concat([infobib, bib])
-            queryData = {'queryType': 'rif', 'row': row}
-            rif = self.queryHandler.query(queryData, pandas=True)
-            rif_org = pd.concat([rif_org, rif])
-        annoiniz = list(infobib['Anno iniziale'])
-        annofin = list(infobib['Anno finale'])
-        datacod = list(infobib['Data codificata'])
-        datadesc = list(infobib['Data descrittiva'])
-        titoloabb = list(infobib['Titolo Abbreviato'])
-        autore = list(infobib['Autore'])
-        titolo = list(infobib['Titolo'])
-        curatore = list(infobib['Curatore'])
-        areagen = list(infobib['Area generica'])
-        areaspec = list(infobib['Area specifica'])
-        genere = list(infobib['Genere'])
-        forma = list(infobib['Forma'])
-        tipo = list(infobib['Tipo'])
-        iq = list(infobib['IQ'])
-        rif1 = list(rif_org['Rif_organico'])
-        rif2 = list(rif_org['Rif_completo'])
+        # Old, deprecated
+        # infobib = pd.DataFrame()
+        # rif_org = pd.DataFrame()
+        # for ind, row in contexts.iterrows():
+        #     queryData = {'queryType': 'bib', 'row': row}
+        #     bib = self.queryHandler.query(queryData, pandas=True, dbFile='bibliografia/BiblioTLIO.db')
+        #     infobib = pd.concat([infobib, bib])
+        #     queryData = {'queryType': 'rif', 'row': row}
+        #     rif = self.queryHandler.query(queryData, pandas=True)
+        #     rif_org = pd.concat([rif_org, rif])
+        # annoiniz = list(infobib['Anno iniziale'])
+        # annofin = list(infobib['Anno finale'])
+        # datacod = list(infobib['Data codificata'])
+        # datadesc = list(infobib['Data descrittiva'])
+        # titoloabb = list(infobib['Titolo Abbreviato'])
+        # autore = list(infobib['Autore'])
+        # titolo = list(infobib['Titolo'])
+        # curatore = list(infobib['Curatore'])
+        # areagen = list(infobib['Area generica'])
+        # areaspec = list(infobib['Area specifica'])
+        # genere = list(infobib['Genere'])
+        # forma = list(infobib['Forma'])
+        # tipo = list(infobib['Tipo'])
+        # iq = list(infobib['IQ'])
+
+        siglaList = list(contexts['sigla'])
+        siglaSet = set(siglaList)
+        queryData = {'queryType': 'bibAlt', 'siglaSet': siglaSet}
+        infobib = self.queryHandler.query(queryData, pandas=True, dbFile='bibliografia/BiblioTLIO.db')
+        infobib = infobib.set_index('Sigla')
+        infobib2 = {sigla: infobib.loc[sigla].to_dict() for sigla in siglaSet}
+        infobib = [infobib2[sigla] for sigla in siglaList]
+        #
+        annoiniz = [el['Anno iniziale'] for el in infobib]
+        annofin = [el['Anno finale'] for el in infobib]
+        datacod = [el['Data codificata'] for el in infobib]
+        datadesc = [el['Data descrittiva'] for el in infobib]
+        titoloabb = [el['Titolo Abbreviato'] for el in infobib]
+        autore = [el['Autore'] for el in infobib]
+        titolo = [el['Titolo'] for el in infobib]
+        curatore = [el['Curatore'] for el in infobib]
+        areagen = [el['Area generica'] for el in infobib]
+        areaspec = [el['Area specifica'] for el in infobib]
+        genere = [el['Genere'] for el in infobib]
+        forma = [el['Forma'] for el in infobib]
+        tipo = [el['Tipo'] for el in infobib]
+        iq = [el['IQ'] for el in infobib]
+
+        ntxList = list(contexts['ntx'])
+        numOrgList = list(contexts['numorg'])
+        coordsList = [(numorg, ntxList[ind]) for ind, numorg in enumerate(numOrgList)]
+        coordsSet = set(coordsList)
+        queryData = {'queryType': 'rifAlt', 'coordsSet': coordsSet}
+        rif_org = self.queryHandler.query(queryData, pandas=True)
+        rif_org = rif_org.set_index( ['numorg', 'ntx'] )
+        rif_org2 = {coord: rif_org.loc[coord] for coord in coordsSet}
+        rif_org = [rif_org2[coord] for coord in coordsList]
+        rif1 = [rif['Rif_organico'] for rif in rif_org]
+        rif2 = [rif['Rif_completo'] for rif in rif_org]
+        
         contexts['Anno iniziale'] = annoiniz
         contexts['Anno finale'] = annofin
         contexts['Data codificata'] = datacod

+ 1 - 1
flask_be/engine/contexts.py

@@ -2,7 +2,7 @@ import json
 import pandas as pd
 
 from .basic_queries import basicQueries
-from .format import formatAllContexts, formatContext
+from .utilities.format import formatAllContexts, formatContext
 
 
 # Executes query sequences to recover single and multiple contexts

+ 31 - 32
flask_be/engine/cooccorrenze.py

@@ -2,7 +2,7 @@
 import pandas as pd
 
 from .basic_queries import basicQueries
-from .format import formatAllContexts
+from .utilities.format import formatAllContexts
 
 
 # Executes query sequences to recover contexts with co-occurrences according to user input
@@ -13,40 +13,39 @@ class cooccorrenze(basicQueries):
         super().__init__(dataConfig)
 
     #%% funzione ricerca per cooccorrenze. 
-    # Ha in input un array del tipo [forma/lemma_cercati, tipo_ricerca, ricerca_espansa, iniziale_raddoppiata].
-    # l'attributo tipo_ricerca definisce il tipo di ricerca in input (0 per forme, 1 per lemmi, 2 per lemmi con opzione "mostra occorrenze non lemmatizzate").
+    # Ha in input un array di arrays del tipo:
+    # [forma/lemma_cercati, tipo_ricerca, ricerca_espansa, iniziale_raddoppiata].
+    # l'attributo tipo_ricerca ha come valori ammessi: 0 per forme, 1 per lemmi, 2 per lemmi + occorrenze non lemmatizzate.
     # Permette di definire l'intervallo di ricerca (in numero di parole), la possibilità di cercare soltanto all'interno dello stesso periodo (0/1) e/o di cercare le occorrenze in modo ordinato (0/1)
     def ricerca_cooccorrenze(self, listaricerche, intervallo, periodo, ordinate):
-        listatesti = pd.DataFrame()
-        cod = 1
-        if listaricerche[0][1] == 0:
-            ricerca = self.sendBasicQuery(listaricerche[0][0], 'forma', listaricerche[0][2], listaricerche[0][3], pandas=True)
-            listatesti = self.findtexts(0, ricerca)
-        elif listaricerche[0][1] == 1:
-            ricerca = self.sendBasicQuery(listaricerche[0][0], 'lemma', listaricerche[0][2], listaricerche[0][3], pandas=True)
-            listatesti = self.findtexts(1, ricerca)
-        elif listaricerche[0][1] == 2:
-            ricerca = self.sendBasicQuery(listaricerche[0][0], 'lemma', listaricerche[0][2], listaricerche[0][3], pandas=True)
-            listatesti = self.findtexts(2, ricerca)
-
-        if listatesti.empty:
+        occurrences = [] # una lista di Dicts con i codici dei lemmi/forme da cercare
+        for ricerca, tipo, espansa, raddoppiata in listaricerche:
+            if tipo==0:
+                res1 = self.sendBasicQuery(ricerca, 'forma', espansa, raddoppiata, pandas=True)
+                if res1.empty:
+                    return []
+                occurrences.append({'codList': list(res1['cod']), 'querySubtype': 0})
+            elif tipo==1:
+                res1 = self.sendBasicQuery(ricerca, 'lemma', espansa, raddoppiata, pandas=True)
+                if res1.empty:
+                    return []
+                occurrences.append({'codList': list(res1['cod']), 'querySubtype': 1})
+            elif tipo==2:
+                res1 = self.sendBasicQuery(ricerca, 'lemma', espansa, raddoppiata, pandas=True)
+                if res1.empty:
+                    return []
+                codList = list(res1['cod'])
+                subQueryData = {'queryType': 'pfl', 'codList': codList}
+                subdf = self.queryHandler.query(subQueryData, pandas=True)
+                formCodList = list(subdf['codForma'])
+                occurrences.append({'codList': codList, 'formCodList': formCodList, 'querySubtype': 2})
+
+        if len(occurrences)==0:
             return []
 
-        for ricerca, tipo, espansa, raddoppiata in listaricerche[1:]:
-            if tipo == 0:
-                search = self.sendBasicQuery(ricerca, 'forma', espansa, raddoppiata, pandas=True)
-            elif tipo == 1:
-                search = self.sendBasicQuery(ricerca, 'lemma', espansa, raddoppiata, pandas=True)
-            elif tipo == 2:
-                search = self.sendBasicQuery(ricerca, 'lemma', espansa, raddoppiata, pandas=True)
-
-            textlist = self.findtexts(tipo, search)
-
-            listatesti = listatesti.merge(textlist, on='ntx', suffixes=('', f'_{cod}'))
-            cond1 = listatesti['numperiod'] == listatesti[f'numperiod_{cod}'] if periodo == 1 else True
-            cond2 = ((listatesti['mappa'] - listatesti[f'mappa_{cod}']) != 0) & ((listatesti['mappa'] - listatesti[f'mappa_{cod}']).abs() <= intervallo) if ordinate == 0 else ((listatesti[f'mappa_{cod}'] - listatesti['mappa']) > 0) & ((listatesti[f'mappa_{cod}'] - listatesti['mappa']).abs() <= intervallo)
-            cod += 1
-            listatesti = listatesti[cond1 & cond2]
+        queryData = {'queryType': 'co-occurrences', 'occurrences': occurrences, 'intervallo': intervallo, 'periodo': periodo, 'ordinate': ordinate}
+        queryResponses = [self.queryHandler.query(dict(queryData, table=table), pandas=True) for table in self.listOcc]
+        listatesti = pd.concat(queryResponses)
 
         if listatesti.empty:
             return []
@@ -56,4 +55,4 @@ class cooccorrenze(basicQueries):
             clean = bibliocontexts.drop_duplicates(subset="contesto")
             highlights = formatAllContexts(clean)
 
-        return highlights.to_dict(orient='records')
+        return highlights.to_dict(orient='records')

+ 0 - 3570
flask_be/engine/mock_data/result_example_1.json

@@ -1,3570 +0,0 @@
-[{"forma": "re",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 401,
-  "cod": 66},
- {"forma": "re",
-  "lemma": "ré",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 66},
- {"forma": "re'",
-  "lemma": "reo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 22733},
- {"forma": "rea",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 13,
-  "cod": 4546},
- {"forma": "rea",
-  "lemma": "reo",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 5,
-  "cod": 4546},
- {"forma": "reaballaro",
-  "lemma": "riavvalare",
-  "cat_gr": "v.",
-  "disambiguatore": "= discendere",
-  "occ": 1,
-  "cod": 20092},
- {"forma": "reaccelaro",
-  "lemma": "reaccelare",
-  "cat_gr": "v.",
-  "disambiguatore": "= riprendere vigore",
-  "occ": 1,
-  "cod": 19292},
- {"forma": "reaccontato",
-  "lemma": "raccontare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14387},
- {"forma": "reale",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 11126},
- {"forma": "reale",
-  "lemma": "reale",
-  "cat_gr": "agg.",
-  "disambiguatore": "del re",
-  "occ": 1,
-  "cod": 11126},
- {"forma": "reame",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 12793},
- {"forma": "reame",
-  "lemma": "reame",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 12793},
- {"forma": "reami",
-  "lemma": "reame",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 13288},
- {"forma": "reapparero",
-  "lemma": "riapparere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17500},
- {"forma": "reassecurato",
-  "lemma": "riassicurare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21085},
- {"forma": "reatini",
-  "lemma": "reatino",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16615},
- {"forma": "reavere",
-  "lemma": "riavere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17147},
- {"forma": "rebaldo",
-  "lemma": "ribaldo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18524},
- {"forma": "rebella",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15719},
- {"forma": "rebella",
-  "lemma": "ribellare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15719},
- {"forma": "rebellaro",
-  "lemma": "ribellare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18623},
- {"forma": "rebelle",
-  "lemma": "ribellare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14762},
- {"forma": "rebelli",
-  "lemma": "ribelle",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18347},
- {"forma": "rebellione",
-  "lemma": "ribellione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20344},
- {"forma": "rebello",
-  "lemma": "ribelle",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 17540},
- {"forma": "rebocava",
-  "lemma": "revocare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19096},
- {"forma": "reca",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 5242},
- {"forma": "recacchio",
-  "lemma": "recacchiare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19365},
- {"forma": "recali",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 1804},
- {"forma": "recambo",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17734},
- {"forma": "recambola",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16485},
- {"forma": "recambola",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16485},
- {"forma": "recambone",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16404},
- {"forma": "recanno",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18782},
- {"forma": "recano",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 12774},
- {"forma": "recare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 539},
- {"forma": "recare",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 539},
- {"forma": "recarla",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 5311},
- {"forma": "recaro",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18800},
- {"forma": "recaro",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18800},
- {"forma": "recasti",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6847},
- {"forma": "recata",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19344},
- {"forma": "recate",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1112},
- {"forma": "recate",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 1112},
- {"forma": "recato",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 12609},
- {"forma": "recattaro",
-  "lemma": "ricattare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 19847},
- {"forma": "recattato",
-  "lemma": "ricattare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20452},
- {"forma": "recause",
-  "lemma": "recare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20986},
- {"forma": "recava",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 2013},
- {"forma": "recava",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 2013},
- {"forma": "recavano",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18805},
- {"forma": "recepemmo",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18776},
- {"forma": "recepero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18367},
- {"forma": "recepero",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18367},
- {"forma": "recepìo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18986},
- {"forma": "recepìo",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18986},
- {"forma": "recepìoli",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19954},
- {"forma": "recepissero",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20861},
- {"forma": "receputa",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14821},
- {"forma": "receputi",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15238},
- {"forma": "receputi",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15238},
- {"forma": "receputo",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17896},
- {"forma": "recercavali",
-  "lemma": "ricercare",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 19252},
- {"forma": "reçeva",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22473},
- {"forma": "receve",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22673},
- {"forma": "reçevo",
-  "lemma": "ricevere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22759},
- {"forma": "reche",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17713},
- {"forma": "reche",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17713},
- {"forma": "recheççe",
-  "lemma": "ricchezza",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4698},
- {"forma": "recheno",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16771},
- {"forma": "rechete",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15453},
- {"forma": "rechi",
-  "lemma": "recare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20519},
- {"forma": "rechiamare",
-  "lemma": "richiamare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17307},
- {"forma": "rechiamarose",
-  "lemma": "richiamare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16930},
- {"forma": "rechiamarosenne",
-  "lemma": "richiamare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16578},
- {"forma": "rechiamato",
-  "lemma": "richiamare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16981},
- {"forma": "rechiamo",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 12116},
- {"forma": "rechiamosenne",
-  "lemma": "richiamare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16899},
- {"forma": "rechie",
-  "lemma": "orecchia",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17414},
- {"forma": "rechiede",
-  "lemma": "richiedere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14637},
- {"forma": "rechiedemmo",
-  "lemma": "richiedere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20250},
- {"forma": "rechiedeva",
-  "lemma": "richiedere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17577},
- {"forma": "rechiesa",
-  "lemma": "richiedere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18284},
- {"forma": "rechiese",
-  "lemma": "richiedere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20997},
- {"forma": "rechiesta",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14732},
- {"forma": "rechiesta",
-  "lemma": "richiedere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14732},
- {"forma": "rechiesta",
-  "lemma": "richiesta",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14732},
- {"forma": "rechino",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 11169},
- {"forma": "recitare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16219},
- {"forma": "recitare",
-  "lemma": "recitare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16219},
- {"forma": "recitato",
-  "lemma": "recitare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18926},
- {"forma": "reclus",
-  "lemma": "reclus",
-  "cat_gr": "ext.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 870},
- {"forma": "reco",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 23648},
- {"forma": "recò",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1090},
- {"forma": "recò",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 1090},
- {"forma": "recobrar",
-  "lemma": "recobrar",
-  "cat_gr": "ext.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 860},
- {"forma": "recollemmo",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20504},
- {"forma": "recollere",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18663},
- {"forma": "recolliere",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20181},
- {"forma": "recollieremo",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14954},
- {"forma": "recolse",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18341},
- {"forma": "recolse",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18341},
- {"forma": "recolsero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17456},
- {"forma": "recolsero",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17456},
- {"forma": "recolta",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16512},
- {"forma": "recolti",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 17383},
- {"forma": "recolti",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17383},
- {"forma": "recolto",
-  "lemma": "ricogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20312},
- {"forma": "recomandanno",
-  "lemma": "raccomandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19976},
- {"forma": "recomandemo",
-  "lemma": "raccomandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20043},
- {"forma": "recomandòli",
-  "lemma": "raccomandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15918},
- {"forma": "recomandòse",
-  "lemma": "raccomandare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19041},
- {"forma": "recommandato",
-  "lemma": "raccomandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19618},
- {"forma": "reconciliatione",
-  "lemma": "riconciliazione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7005},
- {"forma": "recone",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16271},
- {"forma": "recongnoscesse",
-  "lemma": "riconoscere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14236},
- {"forma": "reconta",
-  "lemma": "raccontare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16658},
- {"forma": "recontare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 14,
-  "cod": 15289},
- {"forma": "recontare",
-  "lemma": "raccontare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15289},
- {"forma": "recontareli",
-  "lemma": "raccontare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19744},
- {"forma": "reconteragio",
-  "lemma": "raccontare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17898},
- {"forma": "reconto",
-  "lemma": "ricontare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 16237},
- {"forma": "reconto",
-  "lemma": "riconto",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16237},
- {"forma": "recontò",
-  "lemma": "ricontare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15837},
- {"forma": "recoprire",
-  "lemma": "ricoprire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19683},
- {"forma": "recorda",
-  "lemma": "ricordare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17833},
- {"forma": "recordare",
-  "lemma": "ricordare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 16704},
- {"forma": "recordaro",
-  "lemma": "ricordare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18388},
- {"forma": "recordata",
-  "lemma": "ricordare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19154},
- {"forma": "recordate",
-  "lemma": "ricordare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20518},
- {"forma": "recordava",
-  "lemma": "ricordare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19798},
- {"forma": "recordavamo",
-  "lemma": "ricordare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16670},
- {"forma": "recordeteve",
-  "lemma": "ricordare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18267},
- {"forma": "recordo",
-  "lemma": "ricordare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 17649},
- {"forma": "recordo",
-  "lemma": "ricordare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 17649},
- {"forma": "recordome",
-  "lemma": "ricordare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 16638},
- {"forma": "recrescea",
-  "lemma": "rincrescere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17376},
- {"forma": "rectori",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5660},
- {"forma": "recuperare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15369},
- {"forma": "recuperare",
-  "lemma": "recuperare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15369},
- {"forma": "recusano",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5951},
- {"forma": "recusava",
-  "lemma": "ricusare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18012},
- {"forma": "recuveravamo",
-  "lemma": "ricoverare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16859},
- {"forma": "reda",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6817},
- {"forma": "redana",
-  "lemma": "redina",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5999},
- {"forma": "redare",
-  "lemma": "ridare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 15268},
- {"forma": "redata",
-  "lemma": "ridare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18339},
- {"forma": "redate",
-  "lemma": "ridare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18950},
- {"forma": "redati",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18304},
- {"forma": "redati",
-  "lemma": "ridare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18304},
- {"forma": "reddeo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3411},
- {"forma": "reddì",
-  "lemma": "redire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1136},
- {"forma": "reddimento",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5819},
- {"forma": "reddire",
-  "lemma": "redire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 23888},
- {"forma": "reddiro",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3815},
- {"forma": "rede",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5724},
- {"forma": "redeficare",
-  "lemma": "riedificare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14887},
- {"forma": "redene",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4357},
- {"forma": "redene",
-  "lemma": "redina",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 4357},
- {"forma": "rediceteme",
-  "lemma": "ridire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16585},
- {"forma": "redine",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 8495},
- {"forma": "redine",
-  "lemma": "redina",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 8495},
- {"forma": "redirevillo",
-  "lemma": "ridire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16662},
- {"forma": "redita",
-  "lemma": "redita",
-  "cat_gr": "n.p.",
-  "disambiguatore": "antr.::",
-  "occ": 2,
-  "cod": 14036},
- {"forma": "reditade",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5934},
- {"forma": "ree",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 1528},
- {"forma": "ree",
-  "lemma": "reo",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 1528},
- {"forma": "refacta",
-  "lemma": "rifare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14892},
- {"forma": "refacto",
-  "lemma": "rifare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19984},
- {"forma": "refare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 6,
-  "cod": 14558},
- {"forma": "refare",
-  "lemma": "rifare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14558},
- {"forma": "refarraio",
-  "lemma": "rifare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17862},
- {"forma": "refarrìa",
-  "lemma": "rifare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20743},
- {"forma": "refay",
-  "lemma": "rifare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14921},
- {"forma": "refayte",
-  "lemma": "rifare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15003},
- {"forma": "refecese",
-  "lemma": "rifare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20232},
- {"forma": "refectorio",
-  "lemma": "refettorio",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7275},
- {"forma": "referire",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6230},
- {"forma": "referito",
-  "lemma": "riferire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14431},
- {"forma": "refermaty",
-  "lemma": "rifermare",
-  "cat_gr": "v.",
-  "disambiguatore": "iter.",
-  "occ": 1,
-  "cod": 20775},
- {"forma": "refferixe-ghe",
-  "lemma": "riferire",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 22272},
- {"forma": "reffua",
-  "lemma": "rifiutare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22069},
- {"forma": "reffuava",
-  "lemma": "rifiutare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22732},
- {"forma": "reffuga",
-  "lemma": "rifiutare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22243},
- {"forma": "refinaro",
-  "lemma": "rifinare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14476},
- {"forma": "reflatare",
-  "lemma": "rifiatare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21099},
- {"forma": "reflatava",
-  "lemma": "rifiatare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17887},
- {"forma": "reflescare",
-  "lemma": "rifrescare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20642},
- {"forma": "refò",
-  "lemma": "riessere",
-  "cat_gr": "v.",
-  "disambiguatore": "iter.",
-  "occ": 1,
-  "cod": 16052},
- {"forma": "refó",
-  "lemma": "riessere",
-  "cat_gr": "v.",
-  "disambiguatore": "iter.",
-  "occ": 1,
-  "cod": 19966},
- {"forma": "reformati",
-  "lemma": "riformare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20894},
- {"forma": "refosse",
-  "lemma": "riessere",
-  "cat_gr": "v.",
-  "disambiguatore": "iter.",
-  "occ": 1,
-  "cod": 21128},
- {"forma": "refrenare",
-  "lemma": "rifrenare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20900},
- {"forma": "refrenaro",
-  "lemma": "rifrenare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20091},
- {"forma": "refrigerrae",
-  "lemma": "refrigerare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5653},
- {"forma": "refrigierà",
-  "lemma": "refrigerare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5549},
- {"forma": "refugio",
-  "lemma": "rifugio",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3952},
- {"forma": "regale",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 2998},
- {"forma": "regale",
-  "lemma": "regale",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 9,
-  "cod": 2998},
- {"forma": "regali",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 4288},
- {"forma": "regali",
-  "lemma": "regale",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4288},
- {"forma": "regali",
-  "lemma": "regale",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4288},
- {"forma": "regame",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 5,
-  "cod": 14437},
- {"forma": "regame",
-  "lemma": "reame",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14437},
- {"forma": "rege",
-  "lemma": "rege",
-  "cat_gr": "s.m.",
-  "disambiguatore": "lat. rege(m)",
-  "occ": 1,
-  "cod": 21127},
- {"forma": "regeano",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 20018},
- {"forma": "regemento",
-  "lemma": "reggimento",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19949},
- {"forma": "regerando",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14110},
- {"forma": "regere",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5535},
- {"forma": "regero",
-  "lemma": "rigire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20765},
- {"forma": "regessero",
-  "lemma": "rigire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18894},
- {"forma": "regga",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 2380},
- {"forma": "regge",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5944},
- {"forma": "regge",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 5944},
- {"forma": "reggea",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 8245},
- {"forma": "reggere",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 2274},
- {"forma": "reggere",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 2274},
- {"forma": "reggerli",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 5905},
- {"forma": "reggi",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5915},
- {"forma": "reggimento",
-  "lemma": "reggimento",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6401},
- {"forma": "reggitore",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5926},
- {"forma": "reggono",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4609},
- {"forma": "reggovi",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 8211},
- {"forma": "regheçon",
-  "lemma": "reghezon",
-  "cat_gr": "s.m.",
-  "disambiguatore": "] dubbio",
-  "occ": 1,
-  "cod": 22616},
- {"forma": "reghiamo",
-  "lemma": "richiamo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18904},
- {"forma": "regina",
-  "lemma": "regina",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18346},
- {"forma": "regina",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 21,
-  "cod": 18346},
- {"forma": "regìo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 16797},
- {"forma": "regìo",
-  "lemma": "rigire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16797},
- {"forma": "regione",
-  "lemma": "regione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 10061},
- {"forma": "regire",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19909},
- {"forma": "regire",
-  "lemma": "rigire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19909},
- {"forma": "regirese",
-  "lemma": "rigire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20567},
- {"forma": "regisenne",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16786},
- {"forma": "regisenne",
-  "lemma": "rigire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16786},
- {"forma": "registrata",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19790},
- {"forma": "registrata",
-  "lemma": "registrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19790},
- {"forma": "registrato",
-  "lemma": "registrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20081},
- {"forma": "regna",
-  "lemma": "regnare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 8360},
- {"forma": "regnare",
-  "lemma": "regnare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18170},
- {"forma": "regne",
-  "lemma": "regnare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15096},
- {"forma": "regnerà",
-  "lemma": "regnare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 24392},
- {"forma": "regni",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 7729},
- {"forma": "regni",
-  "lemma": "regnare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7729},
- {"forma": "regnicoly",
-  "lemma": "regnicolo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14464},
- {"forma": "regno",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 33,
-  "cod": 1510},
- {"forma": "regno",
-  "lemma": "regno",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 1510},
- {"forma": "regnò",
-  "lemma": "regnare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18327},
- {"forma": "regola",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 8,
-  "cod": 4094},
- {"forma": "regola",
-  "lemma": "regola",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4094},
- {"forma": "regole",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4249},
- {"forma": "regratiare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 17828},
- {"forma": "regratiare",
-  "lemma": "ringraziare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17828},
- {"forma": "regratiate",
-  "lemma": "ringraziare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18263},
- {"forma": "regratiato",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16628},
- {"forma": "regratiato",
-  "lemma": "ringraziare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16628},
- {"forma": "reguardo",
-  "lemma": "riguardo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21680},
- {"forma": "regulati",
-  "lemma": "regolare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19745},
- {"forma": "regyosse",
-  "lemma": "richiuso",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22113},
- {"forma": "rei",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 40,
-  "cod": 1532},
- {"forma": "rei",
-  "lemma": "reo",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 1532},
- {"forma": "reimpropriare",
-  "lemma": "rimproverare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18370},
- {"forma": "reina",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 8,
-  "cod": 1435},
- {"forma": "reina",
-  "lemma": "regina",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1435},
- {"forma": "reincarerono",
-  "lemma": "rincarare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19313},
- {"forma": "reinforsarose",
-  "lemma": "rinforzare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "= rifornire",
-  "occ": 1,
-  "cod": 20652},
- {"forma": "reinterdicti",
-  "lemma": "reinterdire",
-  "cat_gr": "v.",
-  "disambiguatore": "iter.",
-  "occ": 1,
-  "cod": 20303},
- {"forma": "reintrare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17439},
- {"forma": "reintrare",
-  "lemma": "rientrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17439},
- {"forma": "rejonse",
-  "lemma": "rigiungere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16794},
- {"forma": "rejonsemmo",
-  "lemma": "rigiungere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16791},
- {"forma": "rejunsero",
-  "lemma": "rigiungere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19928},
- {"forma": "rekò",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 18,
-  "cod": 13449},
- {"forma": "rekò",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 13449},
- {"forma": "rekoa",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14071},
- {"forma": "rekolle",
-  "lemma": "recare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 13768},
- {"forma": "relevare",
-  "lemma": "rilevare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19266},
- {"forma": "religion",
-  "lemma": "religione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22529},
- {"forma": "religione",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 3348},
- {"forma": "religiose",
-  "lemma": "religiosa",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19298},
- {"forma": "religiosi",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7197},
- {"forma": "religioso",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7267},
- {"forma": "relion",
-  "lemma": "religione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22470},
- {"forma": "relique",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3786},
- {"forma": "reliquie",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3798},
- {"forma": "reliquie",
-  "lemma": "reliquia",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3798},
- {"forma": "remagna",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22818},
- {"forma": "remandaoli",
-  "lemma": "rimandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19885},
- {"forma": "remandare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19883},
- {"forma": "remandare",
-  "lemma": "rimandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19883},
- {"forma": "remandone",
-  "lemma": "rimandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17964},
- {"forma": "remanesse",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14651},
- {"forma": "remanesse",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14651},
- {"forma": "remaneva",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16509},
- {"forma": "remanire",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20365},
- {"forma": "remanna",
-  "lemma": "rimandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19956},
- {"forma": "remanni",
-  "lemma": "rimandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17867},
- {"forma": "remaritare",
-  "lemma": "rimaritare",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19305},
- {"forma": "remaritaro",
-  "lemma": "rimaritare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19294},
- {"forma": "remase",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 12,
-  "cod": 14484},
- {"forma": "remase",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14484},
- {"forma": "remasemmo",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18868},
- {"forma": "remasene",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18879},
- {"forma": "remasero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 19046},
- {"forma": "remasero",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19046},
- {"forma": "remasi",
-  "lemma": "rimanere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14316},
- {"forma": "remedio",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 6775},
- {"forma": "remedio",
-  "lemma": "rimedio",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6775},
- {"forma": "remenarolo",
-  "lemma": "rimenare",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 15855},
- {"forma": "remendar",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21975},
- {"forma": "remendar",
-  "lemma": "rimendare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21975},
- {"forma": "remenò",
-  "lemma": "rimenare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18000},
- {"forma": "remeritato",
-  "lemma": "rimeritare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20079},
- {"forma": "remessa",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20465},
- {"forma": "remetta",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 15917},
- {"forma": "remetta",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15917},
- {"forma": "remettea",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 17640},
- {"forma": "remettere",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 17905},
- {"forma": "remettere",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17905},
- {"forma": "remi",
-  "lemma": "remo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1707},
- {"forma": "remi",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 1707},
- {"forma": "remirava",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21695},
- {"forma": "remise",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15941},
- {"forma": "remiselo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17798},
- {"forma": "remiselo",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17798},
- {"forma": "remiserolo",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15856},
- {"forma": "remission",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22843},
- {"forma": "remissione",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3922},
- {"forma": "remissione",
-  "lemma": "remissione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3922},
- {"forma": "remissiuni",
-  "lemma": "remissione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21120},
- {"forma": "remitti",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18139},
- {"forma": "remitti",
-  "lemma": "rimettere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18139},
- {"forma": "remmezzassero",
-  "lemma": "remmezzare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "= abitare",
-  "occ": 1,
-  "cod": 15937},
- {"forma": "remorciare",
-  "lemma": "rimorchiare",
-  "cat_gr": "v.",
-  "disambiguatore": "= rimbrottare",
-  "occ": 1,
-  "cod": 17087},
- {"forma": "remore",
-  "lemma": "rumore",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 14,
-  "cod": 14292},
- {"forma": "remucho",
-  "lemma": "rimbocco",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17370},
- {"forma": "ren",
-  "lemma": "ren",
-  "cat_gr": "ext.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 856},
- {"forma": "rena",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4454},
- {"forma": "rena",
-  "lemma": "réna",
-  "cat_gr": "s.f.",
-  "disambiguatore": "sabbia",
-  "occ": 5,
-  "cod": 4454},
- {"forma": "renaldo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 13811},
- {"forma": "renata",
-  "lemma": "rinascere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19767},
- {"forma": "rencarata",
-  "lemma": "rincarare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19203},
- {"forma": "rencasato",
-  "lemma": "rincasare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15000},
- {"forma": "renclastri",
-  "lemma": "renclastro",
-  "cat_gr": "s.m.",
-  "disambiguatore": "= chiostro",
-  "occ": 1,
-  "cod": 20159},
- {"forma": "rencrescerìa",
-  "lemma": "rincrescere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18457},
- {"forma": "renda",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5779},
- {"forma": "rendano",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3915},
- {"forma": "rende",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 6,
-  "cod": 3203},
- {"forma": "rende",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 3203},
- {"forma": "rendè",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1814},
- {"forma": "rendea",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 13917},
- {"forma": "rendègli",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 10872},
- {"forma": "rendembo",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16406},
- {"forma": "rendemboli",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19963},
- {"forma": "rendemmo",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 13608},
- {"forma": "rendeo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1752},
- {"forma": "rendeo",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 1752},
- {"forma": "renderae",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3872},
- {"forma": "renderando",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15609},
- {"forma": "rendere",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 9,
-  "cod": 4121},
- {"forma": "renderebbe",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 11743},
- {"forma": "renderle",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 2105},
- {"forma": "renderli",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 4118},
- {"forma": "rendero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16298},
- {"forma": "rendero",
-  "lemma": "rendere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16298},
- {"forma": "renderò",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 6284},
- {"forma": "renderoe",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7152},
- {"forma": "rendessero",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19970},
- {"forma": "rendete",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 1975},
- {"forma": "rendeva",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 11728},
- {"forma": "rendevano",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 9880},
- {"forma": "rendi",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 1803},
- {"forma": "rendi",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 1803},
- {"forma": "rendìa",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19757},
- {"forma": "rendimi",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 10236},
- {"forma": "rendimi",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 10236},
- {"forma": "rendita",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6616},
- {"forma": "rendo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 22209},
- {"forma": "rendono",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 12503},
- {"forma": "renduta",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 10680},
- {"forma": "renduto",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 10655},
- {"forma": "renegata",
-  "lemma": "rinnegato",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20126},
- {"forma": "renegati",
-  "lemma": "rinnegato",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20251},
- {"forma": "rengna",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5315},
- {"forma": "rengnasse",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7331},
- {"forma": "rengni",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 3322},
- {"forma": "rengno",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 3961},
- {"forma": "reni",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5341},
- {"forma": "rennegati",
-  "lemma": "rinnegato",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18798},
- {"forma": "rennéose",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17564},
- {"forma": "rennéose",
-  "lemma": "rendere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17564},
- {"forma": "rennere",
-  "lemma": "rendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17558},
- {"forma": "rennuivasse",
-  "lemma": "rinnovare",
-  "cat_gr": "v.",
-  "disambiguatore": "] dubbio",
-  "occ": 1,
-  "cod": 20708},
- {"forma": "reno",
-  "lemma": "reno",
-  "cat_gr": "n.p.",
-  "disambiguatore": "n.g.::",
-  "occ": 1,
-  "cod": 10189},
- {"forma": "rentra",
-  "lemma": "rientrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17868},
- {"forma": "rentrare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 5,
-  "cod": 16244},
- {"forma": "rentrare",
-  "lemma": "rientrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16244},
- {"forma": "rentraro",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 17531},
- {"forma": "rentraro",
-  "lemma": "rientrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17531},
- {"forma": "rentrarono",
-  "lemma": "rientrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17981},
- {"forma": "rentrasse",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17441},
- {"forma": "rentrasse",
-  "lemma": "rientrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17441},
- {"forma": "rentrò",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18234},
- {"forma": "rentrò",
-  "lemma": "rientrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18234},
- {"forma": "renunsao",
-  "lemma": "rinunziare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17621},
- {"forma": "renunzato",
-  "lemma": "rinunziare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20838},
- {"forma": "renunzone",
-  "lemma": "rinunziare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17936},
- {"forma": "reo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 22,
-  "cod": 462},
- {"forma": "reo",
-  "lemma": "reo",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 462},
- {"forma": "reo",
-  "lemma": "reo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 462},
- {"forma": "reondi",
-  "lemma": "rotondo",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21729},
- {"forma": "reondo",
-  "lemma": "rotondo",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21769},
- {"forma": "repara",
-  "lemma": "riparare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20767},
- {"forma": "repararo",
-  "lemma": "riparare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 18364},
- {"forma": "reparata",
-  "lemma": "riparare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19449},
- {"forma": "reparati",
-  "lemma": "riparare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18393},
- {"forma": "reparato",
-  "lemma": "riparare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15924},
- {"forma": "reparo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 5,
-  "cod": 17506},
- {"forma": "reparo",
-  "lemma": "riparo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 17506},
- {"forma": "repassammo",
-  "lemma": "ripassare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17657},
- {"forma": "repassaro",
-  "lemma": "ripassare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21095},
- {"forma": "repente",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4291},
- {"forma": "repentir",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22841},
- {"forma": "repilliate",
-  "lemma": "ripigliare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19363},
- {"forma": "repillione",
-  "lemma": "ripigliare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17938},
- {"forma": "replico",
-  "lemma": "replicare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20055},
- {"forma": "reportato",
-  "lemma": "riportare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16661},
- {"forma": "reposata",
-  "lemma": "riposare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14745},
- {"forma": "reposemo",
-  "lemma": "riposare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17426},
- {"forma": "reprehensione",
-  "lemma": "riprensione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19929},
- {"forma": "reprendea",
-  "lemma": "riprendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18137},
- {"forma": "reprendealo",
-  "lemma": "riprendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17377},
- {"forma": "reprendeva",
-  "lemma": "riprendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15649},
- {"forma": "reprendione",
-  "lemma": "riprendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18515},
- {"forma": "reprensioni",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 2931},
- {"forma": "represe",
-  "lemma": "riprendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21084},
- {"forma": "representa",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6195},
- {"forma": "represero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15119},
- {"forma": "represero",
-  "lemma": "riprendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15119},
- {"forma": "repromessione",
-  "lemma": "ripromissione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3325},
- {"forma": "repunere",
-  "lemma": "riporre",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14545},
- {"forma": "repusato",
-  "lemma": "riposare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14318},
- {"forma": "repusero",
-  "lemma": "riporre",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15025},
- {"forma": "reputa",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 4433},
- {"forma": "reputali",
-  "lemma": "reputare",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 5015},
- {"forma": "reputato",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3588},
- {"forma": "requia",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 3509},
- {"forma": "requie",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3880},
- {"forma": "resalliere",
-  "lemma": "resalliere",
-  "cat_gr": "v.",
-  "disambiguatore": "= ritornare",
-  "occ": 1,
-  "cod": 20016},
- {"forma": "resalliero",
-  "lemma": "resalliere",
-  "cat_gr": "v.",
-  "disambiguatore": "= ritornare",
-  "occ": 1,
-  "cod": 20093},
- {"forma": "resapìa",
-  "lemma": "risapire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18964},
- {"forma": "resarcire",
-  "lemma": "risarcire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20484},
- {"forma": "resconce",
-  "lemma": "risconciare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15136},
- {"forma": "resecho",
-  "lemma": "rischio",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16879},
- {"forma": "reseco",
-  "lemma": "rischio",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20768},
- {"forma": "reserrati",
-  "lemma": "riserrare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15017},
- {"forma": "resia",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7117},
- {"forma": "residii",
-  "lemma": "risedio",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21119},
- {"forma": "resistere",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 8520},
- {"forma": "resistere",
-  "lemma": "resistere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 8520},
- {"forma": "resistìo",
-  "lemma": "resistere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14707},
- {"forma": "resobè",
-  "lemma": "risovvenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17830},
- {"forma": "respandero",
-  "lemma": "rispandere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18781},
- {"forma": "resplendea",
-  "lemma": "risplendere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20790},
- {"forma": "respondea",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16984},
- {"forma": "respondea",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16984},
- {"forma": "respondeali",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "] ^encl.",
-  "occ": 1,
-  "cod": 16963},
- {"forma": "respondeano",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20965},
- {"forma": "respondere",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18314},
- {"forma": "respondeva",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 16956},
- {"forma": "respondeva",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16956},
- {"forma": "responsi",
-  "lemma": "responso",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19220},
- {"forma": "responsione",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 2914},
- {"forma": "resposero",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16528},
- {"forma": "resposta",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 17001},
- {"forma": "resposta",
-  "lemma": "risposta",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17001},
- {"forma": "resposto",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 15416},
- {"forma": "resposto",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15416},
- {"forma": "respuse",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 14,
-  "cod": 14943},
- {"forma": "respuse",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14943},
- {"forma": "respusero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 12,
-  "cod": 14952},
- {"forma": "respusero",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14952},
- {"forma": "ressbaldìa",
-  "lemma": "risbaldire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22388},
- {"forma": "resse",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 10403},
- {"forma": "resspondam",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21911},
- {"forma": "ressposse",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 21585},
- {"forma": "resspossi",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22780},
- {"forma": "resspoxe",
-  "lemma": "rispondere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 21863},
- {"forma": "resta",
-  "lemma": "resta",
-  "cat_gr": "s.f.",
-  "disambiguatore": "arresto",
-  "occ": 1,
-  "cod": 14729},
- {"forma": "resta",
-  "lemma": "restare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14729},
- {"forma": "restageno",
-  "lemma": "restageno",
-  "cat_gr": "n.p.",
-  "disambiguatore": "antr.::",
-  "occ": 1,
-  "cod": 18340},
- {"forma": "restàm",
-  "lemma": "restare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22826},
- {"forma": "restarà",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4854},
- {"forma": "restare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5671},
- {"forma": "restare",
-  "lemma": "restare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5671},
- {"forma": "restata",
-  "lemma": "restata",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1770},
- {"forma": "restato",
-  "lemma": "restare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 1503},
- {"forma": "restayno",
-  "lemma": "restagno",
-  "cat_gr": "n.p.",
-  "disambiguatore": "antr.::",
-  "occ": 1,
-  "cod": 17273},
- {"forma": "reste",
-  "lemma": "resta",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 9043},
- {"forma": "restiamo",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4851},
- {"forma": "restituendo",
-  "lemma": "restituire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6947},
- {"forma": "restorati",
-  "lemma": "ristorare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18895},
- {"forma": "restrense",
-  "lemma": "restringere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20805},
- {"forma": "restrensero",
-  "lemma": "restringere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21007},
- {"forma": "restrenze",
-  "lemma": "restringere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17449},
- {"forma": "restricti",
-  "lemma": "restringere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18909},
- {"forma": "restrinserose",
-  "lemma": "restringere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18178},
- {"forma": "resurrectione",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 3343},
- {"forma": "resurrectione",
-  "lemma": "risurrezione",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 3343},
- {"forma": "resurresione",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 7312},
- {"forma": "resurte",
-  "lemma": "resurte",
-  "cat_gr": "ext.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 905},
- {"forma": "resuscitasse",
-  "lemma": "risuscitare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18424},
- {"forma": "rete",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 6168},
- {"forma": "retegno",
-  "lemma": "ritegno",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22318},
- {"forma": "retene",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22317},
- {"forma": "retenere",
-  "lemma": "ritenere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 5846},
- {"forma": "retenesse",
-  "lemma": "ritenere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17919},
- {"forma": "retenga",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19917},
- {"forma": "retenne",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 17629},
- {"forma": "retenne",
-  "lemma": "ritenere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17629},
- {"forma": "reti",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 11325},
- {"forma": "reti",
-  "lemma": "rete",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 11325},
- {"forma": "retinnero",
-  "lemma": "ritenere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19743},
- {"forma": "reto",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 12917},
- {"forma": "reto",
-  "lemma": "retro",
-  "cat_gr": "avv.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 12917},
- {"forma": "retoitello",
-  "lemma": "ritogliere(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19968},
- {"forma": "retolti",
-  "lemma": "ritogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19680},
- {"forma": "retolto",
-  "lemma": "ritogliere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16047},
- {"forma": "retonde",
-  "lemma": "rotondo",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18094},
- {"forma": "retorna",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22268},
- {"forma": "retornare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 7,
-  "cod": 15192},
- {"forma": "retornare",
-  "lemma": "ritornare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15192},
- {"forma": "retornaro",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 5,
-  "cod": 14711},
- {"forma": "retornaro",
-  "lemma": "ritornare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14711},
- {"forma": "retornate",
-  "lemma": "ritornare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19690},
- {"forma": "retornato",
-  "lemma": "ritornare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18828},
- {"forma": "retorneno",
-  "lemma": "ritornare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17655},
- {"forma": "retorno",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 9,
-  "cod": 15600},
- {"forma": "retorno",
-  "lemma": "ritornare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15600},
- {"forma": "retorno",
-  "lemma": "ritorno",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15600},
- {"forma": "retornò",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19567},
- {"forma": "retornò",
-  "lemma": "ritornare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19567},
- {"forma": "retornonne",
-  "lemma": "ritornare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19570},
- {"forma": "retribuire",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4489},
- {"forma": "retro",
-  "lemma": "retro",
-  "cat_gr": "avv.",
-  "disambiguatore": "di retro",
-  "occ": 1,
-  "cod": 18737},
- {"forma": "retrovare",
-  "lemma": "ritrovare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 15092},
- {"forma": "retruso",
-  "lemma": "ritroso",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20002},
- {"forma": "retto",
-  "lemma": "reggere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 10369},
- {"forma": "rettore",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 9455},
- {"forma": "rettore",
-  "lemma": "rettore",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 9455},
- {"forma": "revà",
-  "lemma": "riandare",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17639},
- {"forma": "revela",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 3529},
- {"forma": "revelare",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 4232},
- {"forma": "revelato",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5161},
- {"forma": "revende",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20291},
- {"forma": "revenea",
-  "lemma": "rivenire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20654},
- {"forma": "revenembo",
-  "lemma": "rivenire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16790},
- {"forma": "revenesse",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16679},
- {"forma": "revenga",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 21097},
- {"forma": "revengna",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17801},
- {"forma": "revenìa",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 16677},
- {"forma": "revenìa",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16677},
- {"forma": "revenire",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 4,
-  "cod": 17320},
- {"forma": "revenne",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 24,
-  "cod": 15700},
- {"forma": "revenne",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 15700},
- {"forma": "revennero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 17883},
- {"forma": "revennero",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17883},
- {"forma": "revennesenne",
-  "lemma": "rivenire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19144},
- {"forma": "revennessemo",
-  "lemma": "rivenire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20612},
- {"forma": "revenuto",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18526},
- {"forma": "reverencia",
-  "lemma": "riverenza",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 22845},
- {"forma": "reverentia",
-  "lemma": "riverenza",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 8,
-  "cod": 14386},
- {"forma": "reverenza",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 8626},
- {"forma": "reverenza",
-  "lemma": "riverenza",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 3,
-  "cod": 8626},
- {"forma": "reverire",
-  "lemma": "riverire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 2824},
- {"forma": "reveriscano",
-  "lemma": "riverire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 5919},
- {"forma": "reverisci",
-  "lemma": "riverire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 4141},
- {"forma": "reverito",
-  "lemma": "riverire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 14742},
- {"forma": "revestembo",
-  "lemma": "rivestire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16687},
- {"forma": "revey",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17343},
- {"forma": "revindero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20657},
- {"forma": "revindero",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20657},
- {"forma": "revinnero",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 2,
-  "cod": 16630},
- {"forma": "revinnero",
-  "lemma": "rivenire",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16630},
- {"forma": "revinnerosene",
-  "lemma": "rivenire(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16575},
- {"forma": "revolea",
-  "lemma": "rivolere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 19967},
- {"forma": "revolta",
-  "lemma": "rivoltare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17509},
- {"forma": "revolta",
-  "lemma": "rivolta",
-  "cat_gr": "s.f.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17509},
- {"forma": "revoltato",
-  "lemma": "rivoltare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 16986},
- {"forma": "revoltàvanose",
-  "lemma": "rivoltare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20874},
- {"forma": "revolte",
-  "lemma": "rivolto",
-  "cat_gr": "agg.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 22051},
- {"forma": "revolti",
-  "lemma": "rivolgere",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 18395},
- {"forma": "revoltone",
-  "lemma": "",
-  "cat_gr": "",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17262},
- {"forma": "revoltone",
-  "lemma": "rivoltare(-si)",
-  "cat_gr": "v.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 17262},
- {"forma": "rey",
-  "lemma": "reo",
-  "cat_gr": "s.m.",
-  "disambiguatore": "",
-  "occ": 1,
-  "cod": 20299}]

+ 13 - 21
flask_be/engine/handle_request.py → flask_be/engine/request_handlers.py

@@ -1,8 +1,7 @@
-from .basic_queries import basicQueries
 from .cooccorrenze import cooccorrenze
 from .contexts import contexts
 
-def handleOccGetQuery(queryList, cooccorrenzeObj, dataConfig):
+def handleGetOccurrences(queryList, cooccorrenzeObj, dataConfig):
 
     queryHandler = cooccorrenze(dataConfig)
 
@@ -22,26 +21,26 @@ def handleOccGetQuery(queryList, cooccorrenzeObj, dataConfig):
         periodo = int(cooccorrenzeObj['stesso_periodo'])
         ordinate = int(cooccorrenzeObj['ordinate'])
 
-        listaricerche = [[query['stringa'], tempDecode(query['tipo']), int(query['espansa']), int(query['raddoppiata'])] for query in queryList if query['stringa'].strip()!=""]
+        listaricerche = [[query['stringa'], occQueryTypesDict[query['tipo']], int(query['espansa']), int(query['raddoppiata'])] for query in queryList if query['stringa'].strip()!=""]
 
         res = queryHandler.ricerca_cooccorrenze(listaricerche, intervallo, periodo, ordinate)
 
     return res
 
 #Funzione per il recupero dei contesti multipli
-def handleGetContext(queryList, listResults, dataConfig):
+def handleGetContexts(queryList, listResults, dataConfig):
 
     queryHandler = contexts(dataConfig)
 
     query = queryList[0]
-    tipo = tempDecode(query['tipo'])
+    tipo = occQueryTypesDict[query['tipo']]
 
     res = queryHandler.contestimultipli(tipo, listResults)
 
     return res
 
 #Funzione da sistemare per il recupero dei contesti singoli
-def handleSingleContext(elem, paramObj, dataConfig):
+def handleGetSingleContext(elem, paramObj, dataConfig):
 
     queryHandler = contexts(dataConfig)
 
@@ -54,18 +53,11 @@ def handleSingleContext(elem, paramObj, dataConfig):
 
     return res
 
-#Funzione di decodifica
-
-def tempDecode(stringa):
-    if stringa=='forma':
-        return 0
-    elif stringa=='formaLemma':
-        return 0
-    elif stringa=='lemmaForma':
-        return 2
-    elif stringa=='soloLemmatizzate':
-        return 1
-    elif stringa=='lemma':
-        return 2
-    else:
-        return None
+# Dict: occurrence query type <=> code 
+occQueryTypesDict = {
+    'forma': 0,
+    'formaLemma': 0,
+    'lemmaForma': 2,
+    'soloLemmatizzate': 1,
+    'lemma': 2
+}

+ 0 - 0
flask_be/engine/format.py → flask_be/engine/utilities/format.py


+ 2 - 3
flask_be/engine/parsing_utilities.py → flask_be/engine/utilities/parsing_utilities.py

@@ -13,10 +13,9 @@ def combinations(s):
     result.extend([s[:start] + item + rest for rest in combinations(s[end + 1:])])
   return result
 
-#%% funzione interprete, sta alla base di ogni ricerca
-## DA MODIFICARE PER DB CIFRATO
+# Funzione interprete, preprocessa ogni ricerca
 def interpreter (data):
-    clean_data= data.replace("*", "%").replace("?", "_").replace(" ","").replace("'", "''").replace("’", "''")
+    clean_data= data.replace("\\*", "#ACTUAL*#").replace("\\?", "#ACTUAL?#").replace("*", "\\%").replace("?", "\\_").replace(" ","").replace("'", "''").replace("’", "''").replace('#ACTUAL%#', '*').replace('#ACTUAL_#', '?')
     return combinations(clean_data)    
 
 # %% funzione iniziale raddoppiata, è chiamata dalle funzioni di ricerca con iniziale raddoppiata

+ 0 - 0
flask_be/do_requirements.md → flask_be/how_to_do_requirements.md


+ 170 - 33
flask_be/interface_sqlite3/actual_queries.py

@@ -1,4 +1,6 @@
-def prepareQueryString(queryData):
+import pandas as pd
+
+def prepareQuery(queryData):
 
     type = queryData.get('queryType') # KeyError protected -- returns None if the key is not defined
 
@@ -75,39 +77,12 @@ def prepareQueryString(queryData):
 
     ###################
     elif type=='texts':
-        try:
-            codList = queryData['codList']
-            table = queryData['table']
-            subtype = queryData['querySubtype']
-            formCodList = queryData.get('formCodList') # KeyError-safe (None if absent)
-        except KeyError as err:
-            raise KeyError('Missing required data for query type ' + type + ': ' + str(err))
-        # These values can be changed to changa multiple contexts widht. Default value for Gatto is parole=31 #
-        parole = 31
-        periodi = 0
-        #                                                                                                     #
-        strlist = ",".join(str(c) for c in codList)
-        if parole != 0:
-            if subtype==0:
-                return f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, prev_tab.pitxt AS piniz, next_tab.pitxt AS pfin, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod LEFT JOIN {table} AS prev_tab ON (tab.ntx = prev_tab.ntx AND tab.mappa = prev_tab.mappa+{int(parole/2)}) LEFT JOIN {table} AS next_tab ON (tab.ntx = next_tab.ntx AND tab.mappa = next_tab.mappa-{int(parole/2)}) LEFT JOIN periodi ON (tab.ntx = periodi.ntx AND tab.numperiod = periodi.numperiod) WHERE tab.cod IN ({strlist})"
-            elif subtype==1:
-                return f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, prev_tab.pitxt AS piniz, next_tab.pitxt AS pfin, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod LEFT JOIN {table} AS prev_tab ON (tab.ntx = prev_tab.ntx AND tab.mappa = prev_tab.mappa+{int(parole/2)}) LEFT JOIN {table} AS next_tab ON (tab.ntx = next_tab.ntx AND tab.mappa = next_tab.mappa-{int(parole/2)}) LEFT JOIN periodi ON (tab.ntx = periodi.ntx AND tab.numperiod = periodi.numperiod) WHERE tab.indlem IN ({strlist})"
-            elif subtype==2:
-                if formCodList is None:
-                    return None
-                strform = ",".join(str(c) for c in formCodList)
-                return f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, prev_tab.pitxt AS piniz, next_tab.pitxt AS pfin, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod LEFT JOIN {table} AS prev_tab ON (tab.ntx = prev_tab.ntx AND tab.mappa = prev_tab.mappa+{int(parole/2)}) LEFT JOIN {table} AS next_tab ON (tab.ntx = next_tab.ntx AND tab.mappa = next_tab.mappa-{int(parole/2)}) LEFT JOIN periodi ON (tab.ntx = periodi.ntx AND tab.numperiod = periodi.numperiod) WHERE tab.indlem IN ({strlist}) OR (tab.indlem = 0 AND tab.cod IN ({strform}))"
-        else:
-            if subtype==0:
-                return f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, prev_periodi.piniz, next_periodi.pfin, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod LEFT JOIN periodi AS prev_periodi ON (tab.ntx = prev_periodi.ntx AND tab.numperiod = prev_periodi.numperiod+{int(periodi/2)}) LEFT JOIN periodi AS next_periodi ON (tab.ntx = next_periodi.ntx AND tab.numperiod = next_periodi.numperiod-{int(periodi/2)}) LEFT JOIN periodi ON (tab.ntx = periodi.ntx AND tab.numperiod = periodi.numperiod) WHERE tab.cod IN ({strlist})"
-            elif subtype==1:
-                return f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, prev_periodi.piniz, next_periodi.pfin, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod LEFT JOIN periodi AS prev_periodi ON (tab.ntx = prev_periodi.ntx AND tab.numperiod = prev_periodi.numperiod+{int(periodi/2)}) LEFT JOIN periodi AS next_periodi ON (tab.ntx = next_periodi.ntx AND tab.numperiod = next_periodi.numperiod-{int(periodi/2)}) LEFT JOIN periodi ON (tab.ntx = periodi.ntx AND tab.numperiod = periodi.numperiod) WHERE tab.indlem IN ({strlist})"
-            elif subtype==2:
-                if formCodList is None:
-                    return None
-                strform = ",".join(str(c) for c in formCodList)
-                return f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, prev_periodi.piniz, next_periodi.pfin, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod LEFT JOIN periodi AS prev_periodi ON (tab.ntx = prev_periodi.ntx AND tab.numperiod = prev_periodi.numperiod+{int(periodi/2)}) LEFT JOIN periodi AS next_periodi ON (tab.ntx = next_periodi.ntx AND tab.numperiod = next_periodi.numperiod-{int(periodi/2)}) LEFT JOIN periodi ON (tab.ntx = periodi.ntx AND tab.numperiod = periodi.numperiod) WHERE tab.indlem IN ({strlist}) OR (tab.indlem = 0 AND tab.cod IN ({strform}))"
+        return complexQueryTexts
     
+    ###################
+    elif type=='co-occurrences':
+        return complexQueryCooccurrences
+
     ######################
     elif type=='bib':
         try:
@@ -117,6 +92,15 @@ def prepareQueryString(queryData):
             raise KeyError('Missing required data for query type ' + type + ': ' + str(err))
         return f"SELECT [Anno iniziale], [Anno finale], [Data codificata], [Titolo Abbreviato], [Autore], [Titolo], [Curatore], [Data descrittiva], [Area generica], [Area specifica], [Genere], [Forma], [Tipo], IQ FROM datibib WHERE Sigla='{sigla}'"
     
+    #################
+    elif type=='bibAlt':
+        try:
+            siglaSet = queryData['siglaSet']
+        except KeyError as err:
+            raise KeyError('Missing required data for query type ' + type + ': ' + str(err))
+        siglaStr = "'" + "','".join(siglaSet) + "'"
+        return f"SELECT Sigla, [Anno iniziale], [Anno finale], [Data codificata], [Titolo Abbreviato], [Autore], [Titolo], [Curatore], [Data descrittiva], [Area generica], [Area specifica], [Genere], [Forma], [Tipo], IQ FROM datibib WHERE Sigla IN ({siglaStr})"
+
     #################
     elif type=='rif':
         try:
@@ -127,6 +111,24 @@ def prepareQueryString(queryData):
             return None
         return f"SELECT head AS Rif_organico, full AS Rif_completo FROM org WHERE (indice='{numorg}' AND ntx='{ntx}')"
     
+    #################
+    elif type=='rifAlt':
+        try:
+            coordsSet = queryData['coordsSet']
+        except KeyError as err:
+            raise KeyError('Missing required data for query type ' + type + ': ' + str(err))
+        
+        subQueries = []
+        for coords in coordsSet:
+            try:
+                numorg = coords[0]
+                ntx = coords[1]
+            except IndexError as err:
+                raise KeyError('Incomplete required data for query type ' + type + ': ' + str(err))
+            subQueries.append( f"SELECT indice AS numorg, ntx, head AS Rif_organico, full AS Rif_completo FROM org WHERE (indice='{numorg}' AND ntx='{ntx}')" )
+                
+        return ' UNION ALL '.join(subQueries)
+
     #################
     elif type=='highlight':
         try:
@@ -173,3 +175,138 @@ def prepareQueryString(queryData):
     #####
     else:
         raise ValueError('Unrecognized query type: ' + type)
+
+
+def complexQueryTexts(connection, queryData):
+    try:
+        codList = queryData['codList']
+        table = queryData['table']
+        subtype = queryData['querySubtype']
+        formCodList = queryData.get('formCodList') # KeyError-safe (None if absent)
+    except KeyError as err:
+        raise KeyError('Missing required data for query type ' + type + ': ' + str(err))
+    
+    strCodList = ",".join(str(c) for c in codList)
+
+    # Main query, verified to be fast!
+    mainQueryString = f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod"
+    if subtype==0:
+        condition = f"WHERE tab.cod IN ({strCodList})"
+    elif subtype==1:
+        condition = f"WHERE tab.indlem IN ({strCodList})"
+    elif subtype==2:
+        if formCodList is None:
+            return None
+        strFormCodList = ",".join(str(c) for c in formCodList)
+        condition = f" WHERE tab.indlem IN ({strCodList}) OR (tab.indlem = 0 AND tab.cod IN ({strFormCodList}))"
+
+    mainQueryString = f'{mainQueryString} {condition}'
+
+    # This value can be changed to change multiple contexts width. Default value for Gatto is parole=31 #
+    parole = 31
+    # C'è la possibilità di scegliere periodi invece che parole, ma per il momento è disabilitata
+    createTempTable = f'CREATE TEMPORARY TABLE stuff AS {mainQueryString}' 
+    mainQuery = f'SELECT * from stuff'
+    addQuery1 = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS piniz FROM stuff LEFT JOIN Occ00001 AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa-{int(parole/2)}'
+    addQuery2 = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS pfin FROM stuff LEFT JOIN Occ00001 AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa+{int(parole/2)}'
+    addQuery3 = f'SELECT stuff.ntx, stuff.numperiod, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM stuff, periodi WHERE stuff.ntx = periodi.ntx AND stuff.numperiod = periodi.numperiod'
+
+
+    # Start communication with DB
+    connection.cursor().execute(createTempTable)
+
+    results = pd.read_sql(mainQuery, connection)
+    results_add1 = pd.read_sql(addQuery1, connection)
+    results_add2 = pd.read_sql(addQuery2, connection)
+    results_add3 = pd.read_sql(addQuery3, connection)
+    results['piniz'] = results_add1['piniz']
+    results['pfin'] = results_add2['pfin']
+    results[['backup_piniz', 'backup_pfin']] = results_add3[['backup_piniz', 'backup_pfin']]
+
+    return results
+
+
+def complexQueryCooccurrences(connection, queryData):
+    try:
+        # the get method for dicts is KeyError-safe (returns None if key is absent)
+        occurrences = queryData['occurrences']
+        table = queryData['table']
+        intervallo = queryData['intervallo']
+        periodo = queryData.get('periodo') # Unused for the moment
+        ordinate = queryData.get('ordinate') # Unused for the moment
+        if periodo is None:
+            periodo = 0
+        if ordinate is None:
+            ordinate = 0
+    except KeyError as err:
+        raise KeyError('Missing required data for query: ' + str(err))
+
+
+    # Main part of main query -- verified to be fast!
+    preMainQueryString = f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore FROM {table} AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod"
+
+    # Main loop on the different occurrences searched by user
+    pitxtList = ['pitxt']
+    elemlenList = ['elemlen']
+    for index, occ in enumerate(occurrences):
+
+        try:
+            subtype = occ['querySubtype']
+            codList = occ['codList']
+            formCodList = occ.get('formCodList') 
+        except KeyError as err:
+            raise KeyError('Missing required data for query: ' + str(err))
+        
+        strCodList = ",".join(str(c) for c in codList)
+
+        if subtype==0:
+            condition = f" WHERE tab.cod IN ({strCodList})"
+        elif subtype==1:
+            condition = f" WHERE tab.indlem IN ({strCodList})"
+        elif subtype==2:
+            if formCodList is None:
+                return None
+            strFormCodList = ",".join(str(c) for c in formCodList)
+            condition = f" WHERE tab.indlem IN ({strCodList}) OR (tab.indlem = 0 AND tab.cod IN ({strFormCodList}))"
+
+        mainQueryString = f'{preMainQueryString} {condition}'
+
+        # First occurrence:
+        if index==0:
+            # Create a temporary table for results
+            resTable = 'tempOcc_' + str(index)
+            connection.cursor().execute(f'CREATE TEMPORARY TABLE {resTable} AS {mainQueryString}')
+            connection.cursor().execute(f'CREATE INDEX aa_{index} ON {resTable} (ntx, mappa)')
+            continue
+        
+        else:
+            # update results
+            connection.cursor().execute(f'CREATE TEMPORARY TABLE tempOccB AS {mainQueryString}')
+            connection.cursor().execute(f'CREATE INDEX bb ON tempOccB (ntx, mappa)')
+
+            oldTable = resTable
+            resTable = 'tempOcc_' + str(index)
+            connection.cursor().execute(f'CREATE TEMPORARY TABLE {resTable} AS SELECT tabA.cod, tabA.ntx, tabA.{" tabA.".join(pitxtList)}, tabA.{" tabA.".join(elemlenList)}, tabA.mappa, tabA.numperiod, tabA.links, tabA.numorg, tabA.sigla, tabA.vol, tabA.pag, tabA.riga, tabA.col, tabA.tipostanza, tabA.stanza, tabA.verso, tabA.numbrano, tabA.lemma, tabA.cat_gr, tabA.disambiguatore, tabB.ntx AS ntx2, tabB.mappa AS mappa2, tabB.pitxt as pitxt_{index}, tabB.elemlen as elemlen_{index} FROM {oldTable} AS tabA, tempOccB AS tabB WHERE tabA.ntx=tabB.ntx AND tabA.mappa BETWEEN tabB.mappa-{intervallo} AND tabB.mappa+{intervallo} AND tabA.mappa != tabB.mappa')
+            connection.cursor().execute(f'CREATE INDEX aa_{index} ON {resTable} (ntx, mappa)')
+            connection.cursor().execute(f'DROP TABLE {oldTable}')
+            pitxtList.append(f'pitxt_{index}')
+            elemlenList.append(f'elemlen_{index}')
+
+
+    results = pd.read_sql(f'SELECT * FROM {resTable}', connection)
+
+    # This value can be changed to change multiple contexts width. Default value for Gatto is parole=31
+    parole = 31
+    # C'è la possibilità di scegliere periodi invece che parole, ma per il momento è disabilitata
+    queryPiniz = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS piniz FROM {resTable} AS stuff LEFT JOIN {table} AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa-{int(parole/2)}'
+    queryPfin = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS pfin FROM {resTable} AS stuff LEFT JOIN {table} AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa+{int(parole/2)}'
+    queryPeriodi = f'SELECT stuff.ntx, stuff.numperiod, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM {resTable} AS stuff, periodi WHERE stuff.ntx = periodi.ntx AND stuff.numperiod = periodi.numperiod'
+
+    resultsPiniz = pd.read_sql(queryPiniz, connection)
+    resultsPfin = pd.read_sql(queryPfin, connection)
+    resultsPeriodi = pd.read_sql(queryPeriodi, connection)
+    results['piniz'] = resultsPiniz['piniz']
+    results['pfin'] = resultsPfin['pfin']
+    results[['backup_piniz', 'backup_pfin']] = resultsPeriodi[['backup_piniz', 'backup_pfin']]
+
+    return results

+ 25 - 24
flask_be/interface_sqlite3/encdec/de_code.py

@@ -6,7 +6,7 @@ class keyRing:
 
     def __init__(self, keyPath, dbEncoded, textsEncoded):
         self.keyPath = keyPath
-        self.vettSpec = self.getVettSpec(dbEncoded)
+        self.vettDictDec, self.vettDictEnc = self.getVettSpec(dbEncoded)
         self.textKeys = self.getKeys(textsEncoded)
 
     def getVettSpec(self, dbEncoded):
@@ -15,7 +15,17 @@ class keyRing:
         with open(self.keyPath + "vettSpec.csv", 'r') as file1:
             reader = csv.DictReader(file1)
             vettSpec = [row for row in reader]
-            return vettSpec
+            vettDictDec = {}
+            vettDictEnc = {}
+            for index, entry in enumerate(vettSpec):
+                if index==0:
+                    continue
+                vettDictDec[chr(int(entry['intcode']))] = chr(int(entry['unicode'], 16))
+                vettDictEnc[chr(int(entry['unicode'], 16))] = chr(int(entry['intcode']))
+            # Special chars
+            vettDictEnc['\\%'] = "%"
+            vettDictEnc['\\_'] = "_"
+            return vettDictDec, vettDictEnc
 
     def getKeys(self, textsEncoded):
         if not textsEncoded:
@@ -48,33 +58,24 @@ class keyRing:
 # DB Columns that need this:
 # FORM -> norm, spec, invnorm, invspec
 # LEM  -> norm, spec, invnorm, invspec, cat, omo
-def db_decode(vettSpec, string0):
+def db_decode(vettDictDec, string0):
+    return ''.join([vettDictDec[char] for char in string0])
 
-    res = ""
-    for char0 in string0:
-        #1
-        char0Dec = ord(char0) # Dal carattere al codice Unicode DECIMALE corrispondente
-        #2
-        char0ConvDec = next((el['unicode'] for el in vettSpec if el['intcode'] == str(char0Dec)), None) # Il codice DECIMALE (passato come stringa) viene ricercato in vettSpec, ritornando l'Unicode ESADECIMALE del carattere decriptato o None se non c'è riscontro -- il che non DOVREBBE succedere.
-        #3
-        res += chr(int(char0ConvDec, 16)) # Si converte il codice esadecimale a decimale e si usa la built-in chr per recuperare il carattere
-    return res
 #
-def db_encode(vettSpec, string0):
+def db_encode(vettDictEnc, string0):
     res = ""
+    prevChar = ""
     for char0 in string0:
-        # DA RIVEDERE
-        ############################
-        if char0 != "%" and "_":
-        ############################
-            #1
-            char0Hex = hex(ord(char0)) # Dal carattere al codice Unicode ESADECIMALE corrispondente
-            #2
-            char0ConvDec = next((el['intcode'] for el in vettSpec if el['unicode'] == char0Hex[2:].upper()), None) # Il codice ESADECIMALE, senza il prefisso '0x' (rimosso tramite [2:]) e convertito in maiuscole per rispettare il formato di vettSpec, viene ricercato in vettSpec, ritornando l'Unicode DECIMALE del carattere criptato o None se non c'è riscontro -- il che non DOVREBBE succedere.
-            #3
-            res += chr(int(char0ConvDec)) # Si usa la built-in chr per recuperare il carattere
+        if char0=="\\":
+            prevChar = "\\"
+            continue
+        if prevChar!="\\":
+            res += vettDictEnc[char0]
         else:
-            res += char0
+            comp = "\\" + char0
+            add = vettDictEnc.get(comp) if vettDictEnc.get(comp) is not None else vettDictEnc["\\"] + vettDictEnc[char0]
+            res += add
+
     return res
 
 # Text encoder/decoder

+ 30 - 20
flask_be/interface_sqlite3/query_handlers.py

@@ -2,7 +2,7 @@ import sqlite3
 import pandas as pd
 import interface_sqlite3.encdec.de_code as dc
 
-from .actual_queries import prepareQueryString
+from interface_sqlite3.actual_queries import prepareQuery
 
 # First version
 class queryHandlerBasicSqlite:
@@ -28,33 +28,43 @@ class queryHandlerBasicSqlite:
     
     def query(self, queryData, pandas=False, dbFile=None):
 
-        # Formerly the query string was pre-generated outside and
-        # sent here _in lieu_ of the query data
-        # Now the method processes a query data OBJECT and creates the query
+        # PREPARE THE QUERY
+        # Formerly, a query string was pre-generated outside and
+        # sent directly
+        # Now the method processes a query data OBJECT
+        # and creates the query (which may be complex)
         # accordingly
         if self.dbEncoded:
             queryData = self.encodeQuery(queryData)
-        queryString = prepareQueryString(queryData)
+        queryToExecute = prepareQuery(queryData)
 
+        # Get the connection to the DB
         dbFileLocal = dbFile if dbFile is not None else self.dbfileDefault
         if dbFileLocal is None:
             raise Exception("No db file specified with no default given -- can't execute query")
-
+        #
         db = self.dbPath + dbFileLocal
-        
         connection = sqlite3.connect(f"file:{db}?mode=ro", uri=True)
-        # PANDAS?
-        if pandas:
-            results = pd.read_sql(queryString, connection)
-            if(self.dbEncoded):
-                results = self.db_results_decode_pandas(results)
+
+
+        # If the query is a simple string, execute it here:
+        if type(queryToExecute)==str:
+            if pandas:
+                results = pd.read_sql(queryToExecute, connection)
+                if(self.dbEncoded):
+                    results = self.db_results_decode_pandas(results)
+            else:
+                connection.row_factory = dict_factory
+                queryReponse = connection.cursor().execute(queryToExecute)
+                results = queryReponse.fetchall()
+                if(self.dbEncoded):
+                    results = self.db_results_decode(results)
         
         else:
-            connection.row_factory = dict_factory
-            queryReponse = connection.cursor().execute(queryString)
-            results = queryReponse.fetchall()
+            # If not a string, 'queryToExecute' should be a method/function reference
+            results = queryToExecute(connection, queryData)
             if(self.dbEncoded):
-                results = self.db_results_decode(results)
+                results = self.db_results_decode_pandas(results)
 
         connection.close()
 
@@ -95,8 +105,8 @@ class queryHandlerBasicSqlite:
             try:
                 data = queryData['data']
                 dataNorm = queryData['dataNorm']
-                data = [dc.db_encode(self.keyRing.vettSpec, datum) for datum in data]
-                dataNorm = [dc.db_encode(self.keyRing.vettSpec, datum) for datum in dataNorm]
+                data = [dc.db_encode(self.keyRing.vettDictEnc, datum) for datum in data]
+                dataNorm = [dc.db_encode(self.keyRing.vettDictEnc, datum) for datum in dataNorm]
                 queryData['data'] = data
                 queryData['dataNorm'] = dataNorm
             except KeyError as err:
@@ -108,13 +118,13 @@ class queryHandlerBasicSqlite:
         for row in result:
             for key, value in row.items():
                 if isColumnToDecode(key):
-                    row[key] = dc.db_decode(self.keyRing.vettSpec, value)
+                    row[key] = dc.db_decode(self.keyRing.vettDictDec, value)
         return result
 
     def db_results_decode_pandas(self, df):
         for col in df.columns:
             if isColumnToDecode(col):
-                df[col] = df[col].apply( lambda el: dc.db_decode(self.keyRing.vettSpec, el) )
+                df[col] = df[col].apply( lambda el: dc.db_decode(self.keyRing.vettDictDec, el) )
         return df
 
 

+ 3 - 4
flask_be/requirements.txt

@@ -1,4 +1,3 @@
-dtale==2.14.1
-Flask==2.2.3
-Flask_Cors==3.0.10
-pandas==1.5.3
+Flask==2.3.2
+flask_cors==3.0.10
+pandas==2.0.1

+ 39 - 0
server_readme.md

@@ -0,0 +1,39 @@
+##SERVER COMMANDS (most need sudo):
+
+LINUX:
+- lsof  -i:PORT  -->  list processes listening on PORT on linux
+- ss -ltnp  -->  list processes listening on various ports
+- ip a  -->  various machine ips
+- top, nohup  -->  old friends
+- journalctl -xe  -->  ???
+
+
+SSH:
+- ssh-keygen  -->  generate public/private key pair.
+  TAKE CARE OF THE FORMAT: EGI virtual machines seem to NEED RSA. The public key needs to be saved in /home/USERNAME/.ssh, and to be cat-ed in the /home/USERNAME/.ssh/authorized_keys file. The private key needs to be used by the user wanting to login; on linux, permissions must be 700.
+- ssh-add PRIVATE_KEY  -->  add the PRIVATE_KEY to the ssh service, so it won't need to be passed each time. Works with scp too
+- ssh -i PRIVATE_KEY user@server  -->  connect to server using PRIVATE_KEY. -i PRIVATE_KEY works for scp too. 
+- ssh-copy-id user@server  -->  can be used to copy the/a public key to the server; probably needs password authentication enabled, check.
+--> it's useful to also check the sshd (ssh daemon) configuration, for instance to enable/disable password login
+
+APACHE:
+Note -- most apache commands are shortcuts to stuff that can be done in other, more direct and "handmade" ways
+- systemctl start/stop/restart/reload apache2
+- a2ensite NOMESITO  -->  apache2 command to add 'site' (configuration file NOMESITO.conf in /etc/apache2/sites-available) to sites-enabled
+- a2enmod proxy  -->  command to enable reverse proxy setup in virtualhost (use together with proxy_http)
+- a2enmod proxy_http  -->  command to enable reverse proxy setup in virtualhost (use together with proxy)
+
+
+PYTHON:
+- waitress-serve --listen=127.0.0.42:5000 app:app  -->  example of command to serve flask app (file app.py, app name = app) on the waitress WSGI
+
+
+DOCKER:
+- docker exec -it CONTAINER bash  -->  explore filesystem Docker of specified *container* (with bash); more generally, 'docker exec' will execute commands on it. The container has to be running.
+- docker [buildx] build -t IMAGE_NAME .  -->  build docker image of specified name using a Dockerfile in the current working directory. The buildx extra keyword is needed on Windows.
+- docker run -d --name CONTAINER -p 80:80 IMAGE  -->  example of running Docker: run specified *image* in *container* named 'CONTAINER'; expose internal port 80 on external port 80 (-p); detach (-d)
+- docker images  -->  check existing Docker images
+- docker ps [-a]  -->  check running [all] docker containers
+- docker rm CONTAINER  -->  delete specified container
+- docker image rm IMAGE  -->  delete specified image
+- docker container logs CONTAINER  -->  check container logs

+ 9 - 0
site2/Dockerfile

@@ -0,0 +1,9 @@
+FROM httpd:latest
+COPY . /usr/local/apache2/htdocs/
+COPY js/toExport_alt.js /usr/local/apache2/htdocs/js/toExport.js
+COPY deploy/httpd.conf /usr/local/apache2/conf/
+COPY deploy/tigro.conf /usr/local/apache2/conf/sites/
+
+EXPOSE 80
+
+CMD ["httpd", "-D", "FOREGROUND"]

+ 552 - 0
site2/deploy/httpd.conf

@@ -0,0 +1,552 @@
+#
+# This is the main Apache HTTP server configuration file.  It contains the
+# configuration directives that give the server its instructions.
+# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
+# In particular, see 
+# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
+# for a discussion of each configuration directive.
+#
+# Do NOT simply read the instructions in here without understanding
+# what they do.  They're here only as hints or reminders.  If you are unsure
+# consult the online docs. You have been warned.  
+#
+# Configuration and logfile names: If the filenames you specify for many
+# of the server's control files begin with "/" (or "drive:/" for Win32), the
+# server will use that explicit path.  If the filenames do *not* begin
+# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
+# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
+# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 
+# will be interpreted as '/logs/access_log'.
+
+#
+# ServerRoot: The top of the directory tree under which the server's
+# configuration, error, and log files are kept.
+#
+# Do not add a slash at the end of the directory path.  If you point
+# ServerRoot at a non-local disk, be sure to specify a local disk on the
+# Mutex directive, if file-based mutexes are used.  If you wish to share the
+# same ServerRoot for multiple httpd daemons, you will need to change at
+# least PidFile.
+#
+ServerRoot "/usr/local/apache2"
+
+#
+# Mutex: Allows you to set the mutex mechanism and mutex file directory
+# for individual mutexes, or change the global defaults
+#
+# Uncomment and change the directory if mutexes are file-based and the default
+# mutex file directory is not on a local disk or is not appropriate for some
+# other reason.
+#
+# Mutex default:logs
+
+#
+# Listen: Allows you to bind Apache to specific IP addresses and/or
+# ports, instead of the default. See also the <VirtualHost>
+# directive.
+#
+# Change this to Listen on specific IP addresses as shown below to 
+# prevent Apache from glomming onto all bound IP addresses.
+#
+#Listen 12.34.56.78:80
+Listen 80
+
+#
+# Dynamic Shared Object (DSO) Support
+#
+# To be able to use the functionality of a module which was built as a DSO you
+# have to place corresponding `LoadModule' lines at this location so the
+# directives contained in it are actually available _before_ they are used.
+# Statically compiled modules (those listed by `httpd -l') do not need
+# to be loaded here.
+#
+# Example:
+# LoadModule foo_module modules/mod_foo.so
+#
+LoadModule mpm_event_module modules/mod_mpm_event.so
+#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
+#LoadModule mpm_worker_module modules/mod_mpm_worker.so
+LoadModule authn_file_module modules/mod_authn_file.so
+#LoadModule authn_dbm_module modules/mod_authn_dbm.so
+#LoadModule authn_anon_module modules/mod_authn_anon.so
+#LoadModule authn_dbd_module modules/mod_authn_dbd.so
+#LoadModule authn_socache_module modules/mod_authn_socache.so
+LoadModule authn_core_module modules/mod_authn_core.so
+LoadModule authz_host_module modules/mod_authz_host.so
+LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
+LoadModule authz_user_module modules/mod_authz_user.so
+#LoadModule authz_dbm_module modules/mod_authz_dbm.so
+#LoadModule authz_owner_module modules/mod_authz_owner.so
+#LoadModule authz_dbd_module modules/mod_authz_dbd.so
+LoadModule authz_core_module modules/mod_authz_core.so
+#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
+#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
+LoadModule access_compat_module modules/mod_access_compat.so
+LoadModule auth_basic_module modules/mod_auth_basic.so
+#LoadModule auth_form_module modules/mod_auth_form.so
+#LoadModule auth_digest_module modules/mod_auth_digest.so
+#LoadModule allowmethods_module modules/mod_allowmethods.so
+#LoadModule isapi_module modules/mod_isapi.so
+#LoadModule file_cache_module modules/mod_file_cache.so
+#LoadModule cache_module modules/mod_cache.so
+#LoadModule cache_disk_module modules/mod_cache_disk.so
+#LoadModule cache_socache_module modules/mod_cache_socache.so
+#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
+#LoadModule socache_dbm_module modules/mod_socache_dbm.so
+#LoadModule socache_memcache_module modules/mod_socache_memcache.so
+#LoadModule socache_redis_module modules/mod_socache_redis.so
+#LoadModule watchdog_module modules/mod_watchdog.so
+#LoadModule macro_module modules/mod_macro.so
+#LoadModule dbd_module modules/mod_dbd.so
+#LoadModule bucketeer_module modules/mod_bucketeer.so
+#LoadModule dumpio_module modules/mod_dumpio.so
+#LoadModule echo_module modules/mod_echo.so
+#LoadModule example_hooks_module modules/mod_example_hooks.so
+#LoadModule case_filter_module modules/mod_case_filter.so
+#LoadModule case_filter_in_module modules/mod_case_filter_in.so
+#LoadModule example_ipc_module modules/mod_example_ipc.so
+#LoadModule buffer_module modules/mod_buffer.so
+#LoadModule data_module modules/mod_data.so
+#LoadModule ratelimit_module modules/mod_ratelimit.so
+LoadModule reqtimeout_module modules/mod_reqtimeout.so
+#LoadModule ext_filter_module modules/mod_ext_filter.so
+#LoadModule request_module modules/mod_request.so
+#LoadModule include_module modules/mod_include.so
+LoadModule filter_module modules/mod_filter.so
+#LoadModule reflector_module modules/mod_reflector.so
+#LoadModule substitute_module modules/mod_substitute.so
+#LoadModule sed_module modules/mod_sed.so
+#LoadModule charset_lite_module modules/mod_charset_lite.so
+#LoadModule deflate_module modules/mod_deflate.so
+#LoadModule xml2enc_module modules/mod_xml2enc.so
+#LoadModule proxy_html_module modules/mod_proxy_html.so
+#LoadModule brotli_module modules/mod_brotli.so
+LoadModule mime_module modules/mod_mime.so
+#LoadModule ldap_module modules/mod_ldap.so
+LoadModule log_config_module modules/mod_log_config.so
+#LoadModule log_debug_module modules/mod_log_debug.so
+#LoadModule log_forensic_module modules/mod_log_forensic.so
+#LoadModule logio_module modules/mod_logio.so
+#LoadModule lua_module modules/mod_lua.so
+LoadModule env_module modules/mod_env.so
+#LoadModule mime_magic_module modules/mod_mime_magic.so
+#LoadModule cern_meta_module modules/mod_cern_meta.so
+#LoadModule expires_module modules/mod_expires.so
+LoadModule headers_module modules/mod_headers.so
+#LoadModule ident_module modules/mod_ident.so
+#LoadModule usertrack_module modules/mod_usertrack.so
+#LoadModule unique_id_module modules/mod_unique_id.so
+LoadModule setenvif_module modules/mod_setenvif.so
+LoadModule version_module modules/mod_version.so
+#LoadModule remoteip_module modules/mod_remoteip.so
+LoadModule proxy_module modules/mod_proxy.so
+#LoadModule proxy_connect_module modules/mod_proxy_connect.so
+#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
+LoadModule proxy_http_module modules/mod_proxy_http.so
+#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
+#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
+#LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
+#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
+#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
+#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
+#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
+#LoadModule proxy_express_module modules/mod_proxy_express.so
+#LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
+#LoadModule session_module modules/mod_session.so
+#LoadModule session_cookie_module modules/mod_session_cookie.so
+#LoadModule session_crypto_module modules/mod_session_crypto.so
+#LoadModule session_dbd_module modules/mod_session_dbd.so
+#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
+#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
+#LoadModule ssl_module modules/mod_ssl.so
+#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
+#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
+#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
+#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
+#LoadModule dialup_module modules/mod_dialup.so
+#LoadModule http2_module modules/mod_http2.so
+#LoadModule proxy_http2_module modules/mod_proxy_http2.so
+#LoadModule md_module modules/mod_md.so
+#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
+#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
+#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
+#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
+LoadModule unixd_module modules/mod_unixd.so
+#LoadModule heartbeat_module modules/mod_heartbeat.so
+#LoadModule heartmonitor_module modules/mod_heartmonitor.so
+#LoadModule dav_module modules/mod_dav.so
+LoadModule status_module modules/mod_status.so
+LoadModule autoindex_module modules/mod_autoindex.so
+#LoadModule asis_module modules/mod_asis.so
+#LoadModule info_module modules/mod_info.so
+#LoadModule suexec_module modules/mod_suexec.so
+<IfModule !mpm_prefork_module>
+	#LoadModule cgid_module modules/mod_cgid.so
+</IfModule>
+<IfModule mpm_prefork_module>
+	#LoadModule cgi_module modules/mod_cgi.so
+</IfModule>
+#LoadModule dav_fs_module modules/mod_dav_fs.so
+#LoadModule dav_lock_module modules/mod_dav_lock.so
+#LoadModule vhost_alias_module modules/mod_vhost_alias.so
+#LoadModule negotiation_module modules/mod_negotiation.so
+LoadModule dir_module modules/mod_dir.so
+#LoadModule imagemap_module modules/mod_imagemap.so
+#LoadModule actions_module modules/mod_actions.so
+#LoadModule speling_module modules/mod_speling.so
+#LoadModule userdir_module modules/mod_userdir.so
+LoadModule alias_module modules/mod_alias.so
+#LoadModule rewrite_module modules/mod_rewrite.so
+
+<IfModule unixd_module>
+#
+# If you wish httpd to run as a different user or group, you must run
+# httpd as root initially and it will switch.  
+#
+# User/Group: The name (or #number) of the user/group to run httpd as.
+# It is usually good practice to create a dedicated user and group for
+# running httpd, as with most system services.
+#
+User www-data
+Group www-data
+
+</IfModule>
+
+# 'Main' server configuration
+#
+# The directives in this section set up the values used by the 'main'
+# server, which responds to any requests that aren't handled by a
+# <VirtualHost> definition.  These values also provide defaults for
+# any <VirtualHost> containers you may define later in the file.
+#
+# All of these directives may appear inside <VirtualHost> containers,
+# in which case these default settings will be overridden for the
+# virtual host being defined.
+#
+
+#
+# ServerAdmin: Your address, where problems with the server should be
+# e-mailed.  This address appears on some server-generated pages, such
+# as error documents.  e.g. admin@your-domain.com
+#
+ServerAdmin you@example.com
+
+#
+# ServerName gives the name and port that the server uses to identify itself.
+# This can often be determined automatically, but we recommend you specify
+# it explicitly to prevent problems during startup.
+#
+# If your host doesn't have a registered DNS name, enter its IP address here.
+#
+#ServerName www.example.com:80
+
+#
+# Deny access to the entirety of your server's filesystem. You must
+# explicitly permit access to web content directories in other 
+# <Directory> blocks below.
+#
+<Directory />
+    AllowOverride none
+    Require all denied
+</Directory>
+
+#
+# Note that from this point forward you must specifically allow
+# particular features to be enabled - so if something's not working as
+# you might expect, make sure that you have specifically enabled it
+# below.
+#
+
+#
+# DocumentRoot: The directory out of which you will serve your
+# documents. By default, all requests are taken from this directory, but
+# symbolic links and aliases may be used to point to other locations.
+#
+DocumentRoot "/usr/local/apache2/htdocs"
+<Directory "/usr/local/apache2/htdocs">
+    #
+    # Possible values for the Options directive are "None", "All",
+    # or any combination of:
+    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
+    #
+    # Note that "MultiViews" must be named *explicitly* --- "Options All"
+    # doesn't give it to you.
+    #
+    # The Options directive is both complicated and important.  Please see
+    # http://httpd.apache.org/docs/2.4/mod/core.html#options
+    # for more information.
+    #
+    Options Indexes FollowSymLinks
+
+    #
+    # AllowOverride controls what directives may be placed in .htaccess files.
+    # It can be "All", "None", or any combination of the keywords:
+    #   AllowOverride FileInfo AuthConfig Limit
+    #
+    AllowOverride None
+
+    #
+    # Controls who can get stuff from this server.
+    #
+    Require all granted
+</Directory>
+
+#
+# DirectoryIndex: sets the file that Apache will serve if a directory
+# is requested.
+#
+<IfModule dir_module>
+    DirectoryIndex index.html
+</IfModule>
+
+#
+# The following lines prevent .htaccess and .htpasswd files from being 
+# viewed by Web clients. 
+#
+<Files ".ht*">
+    Require all denied
+</Files>
+
+#
+# ErrorLog: The location of the error log file.
+# If you do not specify an ErrorLog directive within a <VirtualHost>
+# container, error messages relating to that virtual host will be
+# logged here.  If you *do* define an error logfile for a <VirtualHost>
+# container, that host's errors will be logged there and not here.
+#
+ErrorLog /proc/self/fd/2
+
+#
+# LogLevel: Control the number of messages logged to the error_log.
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+#
+LogLevel warn
+
+<IfModule log_config_module>
+    #
+    # The following directives define some format nicknames for use with
+    # a CustomLog directive (see below).
+    #
+    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+    LogFormat "%h %l %u %t \"%r\" %>s %b" common
+
+    <IfModule logio_module>
+      # You need to enable mod_logio.c to use %I and %O
+      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
+    </IfModule>
+
+    #
+    # The location and format of the access logfile (Common Logfile Format).
+    # If you do not define any access logfiles within a <VirtualHost>
+    # container, they will be logged here.  Contrariwise, if you *do*
+    # define per-<VirtualHost> access logfiles, transactions will be
+    # logged therein and *not* in this file.
+    #
+    CustomLog /proc/self/fd/1 common
+
+    #
+    # If you prefer a logfile with access, agent, and referer information
+    # (Combined Logfile Format) you can use the following directive.
+    #
+    #CustomLog "logs/access_log" combined
+</IfModule>
+
+<IfModule alias_module>
+    #
+    # Redirect: Allows you to tell clients about documents that used to 
+    # exist in your server's namespace, but do not anymore. The client 
+    # will make a new request for the document at its new location.
+    # Example:
+    # Redirect permanent /foo http://www.example.com/bar
+
+    #
+    # Alias: Maps web paths into filesystem paths and is used to
+    # access content that does not live under the DocumentRoot.
+    # Example:
+    # Alias /webpath /full/filesystem/path
+    #
+    # If you include a trailing / on /webpath then the server will
+    # require it to be present in the URL.  You will also likely
+    # need to provide a <Directory> section to allow access to
+    # the filesystem path.
+
+    #
+    # ScriptAlias: This controls which directories contain server scripts. 
+    # ScriptAliases are essentially the same as Aliases, except that
+    # documents in the target directory are treated as applications and
+    # run by the server when requested rather than as documents sent to the
+    # client.  The same rules about trailing "/" apply to ScriptAlias
+    # directives as to Alias.
+    #
+    ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
+
+</IfModule>
+
+<IfModule cgid_module>
+    #
+    # ScriptSock: On threaded servers, designate the path to the UNIX
+    # socket used to communicate with the CGI daemon of mod_cgid.
+    #
+    #Scriptsock cgisock
+</IfModule>
+
+#
+# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
+# CGI directory exists, if you have that configured.
+#
+<Directory "/usr/local/apache2/cgi-bin">
+    AllowOverride None
+    Options None
+    Require all granted
+</Directory>
+
+<IfModule headers_module>
+    #
+    # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
+    # backend servers which have lingering "httpoxy" defects.
+    # 'Proxy' request header is undefined by the IETF, not listed by IANA
+    #
+    RequestHeader unset Proxy early
+</IfModule>
+
+<IfModule mime_module>
+    #
+    # TypesConfig points to the file containing the list of mappings from
+    # filename extension to MIME-type.
+    #
+    TypesConfig conf/mime.types
+
+    #
+    # AddType allows you to add to or override the MIME configuration
+    # file specified in TypesConfig for specific file types.
+    #
+    #AddType application/x-gzip .tgz
+    #
+    # AddEncoding allows you to have certain browsers uncompress
+    # information on the fly. Note: Not all browsers support this.
+    #
+    #AddEncoding x-compress .Z
+    #AddEncoding x-gzip .gz .tgz
+    #
+    # If the AddEncoding directives above are commented-out, then you
+    # probably should define those extensions to indicate media types:
+    #
+    AddType application/x-compress .Z
+    AddType application/x-gzip .gz .tgz
+
+    #
+    # AddHandler allows you to map certain file extensions to "handlers":
+    # actions unrelated to filetype. These can be either built into the server
+    # or added with the Action directive (see below)
+    #
+    # To use CGI scripts outside of ScriptAliased directories:
+    # (You will also need to add "ExecCGI" to the "Options" directive.)
+    #
+    #AddHandler cgi-script .cgi
+
+    # For type maps (negotiated resources):
+    #AddHandler type-map var
+
+    #
+    # Filters allow you to process content before it is sent to the client.
+    #
+    # To parse .shtml files for server-side includes (SSI):
+    # (You will also need to add "Includes" to the "Options" directive.)
+    #
+    #AddType text/html .shtml
+    #AddOutputFilter INCLUDES .shtml
+</IfModule>
+
+#
+# The mod_mime_magic module allows the server to use various hints from the
+# contents of the file itself to determine its type.  The MIMEMagicFile
+# directive tells the module where the hint definitions are located.
+#
+#MIMEMagicFile conf/magic
+
+#
+# Customizable error responses come in three flavors:
+# 1) plain text 2) local redirects 3) external redirects
+#
+# Some examples:
+#ErrorDocument 500 "The server made a boo boo."
+#ErrorDocument 404 /missing.html
+#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
+#ErrorDocument 402 http://www.example.com/subscription_info.html
+#
+
+#
+# MaxRanges: Maximum number of Ranges in a request before
+# returning the entire resource, or one of the special
+# values 'default', 'none' or 'unlimited'.
+# Default setting is to accept 200 Ranges.
+#MaxRanges unlimited
+
+#
+# EnableMMAP and EnableSendfile: On systems that support it, 
+# memory-mapping or the sendfile syscall may be used to deliver
+# files.  This usually improves server performance, but must
+# be turned off when serving from networked-mounted 
+# filesystems or if support for these functions is otherwise
+# broken on your system.
+# Defaults: EnableMMAP On, EnableSendfile Off
+#
+#EnableMMAP off
+#EnableSendfile on
+
+# Supplemental configuration
+#
+# The configuration files in the conf/extra/ directory can be 
+# included to add extra features or to modify the default configuration of 
+# the server, or you may simply copy their contents here and change as 
+# necessary.
+
+# Server-pool management (MPM specific)
+#Include conf/extra/httpd-mpm.conf
+
+# Multi-language error messages
+#Include conf/extra/httpd-multilang-errordoc.conf
+
+# Fancy directory listings
+#Include conf/extra/httpd-autoindex.conf
+
+# Language settings
+#Include conf/extra/httpd-languages.conf
+
+# User home directories
+#Include conf/extra/httpd-userdir.conf
+
+# Real-time info on requests and configuration
+#Include conf/extra/httpd-info.conf
+
+# Virtual hosts
+#Include conf/extra/httpd-vhosts.conf
+
+# Local access to the Apache HTTP Server Manual
+#Include conf/extra/httpd-manual.conf
+
+# Distributed authoring and versioning (WebDAV)
+#Include conf/extra/httpd-dav.conf
+
+# Various default settings
+#Include conf/extra/httpd-default.conf
+
+# Configure mod_proxy_html to understand HTML4/XHTML1
+<IfModule proxy_html_module>
+Include conf/extra/proxy-html.conf
+</IfModule>
+
+# Secure (SSL/TLS) connections
+#Include conf/extra/httpd-ssl.conf
+#
+# Note: The following must must be present to support
+#       starting without SSL on platforms with no /dev/random equivalent
+#       but a statically compiled-in mod_ssl.
+#
+<IfModule ssl_module>
+SSLRandomSeed startup builtin
+SSLRandomSeed connect builtin
+</IfModule>
+
+IncludeOptional conf/sites/tigro.conf

+ 552 - 0
site2/deploy/httpd_copiato.conf

@@ -0,0 +1,552 @@
+#
+# This is the main Apache HTTP server configuration file.  It contains the
+# configuration directives that give the server its instructions.
+# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
+# In particular, see 
+# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
+# for a discussion of each configuration directive.
+#
+# Do NOT simply read the instructions in here without understanding
+# what they do.  They're here only as hints or reminders.  If you are unsure
+# consult the online docs. You have been warned.  
+#
+# Configuration and logfile names: If the filenames you specify for many
+# of the server's control files begin with "/" (or "drive:/" for Win32), the
+# server will use that explicit path.  If the filenames do *not* begin
+# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
+# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
+# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 
+# will be interpreted as '/logs/access_log'.
+
+#
+# ServerRoot: The top of the directory tree under which the server's
+# configuration, error, and log files are kept.
+#
+# Do not add a slash at the end of the directory path.  If you point
+# ServerRoot at a non-local disk, be sure to specify a local disk on the
+# Mutex directive, if file-based mutexes are used.  If you wish to share the
+# same ServerRoot for multiple httpd daemons, you will need to change at
+# least PidFile.
+#
+ServerRoot "/usr/local/apache2"
+
+#
+# Mutex: Allows you to set the mutex mechanism and mutex file directory
+# for individual mutexes, or change the global defaults
+#
+# Uncomment and change the directory if mutexes are file-based and the default
+# mutex file directory is not on a local disk or is not appropriate for some
+# other reason.
+#
+# Mutex default:logs
+
+#
+# Listen: Allows you to bind Apache to specific IP addresses and/or
+# ports, instead of the default. See also the <VirtualHost>
+# directive.
+#
+# Change this to Listen on specific IP addresses as shown below to 
+# prevent Apache from glomming onto all bound IP addresses.
+#
+#Listen 12.34.56.78:80
+Listen 80
+
+#
+# Dynamic Shared Object (DSO) Support
+#
+# To be able to use the functionality of a module which was built as a DSO you
+# have to place corresponding `LoadModule' lines at this location so the
+# directives contained in it are actually available _before_ they are used.
+# Statically compiled modules (those listed by `httpd -l') do not need
+# to be loaded here.
+#
+# Example:
+# LoadModule foo_module modules/mod_foo.so
+#
+LoadModule mpm_event_module modules/mod_mpm_event.so
+#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
+#LoadModule mpm_worker_module modules/mod_mpm_worker.so
+LoadModule authn_file_module modules/mod_authn_file.so
+#LoadModule authn_dbm_module modules/mod_authn_dbm.so
+#LoadModule authn_anon_module modules/mod_authn_anon.so
+#LoadModule authn_dbd_module modules/mod_authn_dbd.so
+#LoadModule authn_socache_module modules/mod_authn_socache.so
+LoadModule authn_core_module modules/mod_authn_core.so
+LoadModule authz_host_module modules/mod_authz_host.so
+LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
+LoadModule authz_user_module modules/mod_authz_user.so
+#LoadModule authz_dbm_module modules/mod_authz_dbm.so
+#LoadModule authz_owner_module modules/mod_authz_owner.so
+#LoadModule authz_dbd_module modules/mod_authz_dbd.so
+LoadModule authz_core_module modules/mod_authz_core.so
+#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
+#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
+LoadModule access_compat_module modules/mod_access_compat.so
+LoadModule auth_basic_module modules/mod_auth_basic.so
+#LoadModule auth_form_module modules/mod_auth_form.so
+#LoadModule auth_digest_module modules/mod_auth_digest.so
+#LoadModule allowmethods_module modules/mod_allowmethods.so
+#LoadModule isapi_module modules/mod_isapi.so
+#LoadModule file_cache_module modules/mod_file_cache.so
+#LoadModule cache_module modules/mod_cache.so
+#LoadModule cache_disk_module modules/mod_cache_disk.so
+#LoadModule cache_socache_module modules/mod_cache_socache.so
+#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
+#LoadModule socache_dbm_module modules/mod_socache_dbm.so
+#LoadModule socache_memcache_module modules/mod_socache_memcache.so
+#LoadModule socache_redis_module modules/mod_socache_redis.so
+LoadModule watchdog_module modules/mod_watchdog.so
+#LoadModule macro_module modules/mod_macro.so
+#LoadModule dbd_module modules/mod_dbd.so
+#LoadModule bucketeer_module modules/mod_bucketeer.so
+#LoadModule dumpio_module modules/mod_dumpio.so
+#LoadModule echo_module modules/mod_echo.so
+#LoadModule example_hooks_module modules/mod_example_hooks.so
+#LoadModule case_filter_module modules/mod_case_filter.so
+#LoadModule case_filter_in_module modules/mod_case_filter_in.so
+#LoadModule example_ipc_module modules/mod_example_ipc.so
+#LoadModule buffer_module modules/mod_buffer.so
+#LoadModule data_module modules/mod_data.so
+#LoadModule ratelimit_module modules/mod_ratelimit.so
+LoadModule reqtimeout_module modules/mod_reqtimeout.so
+#LoadModule ext_filter_module modules/mod_ext_filter.so
+#LoadModule request_module modules/mod_request.so
+#LoadModule include_module modules/mod_include.so
+LoadModule filter_module modules/mod_filter.so
+#LoadModule reflector_module modules/mod_reflector.so
+#LoadModule substitute_module modules/mod_substitute.so
+#LoadModule sed_module modules/mod_sed.so
+#LoadModule charset_lite_module modules/mod_charset_lite.so
+#LoadModule deflate_module modules/mod_deflate.so
+#LoadModule xml2enc_module modules/mod_xml2enc.so
+#LoadModule proxy_html_module modules/mod_proxy_html.so
+LoadModule mime_module modules/mod_mime.so
+#LoadModule ldap_module modules/mod_ldap.so
+LoadModule log_config_module modules/mod_log_config.so
+#LoadModule log_debug_module modules/mod_log_debug.so
+#LoadModule log_forensic_module modules/mod_log_forensic.so
+#LoadModule logio_module modules/mod_logio.so
+#LoadModule lua_module modules/mod_lua.so
+LoadModule env_module modules/mod_env.so
+#LoadModule mime_magic_module modules/mod_mime_magic.so
+#LoadModule cern_meta_module modules/mod_cern_meta.so
+#LoadModule expires_module modules/mod_expires.so
+LoadModule headers_module modules/mod_headers.so
+#LoadModule ident_module modules/mod_ident.so
+#LoadModule usertrack_module modules/mod_usertrack.so
+#LoadModule unique_id_module modules/mod_unique_id.so
+LoadModule setenvif_module modules/mod_setenvif.so
+LoadModule version_module modules/mod_version.so
+#LoadModule remoteip_module modules/mod_remoteip.so
+LoadModule proxy_module modules/mod_proxy.so
+LoadModule proxy_connect_module modules/mod_proxy_connect.so
+LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
+LoadModule proxy_http_module modules/mod_proxy_http.so
+LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
+LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
+LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
+LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
+LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
+LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
+LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
+LoadModule proxy_express_module modules/mod_proxy_express.so
+LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
+#LoadModule session_module modules/mod_session.so
+#LoadModule session_cookie_module modules/mod_session_cookie.so
+#LoadModule session_crypto_module modules/mod_session_crypto.so
+#LoadModule session_dbd_module modules/mod_session_dbd.so
+LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
+#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
+LoadModule ssl_module modules/mod_ssl.so
+#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
+#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
+#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
+#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
+#LoadModule dialup_module modules/mod_dialup.so
+#LoadModule http2_module modules/mod_http2.so
+#LoadModule proxy_http2_module modules/mod_proxy_http2.so
+#LoadModule md_module modules/mod_md.so
+LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
+LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
+LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
+LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
+LoadModule unixd_module modules/mod_unixd.so
+#LoadModule heartbeat_module modules/mod_heartbeat.so
+#LoadModule heartmonitor_module modules/mod_heartmonitor.so
+#LoadModule dav_module modules/mod_dav.so
+LoadModule status_module modules/mod_status.so
+LoadModule autoindex_module modules/mod_autoindex.so
+#LoadModule asis_module modules/mod_asis.so
+#LoadModule info_module modules/mod_info.so
+#LoadModule suexec_module modules/mod_suexec.so
+<IfModule !mpm_prefork_module>
+	#LoadModule cgid_module modules/mod_cgid.so
+</IfModule>
+<IfModule mpm_prefork_module>
+	#LoadModule cgi_module modules/mod_cgi.so
+</IfModule>
+#LoadModule dav_fs_module modules/mod_dav_fs.so
+#LoadModule dav_lock_module modules/mod_dav_lock.so
+#LoadModule vhost_alias_module modules/mod_vhost_alias.so
+#LoadModule negotiation_module modules/mod_negotiation.so
+LoadModule dir_module modules/mod_dir.so
+#LoadModule imagemap_module modules/mod_imagemap.so
+#LoadModule actions_module modules/mod_actions.so
+#LoadModule speling_module modules/mod_speling.so
+#LoadModule userdir_module modules/mod_userdir.so
+LoadModule alias_module modules/mod_alias.so
+#LoadModule rewrite_module modules/mod_rewrite.so
+
+<IfModule unixd_module>
+#
+# If you wish httpd to run as a different user or group, you must run
+# httpd as root initially and it will switch.  
+#
+# User/Group: The name (or #number) of the user/group to run httpd as.
+# It is usually good practice to create a dedicated user and group for
+# running httpd, as with most system services.
+#
+User daemon
+Group daemon
+
+</IfModule>
+
+# 'Main' server configuration
+#
+# The directives in this section set up the values used by the 'main'
+# server, which responds to any requests that aren't handled by a
+# <VirtualHost> definition.  These values also provide defaults for
+# any <VirtualHost> containers you may define later in the file.
+#
+# All of these directives may appear inside <VirtualHost> containers,
+# in which case these default settings will be overridden for the
+# virtual host being defined.
+#
+
+#
+# ServerAdmin: Your address, where problems with the server should be
+# e-mailed.  This address appears on some server-generated pages, such
+# as error documents.  e.g. admin@your-domain.com
+#
+ServerAdmin you@example.com
+
+#
+# ServerName gives the name and port that the server uses to identify itself.
+# This can often be determined automatically, but we recommend you specify
+# it explicitly to prevent problems during startup.
+#
+# If your host doesn't have a registered DNS name, enter its IP address here.
+#
+#ServerName www.example.com:80
+
+#
+# Deny access to the entirety of your server's filesystem. You must
+# explicitly permit access to web content directories in other 
+# <Directory> blocks below.
+#
+<Directory />
+    AllowOverride none
+    Require all denied
+</Directory>
+
+#
+# Note that from this point forward you must specifically allow
+# particular features to be enabled - so if something's not working as
+# you might expect, make sure that you have specifically enabled it
+# below.
+#
+
+#
+# DocumentRoot: The directory out of which you will serve your
+# documents. By default, all requests are taken from this directory, but
+# symbolic links and aliases may be used to point to other locations.
+#
+DocumentRoot "/usr/local/apache2/htdocs"
+<Directory "/usr/local/apache2/htdocs">
+    #
+    # Possible values for the Options directive are "None", "All",
+    # or any combination of:
+    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
+    #
+    # Note that "MultiViews" must be named *explicitly* --- "Options All"
+    # doesn't give it to you.
+    #
+    # The Options directive is both complicated and important.  Please see
+    # http://httpd.apache.org/docs/2.4/mod/core.html#options
+    # for more information.
+    #
+    Options Indexes FollowSymLinks
+
+    #
+    # AllowOverride controls what directives may be placed in .htaccess files.
+    # It can be "All", "None", or any combination of the keywords:
+    #   AllowOverride FileInfo AuthConfig Limit
+    #
+    AllowOverride None
+
+    #
+    # Controls who can get stuff from this server.
+    #
+    Require all granted
+</Directory>
+
+#
+# DirectoryIndex: sets the file that Apache will serve if a directory
+# is requested.
+#
+<IfModule dir_module>
+    DirectoryIndex index.html
+</IfModule>
+
+#
+# The following lines prevent .htaccess and .htpasswd files from being 
+# viewed by Web clients. 
+#
+<Files ".ht*">
+    Require all denied
+</Files>
+
+#
+# ErrorLog: The location of the error log file.
+# If you do not specify an ErrorLog directive within a <VirtualHost>
+# container, error messages relating to that virtual host will be
+# logged here.  If you *do* define an error logfile for a <VirtualHost>
+# container, that host's errors will be logged there and not here.
+#
+ErrorLog /proc/self/fd/2
+
+#
+# LogLevel: Control the number of messages logged to the error_log.
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+#
+LogLevel warn
+
+<IfModule log_config_module>
+    #
+    # The following directives define some format nicknames for use with
+    # a CustomLog directive (see below).
+    #
+    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+    LogFormat "%h %l %u %t \"%r\" %>s %b" common
+
+    <IfModule logio_module>
+      # You need to enable mod_logio.c to use %I and %O
+      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
+    </IfModule>
+
+    #
+    # The location and format of the access logfile (Common Logfile Format).
+    # If you do not define any access logfiles within a <VirtualHost>
+    # container, they will be logged here.  Contrariwise, if you *do*
+    # define per-<VirtualHost> access logfiles, transactions will be
+    # logged therein and *not* in this file.
+    #
+    CustomLog /proc/self/fd/1 common
+
+    #
+    # If you prefer a logfile with access, agent, and referer information
+    # (Combined Logfile Format) you can use the following directive.
+    #
+    #CustomLog "logs/access_log" combined
+</IfModule>
+
+<IfModule alias_module>
+    #
+    # Redirect: Allows you to tell clients about documents that used to 
+    # exist in your server's namespace, but do not anymore. The client 
+    # will make a new request for the document at its new location.
+    # Example:
+    # Redirect permanent /foo http://www.example.com/bar
+
+    #
+    # Alias: Maps web paths into filesystem paths and is used to
+    # access content that does not live under the DocumentRoot.
+    # Example:
+    # Alias /webpath /full/filesystem/path
+    #
+    # If you include a trailing / on /webpath then the server will
+    # require it to be present in the URL.  You will also likely
+    # need to provide a <Directory> section to allow access to
+    # the filesystem path.
+
+    #
+    # ScriptAlias: This controls which directories contain server scripts. 
+    # ScriptAliases are essentially the same as Aliases, except that
+    # documents in the target directory are treated as applications and
+    # run by the server when requested rather than as documents sent to the
+    # client.  The same rules about trailing "/" apply to ScriptAlias
+    # directives as to Alias.
+    #
+    ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
+
+</IfModule>
+
+<IfModule cgid_module>
+    #
+    # ScriptSock: On threaded servers, designate the path to the UNIX
+    # socket used to communicate with the CGI daemon of mod_cgid.
+    #
+    #Scriptsock cgisock
+</IfModule>
+
+#
+# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
+# CGI directory exists, if you have that configured.
+#
+<Directory "/usr/local/apache2/cgi-bin">
+    AllowOverride None
+    Options None
+    Require all granted
+</Directory>
+
+<IfModule headers_module>
+    #
+    # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
+    # backend servers which have lingering "httpoxy" defects.
+    # 'Proxy' request header is undefined by the IETF, not listed by IANA
+    #
+    RequestHeader unset Proxy early
+</IfModule>
+
+<IfModule mime_module>
+    #
+    # TypesConfig points to the file containing the list of mappings from
+    # filename extension to MIME-type.
+    #
+    TypesConfig conf/mime.types
+
+    #
+    # AddType allows you to add to or override the MIME configuration
+    # file specified in TypesConfig for specific file types.
+    #
+    #AddType application/x-gzip .tgz
+    #
+    # AddEncoding allows you to have certain browsers uncompress
+    # information on the fly. Note: Not all browsers support this.
+    #
+    #AddEncoding x-compress .Z
+    #AddEncoding x-gzip .gz .tgz
+    #
+    # If the AddEncoding directives above are commented-out, then you
+    # probably should define those extensions to indicate media types:
+    #
+    AddType application/x-compress .Z
+    AddType application/x-gzip .gz .tgz
+
+    #
+    # AddHandler allows you to map certain file extensions to "handlers":
+    # actions unrelated to filetype. These can be either built into the server
+    # or added with the Action directive (see below)
+    #
+    # To use CGI scripts outside of ScriptAliased directories:
+    # (You will also need to add "ExecCGI" to the "Options" directive.)
+    #
+    #AddHandler cgi-script .cgi
+
+    # For type maps (negotiated resources):
+    #AddHandler type-map var
+
+    #
+    # Filters allow you to process content before it is sent to the client.
+    #
+    # To parse .shtml files for server-side includes (SSI):
+    # (You will also need to add "Includes" to the "Options" directive.)
+    #
+    #AddType text/html .shtml
+    #AddOutputFilter INCLUDES .shtml
+</IfModule>
+
+#
+# The mod_mime_magic module allows the server to use various hints from the
+# contents of the file itself to determine its type.  The MIMEMagicFile
+# directive tells the module where the hint definitions are located.
+#
+#MIMEMagicFile conf/magic
+
+#
+# Customizable error responses come in three flavors:
+# 1) plain text 2) local redirects 3) external redirects
+#
+# Some examples:
+#ErrorDocument 500 "The server made a boo boo."
+#ErrorDocument 404 /missing.html
+#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
+#ErrorDocument 402 http://www.example.com/subscription_info.html
+#
+
+#
+# MaxRanges: Maximum number of Ranges in a request before
+# returning the entire resource, or one of the special
+# values 'default', 'none' or 'unlimited'.
+# Default setting is to accept 200 Ranges.
+#MaxRanges unlimited
+
+#
+# EnableMMAP and EnableSendfile: On systems that support it, 
+# memory-mapping or the sendfile syscall may be used to deliver
+# files.  This usually improves server performance, but must
+# be turned off when serving from networked-mounted 
+# filesystems or if support for these functions is otherwise
+# broken on your system.
+# Defaults: EnableMMAP On, EnableSendfile Off
+#
+#EnableMMAP off
+#EnableSendfile on
+
+# Supplemental configuration
+#
+# The configuration files in the conf/extra/ directory can be 
+# included to add extra features or to modify the default configuration of 
+# the server, or you may simply copy their contents here and change as 
+# necessary.
+
+# Server-pool management (MPM specific)
+#Include conf/extra/httpd-mpm.conf
+
+# Multi-language error messages
+#Include conf/extra/httpd-multilang-errordoc.conf
+
+# Fancy directory listings
+#Include conf/extra/httpd-autoindex.conf
+
+# Language settings
+#Include conf/extra/httpd-languages.conf
+
+# User home directories
+#Include conf/extra/httpd-userdir.conf
+
+# Real-time info on requests and configuration
+#Include conf/extra/httpd-info.conf
+
+# Virtual hosts
+#Include conf/extra/httpd-vhosts.conf
+
+# Local access to the Apache HTTP Server Manual
+#Include conf/extra/httpd-manual.conf
+
+# Distributed authoring and versioning (WebDAV)
+#Include conf/extra/httpd-dav.conf
+
+# Various default settings
+#Include conf/extra/httpd-default.conf
+
+# Configure mod_proxy_html to understand HTML4/XHTML1
+<IfModule proxy_html_module>
+Include conf/extra/proxy-html.conf
+</IfModule>
+
+# Secure (SSL/TLS) connections
+#Include conf/extra/httpd-ssl.conf
+#
+# Note: The following must must be present to support
+#       starting without SSL on platforms with no /dev/random equivalent
+#       but a statically compiled-in mod_ssl.
+#
+<IfModule ssl_module>
+SSLRandomSeed startup builtin
+SSLRandomSeed connect builtin
+</IfModule>
+
+# To Load Customer VirtualHost Configuration files
+IncludeOptional conf/sites/*.conf

+ 33 - 0
site2/deploy/tigro.conf

@@ -0,0 +1,33 @@
+<VirtualHost 147.213.76.243:80>
+        # The ServerName directive sets the request scheme, hostname and port that
+        # the server uses to identify itself. This is used when creating
+        # redirection URLs. In the context of virtual hosts, the ServerName
+        # specifies what hostname must appear in the request's Host: header to
+        # match this virtual host. For the default virtual host (this file) this
+        # value is not decisive as it is used as a last resort host regardless.
+        # However, you must set it for any further virtual host explicitly.
+        #ServerName www.example.com
+
+        ServerAdmin webmaster@localhost
+        DocumentRoot /usr/local/apache2/htdocs
+
+        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
+        # error, crit, alert, emerg.
+        # It is also possible to configure the loglevel for particular
+        # modules, e.g.
+        #LogLevel info ssl:warn
+
+        ErrorLog error.log
+        CustomLog access.log combined
+
+        # For most configuration files from conf-available/, which are
+        # enabled or disabled at a global level, it is possible to
+        # include a line for only one particular virtual host. For example the
+        # following line enables the CGI configuration for this host only
+        # after it has been globally disabled with "a2disconf".
+        #Include conf-available/serve-cgi-bin.conf
+
+        ProxyPass /data http://127.0.0.42:5000
+        ProxyPassReverse /data http://127.0.0.42:5000
+
+</VirtualHost>

+ 130 - 0
site2/js/toExport_alt.js

@@ -0,0 +1,130 @@
+import {processData, processOccData} from './processData.js'
+
+export const flask_be_address = 'http://147.213.76.243/data';
+
+export function getData(endpoint, queryDTO){
+
+    let url = flask_be_address.concat(endpoint);
+
+    // This seems to work and it's definitely better than previous version
+    return $.ajax(
+      {
+        url: url,
+        type: 'POST',
+        contentType: 'application/json; charset=utf-8',
+        dataType: 'json',
+        data: JSON.stringify(queryDTO),
+      }
+    );
+
+}
+
+export let queryDTO = {};
+
+export function funzioneRicerca(){
+    $("#result").html("");
+    $("#loader").css("display", "block");
+    let collection_elementoDaRicercare = document.getElementsByClassName("barraDiRicerca");
+    var collection_types = document.getElementsByClassName("flViewBy");
+    var collection_lenght = collection_elementoDaRicercare.length;
+    let distanza = document.getElementById("distanza").value;
+    let queryList = [];
+    var periodo = 0;
+    var ordinate = 0;
+  
+    var i = 0;
+    for (i; i < collection_lenght; i++) {
+      let elementoDaRicercare = collection_elementoDaRicercare[i].value;
+      let word = elementoDaRicercare;
+      var tipo = "";
+      var espansa = 0;
+      var raddoppiata = 0;
+      var noLemma = 0;
+      var formeLemmi = 0;
+      var check_tipo = collection_types[i].value;
+   
+      //NOLEMMA DEVE ESSERE CONVERTITO IN TIPO (TIPO = 0, 1, 2), TIPO = 2 SE NOLEMMA è SELEZIONATO
+         
+      if ($('#occ_' + i + ' .ricercaEx').prop("checked"))
+      {
+        espansa = 1;
+      }
+      if ($('#occ_' + i + ' .raddoppiata').prop("checked"))
+      {
+        raddoppiata = 1;
+      }
+      if ($('#occ_' + i + ' .showOther').prop("checked"))
+      {
+        formeLemmi = 1;
+      }
+      if ($('#occ_' + i + ' .lemmatizzata').prop("checked"))
+      {
+        noLemma = 1;
+      }
+      
+  
+      if ((check_tipo == "forma") && (formeLemmi == 0)) {
+        tipo = "forma";
+      }
+      else if ((check_tipo == "forma") && (formeLemmi == 1)) {
+        tipo = "formaLemma";
+      }
+      else if ((check_tipo == "lemma") && (noLemma == 1)) {
+        tipo = "soloLemmatizzate";
+      }
+      else if ((check_tipo == "lemma") && (formeLemmi == 0)) {
+        tipo = "lemma";
+      }
+      else if ((check_tipo == "lemma") && (formeLemmi == 1)) {
+        tipo = "lemmaForma";
+      }
+  
+      queryList.push( {"stringa": word, "espansa": espansa, "raddoppiata": raddoppiata, "tipo": tipo} );
+      //$("#params").append("I tuoi parametri: " + word + "; " + tipo + "; " + espansa + "; " + raddoppiata + "; " + formeLemmi);
+    
+    }
+  
+    if ($('#periodo').prop("checked"))
+    {
+      periodo = 1;
+    }
+    if ($('#ordinate').prop("checked"))
+    {
+      ordinate = 1;
+    }
+  
+    let cooccorrenze = {"distanza": distanza, "stesso_periodo": periodo, "ordinate": ordinate};
+  
+    let numb = document.getElementById("search_form").childElementCount;
+    if (numb < 2) {
+        queryDTO = {
+          queryList: queryList
+      }
+      getData('/simple_get_query', queryDTO)
+      // After request finishes, process response data
+      .done(response => processData(response))
+      .fail(err => {
+        console.log(err);
+        $("#loader").css("display", "none");
+        alert('Something went wrong!');
+      });
+    } else {
+        queryDTO = {
+          queryList: queryList,
+          cooccorrenze: cooccorrenze
+      }
+      getData('/simple_get_query', queryDTO)
+      // After request finishes, process response data
+      .done(response => processOccData(response))
+      .fail(err => {
+        console.log(err);
+        $("#loader").css("display", "none");
+        alert('Something went wrong!');
+      });
+    } 
+  
+    console.log(queryDTO);
+  
+    $("#lauchSearchContext").css("display", "flex");
+    
+  } 

BIN
test_suite/tests_kora_misc/Query_speed/bibliografia/BiblioTLIO.db


+ 19 - 0
test_suite/tests_kora_misc/Query_speed/decoding/decoding.py

@@ -33,6 +33,25 @@ def db_results_decode_nodict(result, vettSpec):
     return out
 
 
+# Basic functions
+
+def db_encode(vettSpec, string0):
+    res = ""
+    for char0 in string0:
+        # DA RIVEDERE
+        ############################
+        if char0 != "%" and "_":
+        ############################
+            #1
+            char0Hex = hex(ord(char0)) # Dal carattere al codice Unicode ESADECIMALE corrispondente
+            #2
+            char0ConvDec = next((el['intcode'] for el in vettSpec if el['unicode'] == char0Hex[2:].upper()), None) # Il codice ESADECIMALE, senza il prefisso '0x' (rimosso tramite [2:]) e convertito in maiuscole per rispettare il formato di vettSpec, viene ricercato in vettSpec, ritornando l'Unicode DECIMALE del carattere criptato o None se non c'è riscontro -- il che non DOVREBBE succedere.
+            #3
+            res += chr(int(char0ConvDec)) # Si usa la built-in chr per recuperare il carattere
+        else:
+            res += char0
+    return res
+
 def db_decode(vettSpec, string0):
     res = ""
     for char0 in string0:

+ 1 - 2
test_suite/tests_kora_misc/Query_speed/decoding/vettSpec.csv

@@ -1037,8 +1037,7 @@ intcode,unicode
 30001,AA
 30002,BA
 30003,194
-30004,"195
-195"
+30004,195
 30005,196
 30006,19B
 30007,1A2

+ 2 - 3
test_suite/tests_kora_misc/Query_speed/queries.py

@@ -7,8 +7,8 @@ import time
 from decoding.decoding import getVettSpec, db_results_decode_pandas, db_results_decode, db_results_decode_nodict
 # %%
 #
-# Ricerca: cooccorrenze, dove la prima 'c*' come Lemma (con forme non lemmatizzate, il default) -- un sacco di risultati! -- seguita da un findtext automatico per TUTTI i contesti (il default per le cooccorrenze). Le parole successive non sono rilevanti.
-# Il tutto è eseguito sul DB 'di prova grande' ndg2.gat4.
+# Ricerca: copiata dalla ricerca per cooccorrenze, versione 18 Maggio 2023 Develop, con prima prima 'c*' come Lemma (con forme non lemmatizzate, il default) -- un sacco di risultati! -- seguita da un findtext automatico per TUTTI i contesti (il default per le cooccorrenze). Le parole successive non sono rilevanti per questa prova. Solo il procedimento fino alla prima query 'lunga' è considerato.
+# Il tutto è eseguito sul DB 'di prova grande' ndg2.gat4, poi MODIFICATO per aggiungere un indice su Periodi.
 
 
 # Il file del DB (copiato in locale)
@@ -164,7 +164,6 @@ with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
     tmpQuery = theQuerySimp2(','.join(codesStr), ','.join(formCodesStr))
     querr = 'CREATE TEMPORARY TABLE stuff AS ' + tmpQuery
     connection.cursor().execute(querr)
-    "cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo"
     riQuery = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS piniz FROM stuff LEFT JOIN Occ00001 AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa-15'
     bisQuery = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS pfin FROM stuff LEFT JOIN Occ00001 AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa+15'
     trisQuery = f'SELECT * from stuff'

+ 347 - 0
test_suite/tests_kora_misc/Query_speed/queries_2.py

@@ -0,0 +1,347 @@
+# %%
+import sqlite3
+import pandas as pd
+import time
+
+from decoding.decoding import getVettSpec, db_results_decode, db_encode, isColumnToDecode
+
+# Rifattorizzazione della routine 'findtext', per recuperare i contesti dal DB di Gatto4.
+# Per semplificare, la ricerca principale è limitata alla prima table di occorrenze -- Occ00001
+# Il tutto è eseguito sul DB 'di prova grande' ndg2.gat4, poi MODIFICATO per aggiungere un indice su Periodi.
+
+
+# Il file del DB (copiato in locale)
+dbFile = 'corpus.db'
+
+## First query: Lemmi ('L') o Forme ('F'); ignoro le forme normalizzate per questo esercizio.
+def firstQueryL(joinedLemList):
+    return f"SELECT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE spec LIKE '{joinedLemList}' ORDER BY idlem"
+
+def firstQueryF(joinedFormList):
+    return f"SELECT spec AS forma, nocc AS occ, cod FROM form WHERE spec LIKE {joinedFormList} ORDER BY idfor"
+
+## Second query: recupero dei codici delle forme non lemmatizzate associate ai Lemmi nella lista
+def secondQuery(joinedLemCodes):
+    return f"SELECT DISTINCT lemma as codLemma, forma as codForma FROM pfl WHERE lemma IN ({joinedLemCodes})"
+
+# Dict factory for non-Pandas queries
+def dict_factory(cursor, row):
+    fields = [column[0] for column in cursor.description]
+    return {key: value for key, value in zip(fields, row)}
+
+# VettSpec for decoding
+vettSpec = getVettSpec('decoding/')
+
+
+# La query di base (verificata decentemente veloce) per i contesti; NON trova i LIMITI dei contesti, da sola, ma ha tutti i parametri di base. LIST1 e LIST2 sono liste di codici di Lemmi e Forme rispettivamente, per la ricerca 'base': Lemmi + Forme non lemmatizzate.
+def theMainQuery(LIST1, LIST2):
+    return f'SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore FROM Occ00001 AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod WHERE tab.indlem IN ({LIST1}) OR (tab.indlem = 0 AND tab.cod IN ({LIST2}))'
+
+# Versione solo forme
+def theMainQuery0(LIST1):
+    return f"SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore FROM Occ00001 AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod WHERE tab.cod IN ({LIST1})"
+
+# Versione solo lemmi
+def theMainQuery1(LIST1):
+    return f'SELECT tab.cod, tab.ntx, tab.pitxt, tab.elemlen, tab.mappa, tab.numperiod, tab.links, tab.numorg, intbib.sigla, tab.vol, tab.pag, tab.riga, tab.col, tab.tipostanza, tab.stanza, tab.verso, tab.numbrano, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore FROM Occ00001 AS tab INNER JOIN intbib ON tab.ntx = intbib.ntx INNER JOIN lem ON tab.indlem = lem.cod WHERE tab.indlem IN ({LIST1})'
+
+
+# La mia rifattorizzazione per una singola occorrenza
+def refactor1(LIST1, LIST2):
+
+    mainQueryString = theMainQuery(LIST1, LIST2)
+    createTempTableString = f'CREATE TEMPORARY TABLE stuff AS {mainQueryString}' 
+    startQuery = f'SELECT * from stuff'
+    addQuery1 = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS piniz FROM stuff LEFT JOIN Occ00001 AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa-15'
+    addQuery2 = f'SELECT stuff.ntx, stuff.mappa, tab.pitxt AS pfin FROM stuff LEFT JOIN Occ00001 AS tab ON tab.ntx=stuff.ntx AND tab.mappa=stuff.mappa+15'
+    addQuery3 = f'SELECT stuff.ntx, stuff.numperiod, periodi.piniz AS backup_piniz, periodi.pfin AS backup_pfin FROM stuff, periodi WHERE stuff.ntx = periodi.ntx AND stuff.numperiod = periodi.numperiod'
+
+    # Start communication with DB
+    with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+        connection.cursor().execute(createTempTableString)
+
+        results = pd.read_sql(startQuery, connection)
+        results_add1 = pd.read_sql(addQuery1, connection)
+        results_add2 = pd.read_sql(addQuery2, connection)
+        results_add3 = pd.read_sql(addQuery3, connection)
+
+    results['piniz'] = results_add1['piniz']
+    results['pfin'] = results_add2['pfin']
+    results[['backup_piniz', 'backup_pfin']] = results_add3[['backup_piniz', 'backup_pfin']]
+
+    return results
+
+# %%
+###########
+# PROVA 1
+###########
+
+# Cooccorrenze: ricerca di 'c*'
+str0 = 'c%'
+strEnc0 = db_encode(vettSpec, str0)
+
+queryString0 = firstQueryL(strEnc0)
+
+with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+    connection.row_factory = dict_factory
+    queryReponse = connection.cursor().execute(queryString0)
+    lemsNoPandas0 = queryReponse.fetchall()
+
+lemCodes0 = [res['cod'] for res in lemsNoPandas0]
+lemCodesStr0 = [str(code) for code in lemCodes0]
+
+with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+    pflRes0 = pd.read_sql(secondQuery(','.join(lemCodesStr0)), connection)
+
+formCodes0 = list(pflRes0['codForma'])
+formCodesStr0 = [str(code) for code in formCodes0]
+# %%
+timestamp0 = time.time()
+res = refactor1(','.join(lemCodesStr0), ','.join(formCodesStr0))
+timestamp2 = time.time()
+
+print(timestamp2-timestamp0)
+# %%
+# Ricerca della seconda parola
+str1 = 'prima'
+strEnc1 = db_encode(vettSpec, str1)
+
+queryString1 = firstQueryF(strEnc1)
+
+with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+    connection.row_factory = dict_factory
+    queryReponse = connection.cursor().execute(queryString0)
+    formsNoPandas1 = queryReponse.fetchall()
+
+formCodes1 = [res['cod'] for res in formsNoPandas1]
+formCodesStr1 = [str(code) for code in formCodes1]
+# %%
+timestamp0 = time.time()
+ind = 0
+with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+    mainQueryString = theMainQuery(','.join(lemCodesStr0), ','.join(formCodesStr0))
+
+    otherQueryString = theMainQuery0(','.join(formCodesStr1))
+
+    resTable = 'tempOcc_' + str(ind)
+    connection.cursor().execute(f'CREATE TEMPORARY TABLE {resTable} AS {mainQueryString}')
+    connection.cursor().execute(f'CREATE INDEX aa_{ind} ON {resTable} (ntx, mappa)')
+
+    connection.cursor().execute(f'CREATE TEMPORARY TABLE tempOcc AS {otherQueryString}')
+    connection.cursor().execute(f'CREATE INDEX bb ON tempOcc (ntx, mappa)')
+
+    ind += 1
+    oldTable = resTable
+    resTable = 'tempOcc_' + str(ind)
+    connection.cursor().execute(f'CREATE TEMPORARY TABLE {resTable} AS SELECT tabA.ntx as ntx, tabA.mappa as mappa, tabB.ntx as ntx2, tabB.mappa as mappa2, tabA.sigla, tabA.numorg FROM {oldTable} AS tabA, tempOcc AS tabB WHERE tabA.ntx=tabB.ntx AND tabA.mappa BETWEEN tabB.mappa-10 AND tabB.mappa+10 AND tabA.mappa != tabB.mappa')
+    connection.cursor().execute(f'CREATE INDEX aa_{ind} ON {resTable} (ntx, mappa)')
+    connection.cursor().execute(f'DROP TABLE {oldTable}')
+
+    res = pd.read_sql(f'SELECT * FROM {resTable}', connection)
+
+
+timestamp1 = time.time()
+print(timestamp1 - timestamp0)
+# %%
+timestamp0 = time.time()
+intervallo = 10
+ordinate = 0
+periodo = 0
+with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+    mainQueryString = theMainQuery(','.join(lemCodesStr0), ','.join(formCodesStr0))
+
+    cod = 0
+    otherQueryString = theMainQuery0(','.join(formCodesStr1))
+
+    listatesti = pd.read_sql(mainQueryString, connection)
+
+    textlist = pd.read_sql(otherQueryString, connection)
+
+timestamp1 = time.time()
+print(timestamp1 - timestamp0)
+
+# %%
+###########
+# PROVA 2
+###########
+
+# The find bib search -- va runnata a seguito della Prova 1 perché usa la variabile 'res'
+
+# A. Ridefinisco la stringa di ricerca
+def reducedQueryString(queryData):
+
+    type = queryData['queryType']
+
+    if type=='bib':
+        try:
+            row = queryData['row']
+            sigla = row['sigla']
+        except KeyError as err:
+            raise KeyError('Missing required data for query type ' + type + ': ' + str(err))
+        return f"SELECT [Anno iniziale], [Anno finale], [Data codificata], [Titolo Abbreviato], [Autore], [Titolo], [Curatore], [Data descrittiva], [Area generica], [Area specifica], [Genere], [Forma], [Tipo], IQ FROM datibib WHERE Sigla='{sigla}'"
+    
+    #################
+    elif type=='bibAlt':
+        try:
+            siglaSet = queryData['siglaSet']
+        except KeyError as err:
+            raise KeyError('Missing required data for query type ' + type + ': ' + str(err))
+        siglaStr = "'" + "','".join(siglaSet) + "'"
+        return f"SELECT Sigla, [Anno iniziale], [Anno finale], [Data codificata], [Titolo Abbreviato], [Autore], [Titolo], [Curatore], [Data descrittiva], [Area generica], [Area specifica], [Genere], [Forma], [Tipo], IQ FROM datibib WHERE Sigla IN ({siglaStr})"
+    
+    #################
+    elif type=='rif':
+        try:
+            row = queryData['row']
+            numorg = row['numorg']
+            ntx = row['ntx']
+        except:
+            return None
+        return f"SELECT head AS Rif_organico, full AS Rif_completo FROM org WHERE (indice='{numorg}' AND ntx='{ntx}')"
+    
+    return ""
+# %%
+
+# B. La versione vecchia ha una velocità non soddisfacente -- non la ripeto qui. Ne provo direttamente una nuova!
+
+timestamp0 = time.time()
+
+siglaList = list(res['sigla'])
+siglaSet = set(siglaList)
+queryData = {'queryType': 'bibAlt', 'siglaSet': siglaList}
+queryStringBib = reducedQueryString(queryData)
+dbFileBib='bibliografia/BiblioTLIO.db'
+with sqlite3.connect(f"file:{dbFileBib}?mode=ro", uri=True) as connection:    
+    bib = pd.read_sql(queryStringBib, connection)
+
+bib = bib.set_index('Sigla')
+
+timestamp1 = time.time()
+
+
+# Provo anche due diverse versioni di riassegnazione-Pandas dei risultati!
+annoiniz = [bib.loc[sigla, 'Anno iniziale'] for sigla in siglaList]
+annofin = [bib.loc[sigla, 'Anno finale'] for sigla in siglaList]
+datacod = [bib.loc[sigla, 'Data codificata'] for sigla in siglaList]
+datadesc = [bib.loc[sigla, 'Data descrittiva'] for sigla in siglaList]
+titoloabb = [bib.loc[sigla, 'Titolo Abbreviato'] for sigla in siglaList]
+autore = [bib.loc[sigla, 'Autore'] for sigla in siglaList]
+titolo = [bib.loc[sigla, 'Titolo'] for sigla in siglaList]
+curatore = [bib.loc[sigla, 'Curatore'] for sigla in siglaList]
+areagen = [bib.loc[sigla, 'Area generica'] for sigla in siglaList]
+areaspec = [bib.loc[sigla, 'Area specifica'] for sigla in siglaList]
+genere = [bib.loc[sigla, 'Genere'] for sigla in siglaList]
+forma = [bib.loc[sigla, 'Forma'] for sigla in siglaList]
+tipo = [bib.loc[sigla, 'Tipo'] for sigla in siglaList]
+iq = [bib.loc[sigla, 'IQ'] for sigla in siglaList]
+
+timestamp2 = time.time()
+
+
+part = {sigla: bib.loc[sigla].to_dict() for sigla in siglaSet}
+
+out = [part[sigla] for sigla in siglaList]
+
+annoiniz = [el['Anno iniziale'] for el in out]
+annofin = [el['Anno finale'] for el in out]
+datacod = [el['Data codificata'] for el in out]
+datadesc = [el['Data descrittiva'] for el in out]
+titoloabb = [el['Titolo Abbreviato'] for el in out]
+autore = [el['Autore'] for el in out]
+titolo = [el['Titolo'] for el in out]
+curatore = [el['Curatore'] for el in out]
+areagen = [el['Area generica'] for el in out]
+areaspec = [el['Area specifica'] for el in out]
+genere = [el['Genere'] for el in out]
+forma = [el['Forma'] for el in out]
+tipo = [el['Tipo'] for el in out]
+iq = [el['IQ'] for el in out]
+
+
+timestamp3 = time.time()
+print(timestamp1 - timestamp0)
+print(timestamp2 - timestamp0)
+print(timestamp3 - timestamp0)
+# %%
+###########
+# PROVA 3
+###########
+
+# Better decoding! -- Questa è indipendente dalle Prove 2 e 3 -- ha bisogno solo del run della prima cella.
+
+# A. Un warm-up: un'occhiata ai caratteri in VettSpec
+print('The first one:', chr(int(vettSpec[0]['unicode'], 16)) )
+print('... is a newline')
+
+for index, entry in enumerate(vettSpec):
+    try:
+        print(index+1, chr(int(entry['intcode'])), chr(int(entry['unicode'], 16)))
+    except Exception as err:
+        print(index+1, err)
+        if(index>0):
+            break
+
+print('Total:', len(vettSpec))
+# %%
+# B. Riefinisco l'encoding/decoding usando 2 lookups dedicati
+timestamp0 = time.time()
+vettDictDec = {}
+vettDictEnc = {}
+for index, entry in enumerate(vettSpec):
+    try:
+        vettDictDec[chr(int(entry['intcode']))] = chr(int(entry['unicode'], 16))
+        vettDictEnc[chr(int(entry['unicode'], 16))] = chr(int(entry['intcode']))
+    except Exception as err:
+        print(index+1, err)
+        if(index>0):
+            break
+
+def db_decodeB(string):
+    return ''.join([vettDictDec[char] for char in string])
+
+def db_results_decodeB(result):
+    keysToTest = [key for key in result[0].keys() if isColumnToDecode(key)]
+    for row in result:
+        for key in keysToTest:
+            row[key] = db_decodeB(row[key])
+    return result
+
+
+timestamp1 = time.time()
+print(timestamp1 - timestamp0)
+# %%
+# Rilancio la ricerca di 'c*' paragonando i decoding
+timestamp0 = time.time()
+str0 = 'c%'
+strEnc0 = db_encode(vettSpec, str0)
+
+queryString0 = firstQueryL(strEnc0)
+
+with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+    connection.row_factory = dict_factory
+    queryReponse = connection.cursor().execute(queryString0)
+    lemsNoPandas0 = queryReponse.fetchall()
+db_results_decode(lemsNoPandas0, vettSpec)
+
+timestamp1 = time.time()
+print(timestamp1 - timestamp0)
+# %%
+timestamp0 = time.time()
+str0 = 'c%'
+strEnc0 = db_encode(vettSpec, str0)
+
+queryString0 = firstQueryL(strEnc0)
+
+with sqlite3.connect(f"file:{dbFile}?mode=ro", uri=True) as connection:
+    connection.row_factory = dict_factory
+    queryReponse = connection.cursor().execute(queryString0)
+    lemsNoPandas0 = queryReponse.fetchall()
+
+db_results_decodeB(lemsNoPandas0)
+
+timestamp1 = time.time()
+print(timestamp1 - timestamp0)
+# IT WORKZ!
+
+print(lemsNoPandas0)
+# %%