simple_query_test_pandas.py 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. # Questo NON è parte del codice: è un notebook Jupyter (nell'implementazione di VSCode)
  2. # che ho usato per fare dei test!
  3. # %%
  4. # Test code using Jupyter
  5. # %%
  6. import sqlite3
  7. import re
  8. import pandas as pd
  9. import dtale
  10. import unicodedata
  11. import sys
  12. #%% funzione combinazioni <> è chiamata da interpreter
  13. def combinations(s):
  14. result = []
  15. start = s.find("<")
  16. end = s.find(">")
  17. if start == -1 or end == -1:
  18. return [s]
  19. items = s[start + 1:end].split(",")
  20. for item in items:
  21. result.extend([s[:start] + item + rest for rest in combinations(s[end + 1:])])
  22. return result
  23. #%% funzione interprete, sta alla base di ogni ricerca
  24. def interpreter (data):
  25. clean_data= "'"+data.replace("*", "%").replace("?", "_").replace(" ","").replace("'", "''").replace("’", "''") +"'"
  26. return combinations(clean_data)
  27. # %% funzione iniziale raddoppiata, è chiamata dalle funzioni di ricerca con iniziale raddoppiata
  28. def inizialeraddoppiata (data):
  29. doubleddata=[]
  30. for el in data:
  31. if el[1] != "%" and "_":
  32. doubleddata = doubleddata + ["'"+ el[1] + el[1:]]
  33. return doubleddata
  34. # %% funzione normalizza stringa (ricerca espansa), è chiamata dalle funzioni di ricerca espansa
  35. def normalize(stringa):
  36. return unicodedata.normalize('NFKD', stringa).encode('ASCII', 'ignore').decode('utf-8')
  37. def list_normalize(lista):
  38. return [normalize(stringa) for stringa in lista]
  39. # %% funzione counter, può essere chiamata sui risultati delle ricerche per visualizzare le forme/lemmi e il numero di occorrenze individuate
  40. def counter (results):
  41. if not results.empty:
  42. trovati= len(results.index)
  43. occorrenze= results['occ'].sum()
  44. return ("Trovati=" + str(trovati) + " Occorrenze=" + str(occorrenze))
  45. #%% Funzione ricerca per forme
  46. def ricercaforme (entries, path, espansa, raddoppiata):
  47. if espansa == 0:
  48. data=" OR spec LIKE ".join(entries)
  49. doubleddata=" OR spec LIKE ".join(inizialeraddoppiata(entries))
  50. if raddoppiata == 1:
  51. theSimpleQuery = f"SELECT spec AS forma, nocc AS occ, cod FROM form WHERE spec LIKE {data} OR spec LIKE {doubleddata} ORDER BY idfor"
  52. else:
  53. theSimpleQuery = f"SELECT spec AS forma, nocc AS occ, cod FROM form WHERE spec LIKE {data} ORDER BY idfor"
  54. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  55. answer_table = pd.read_sql(theSimpleQuery, con)
  56. if answer_table.empty:
  57. print ("Nessun risultato")
  58. sys.exit(1)
  59. else:
  60. return answer_table
  61. else:
  62. data=" OR spec LIKE ".join(entries)
  63. data_norm=" OR norm LIKE ".join(list_normalize(entries))
  64. doubleddata_norm=" OR norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  65. doubleddata=" OR spec LIKE ".join(inizialeraddoppiata(entries))
  66. if raddoppiata == 1:
  67. theSimpleQuery = f"SELECT DISTINCT spec AS forma, nocc AS occ, cod FROM form WHERE (spec LIKE {data}) OR (norm LIKE {data_norm}) OR (spec LIKE {doubleddata}) OR (norm LIKE {doubleddata_norm}) ORDER BY idfor"
  68. else:
  69. theSimpleQuery = f"SELECT DISTINCT spec AS forma, nocc AS occ, cod FROM form WHERE (spec LIKE {data}) OR (norm LIKE {data_norm}) ORDER BY idfor"
  70. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  71. answer_table = pd.read_sql(theSimpleQuery, con)
  72. if answer_table.empty:
  73. print ("Nessun risultato")
  74. sys.exit(1)
  75. else:
  76. return answer_table
  77. #deprecated
  78. """if espansa == 0:
  79. data=" OR spec LIKE ".join(entries)
  80. doubleddata=" OR spec LIKE ".join(inizialeraddoppiata(entries))
  81. if raddoppiata == 1:
  82. theSimpleQuery = "SELECT spec AS forma, nocc AS occ, cod FROM form WHERE spec LIKE " + data + " OR spec LIKE " + doubleddata + "ORDER BY idfor"
  83. else:
  84. theSimpleQuery = "SELECT spec AS forma, nocc AS occ, cod FROM form WHERE spec LIKE " + data + " ORDER BY idfor"
  85. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  86. answer_table = pd.read_sql(theSimpleQuery, con)
  87. return answer_table
  88. else:
  89. data=" OR spec LIKE ".join(entries)
  90. data_norm=" OR norm LIKE ".join(list_normalize(entries))
  91. doubleddata_norm=" OR norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  92. doubleddata=" OR spec LIKE ".join(inizialeraddoppiata(entries))
  93. if raddoppiata == 1:
  94. theSimpleQuery = "SELECT DISTINCT spec AS forma, nocc AS occ, cod FROM form WHERE (spec LIKE " + data +") OR (norm LIKE " + data_norm + ") OR (spec LIKE " + doubleddata + ") OR (norm LIKE " + doubleddata_norm + ")" + " ORDER BY idfor"
  95. else:
  96. theSimpleQuery = "SELECT DISTINCT spec AS forma, nocc AS occ, cod FROM form WHERE (spec LIKE " + data +") OR (norm LIKE " + data_norm + ")" + " ORDER BY idfor"
  97. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  98. answer_table = pd.read_sql(theSimpleQuery, con)
  99. return answer_table"""
  100. #%% Funzione ricerca per lemmi
  101. def ricercalemmi (entries, path, espansa, raddoppiata):
  102. if espansa == 0:
  103. data = " OR spec LIKE ".join(entries)
  104. doubleddata = " OR spec LIKE ".join(inizialeraddoppiata(entries))
  105. if raddoppiata == 1:
  106. theSimpleQuery = f"SELECT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE spec LIKE {data} OR spec LIKE {doubleddata} ORDER BY idlem"
  107. else:
  108. theSimpleQuery = f"SELECT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE spec LIKE {data} ORDER BY idlem"
  109. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  110. answer_table = pd.read_sql(theSimpleQuery, con)
  111. if answer_table.empty:
  112. print ("Nessun risultato")
  113. sys.exit(1)
  114. else:
  115. return answer_table
  116. else:
  117. data = " OR spec LIKE ".join(entries)
  118. data_norm = " OR norm LIKE ".join(list_normalize(entries))
  119. doubleddata_norm = " OR norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  120. doubleddata = " OR spec LIKE ".join(inizialeraddoppiata(entries))
  121. if raddoppiata == 1:
  122. theSimpleQuery = f"SELECT DISTINCT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE (spec LIKE {data}) OR (norm LIKE {data_norm}) OR (spec LIKE {doubleddata}) OR (norm LIKE {doubleddata_norm}) ORDER BY idlem"
  123. else:
  124. theSimpleQuery = f"SELECT DISTINCT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE (spec LIKE {data}) OR (norm LIKE {data_norm}) ORDER BY idlem"
  125. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  126. answer_table = pd.read_sql(theSimpleQuery, con)
  127. if answer_table.empty:
  128. print ("Nessun risultato")
  129. sys.exit(1)
  130. else:
  131. return answer_table
  132. #deprecated
  133. """if espansa == 0:
  134. data=" OR spec LIKE ".join(entries)
  135. doubleddata=" OR spec LIKE ".join(inizialeraddoppiata(entries))
  136. if raddoppiata == 1:
  137. theSimpleQuery = "SELECT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE spec LIKE " + data + " OR spec LIKE " + doubleddata + "ORDER BY idlem"
  138. else:
  139. theSimpleQuery = "SELECT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE spec LIKE " + data + " ORDER BY idlem"
  140. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  141. answer_table = pd.read_sql(theSimpleQuery, con)
  142. return answer_table
  143. else:
  144. data=" OR spec LIKE ".join(entries)
  145. data_norm=" OR norm LIKE ".join(list_normalize(entries))
  146. doubleddata_norm=" OR norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  147. doubleddata=" OR spec LIKE ".join(inizialeraddoppiata(entries))
  148. if raddoppiata == 1:
  149. theSimpleQuery = "SELECT DISTINCT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE (spec LIKE " + data +") OR (norm LIKE " + data_norm + ") OR (spec LIKE " + doubleddata + ") OR (norm LIKE " + doubleddata_norm + ")" + " ORDER BY idlem"
  150. else:
  151. theSimpleQuery = "SELECT DISTINCT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE (spec LIKE " + data +") OR (norm LIKE " + data_norm + ")" + " ORDER BY idlem"
  152. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  153. answer_table = pd.read_sql(theSimpleQuery, con)
  154. return answer_table"""
  155. #%% Funzione ricerca di forme con vista lemmi
  156. def ricercaformelemmi (entries, path, espansa, raddoppiata):
  157. if espansa == 0:
  158. data = " OR form.spec LIKE ".join(entries)
  159. doubleddata = " OR form.spec LIKE ".join(inizialeraddoppiata(entries))
  160. if raddoppiata == 1:
  161. theSimpleQuery = f"SELECT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE form.spec LIKE {data} OR form.spec LIKE {doubleddata} ORDER BY form.idfor"
  162. else:
  163. theSimpleQuery = f"SELECT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE form.spec LIKE {data} ORDER BY form.idfor"
  164. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  165. answer_table = pd.read_sql(theSimpleQuery, con)
  166. if answer_table.empty:
  167. print ("Nessun risultato")
  168. sys.exit(1)
  169. else:
  170. return answer_table
  171. else:
  172. data = " OR form.spec LIKE ".join(entries)
  173. data_norm = " OR form.norm LIKE ".join(list_normalize(entries))
  174. doubleddata_norm = " OR form.norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  175. doubleddata = " OR form.spec LIKE ".join(inizialeraddoppiata(entries))
  176. if raddoppiata == 1:
  177. theSimpleQuery = f"SELECT DISTINCT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (form.spec LIKE {data}) OR (form.norm LIKE {data_norm}) OR (form.spec LIKE {doubleddata}) OR (form.norm LIKE {doubleddata_norm}) ORDER BY form.idfor"
  178. else:
  179. theSimpleQuery = f"SELECT DISTINCT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (form.spec LIKE {data}) OR (form.norm LIKE {data_norm}) ORDER BY form.idfor"
  180. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  181. answer_table = pd.read_sql(theSimpleQuery, con)
  182. if answer_table.empty:
  183. print ("Nessun risultato")
  184. sys.exit(1)
  185. else:
  186. return answer_table
  187. #deprecated
  188. """if espansa == 0:
  189. data=" OR form.spec LIKE ".join(entries)
  190. doubleddata=" OR form.spec LIKE ".join(inizialeraddoppiata(entries))
  191. if raddoppiata == 1:
  192. theSimpleQuery = "SELECT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE form.spec LIKE " + data + " OR form.spec LIKE " + doubleddata + " ORDER BY form.idfor"
  193. else:
  194. theSimpleQuery = "SELECT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE form.spec LIKE " + data + " ORDER BY form.idfor"
  195. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  196. answer_table = pd.read_sql(theSimpleQuery, con)
  197. return answer_table
  198. else:
  199. data=" OR form.spec LIKE ".join(entries)
  200. data_norm=" OR form.norm LIKE ".join(list_normalize(entries))
  201. doubleddata_norm=" OR form.norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  202. doubleddata=" OR form.spec LIKE ".join(inizialeraddoppiata(entries))
  203. if raddoppiata == 1:
  204. theSimpleQuery = "SELECT DISTINCT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (form.spec LIKE " + data +") OR (form.norm LIKE " + data_norm + ") OR (form.spec LIKE " + doubleddata + ") OR (form.norm LIKE " + doubleddata_norm + ")" + " ORDER BY form.idfor"
  205. else:
  206. theSimpleQuery = "SELECT DISTINCT form.spec AS forma, lem.spec AS lemma, lem.cat AS cat_gr, lem.omo AS disambiguatore, pfl.nocc AS occ, form.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (form.spec LIKE " + data +") OR (form.norm LIKE " + data_norm + ")" + " ORDER BY form.idfor"
  207. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  208. answer_table = pd.read_sql(theSimpleQuery, con)
  209. return answer_table"""
  210. #%% Funzione ricerca lemmi con vista forme
  211. def ricercalemmiforme (entries, path, espansa, raddoppiata):
  212. if espansa == 0:
  213. data = " OR form.spec LIKE ".join(entries)
  214. doubleddata = " OR form.spec LIKE ".join(inizialeraddoppiata(entries))
  215. if raddoppiata == 1:
  216. theSimpleQuery = f"SELECT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma, lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod != 0 AND lem.cod = pfl.lemma WHERE lem.spec LIKE {data} OR form.spec LIKE {doubleddata} ORDER BY lem.idlem"
  217. else:
  218. theSimpleQuery = f"SELECT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma, lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod != 0 AND lem.cod = pfl.lemma WHERE lem.spec LIKE {data} ORDER BY lem.idlem"
  219. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  220. answer_table = pd.read_sql(theSimpleQuery, con)
  221. if answer_table.empty:
  222. print ("Nessun risultato")
  223. sys.exit(1)
  224. else:
  225. return answer_table
  226. else:
  227. data = " OR lem.spec LIKE ".join(entries)
  228. data_norm = " OR lem.norm LIKE ".join(list_normalize(entries))
  229. doubleddata_norm = " OR lem.norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  230. doubleddata = " OR lem.spec LIKE ".join(inizialeraddoppiata(entries))
  231. if raddoppiata == 1:
  232. theSimpleQuery = f"SELECT DISTINCT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma, lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (lem.spec LIKE {data}) OR (lem.norm LIKE {data_norm}) OR (lem.spec LIKE {doubleddata}) OR (lem.norm LIKE {doubleddata_norm}) ORDER BY lem.idlem"
  233. else:
  234. theSimpleQuery = f"SELECT DISTINCT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma, lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (lem.spec LIKE {data}) OR (lem.norm LIKE {data_norm}) ORDER BY lem.idlem"
  235. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  236. answer_table = pd.read_sql(theSimpleQuery, con)
  237. if answer_table.empty:
  238. print ("Nessun risultato")
  239. sys.exit(1)
  240. else:
  241. return answer_table
  242. #deprecated
  243. """if espansa == 0:
  244. data=" OR form.spec LIKE ".join(entries)
  245. doubleddata=" OR form.spec LIKE ".join(inizialeraddoppiata(entries))
  246. if raddoppiata == 1:
  247. theSimpleQuery = "SELECT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma, lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod != 0 AND lem.cod = pfl.lemma WHERE lem.spec LIKE " + data + " OR form.spec LIKE " + doubleddata + " ORDER BY lem.idlem"
  248. else:
  249. theSimpleQuery = "SELECT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma,lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod != 0 AND lem.cod = pfl.lemma WHERE lem.spec LIKE " + data + " ORDER BY lem.idlem"
  250. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  251. answer_table = pd.read_sql(theSimpleQuery, con)
  252. return answer_table
  253. else:
  254. data=" OR lem.spec LIKE ".join(entries)
  255. data_norm=" OR lem.norm LIKE ".join(list_normalize(entries))
  256. doubleddata_norm=" OR lem.norm LIKE ".join(list_normalize(inizialeraddoppiata(entries)))
  257. doubleddata=" OR lem.spec LIKE ".join(inizialeraddoppiata(entries))
  258. if raddoppiata == 1:
  259. theSimpleQuery = "SELECT DISTINCT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma, lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (lem.spec LIKE " + data +") OR (lem.norm LIKE " + data_norm + ") OR (lem.spec LIKE " + doubleddata + ") OR (lem.norm LIKE " + doubleddata_norm + ")" + " ORDER BY lem.idlem"
  260. else:
  261. theSimpleQuery = "SELECT DISTINCT lem.spec AS lemma, lem.cat AS cat_gr, form.spec AS forma, lem.omo AS disambiguatore, pfl.nocc AS occ, lem.cod FROM pfl INNER JOIN form ON form.cod = pfl.forma INNER JOIN lem ON lem.cod = pfl.lemma WHERE (lem.spec LIKE " + data +") OR (lem.norm LIKE " + data_norm + ")" + " ORDER BY lem.idlem"
  262. con = sqlite3.connect("file:" + path + "/db/test1.db" + "?mode=ro", uri=True)
  263. answer_table = pd.read_sql(theSimpleQuery, con)
  264. return answer_table"""
  265. # %% Ricerca per categorie grammaticali
  266. def ricercacatgr (entry, path):
  267. theSimpleQuery = f"SELECT spec AS lemma, cat AS cat_gr, omo AS disambiguatore, nocc AS occ, cod FROM lem WHERE cat = '{entry}' ORDER BY idlem"
  268. con = sqlite3.connect(f"file:{path}/test1.db?mode=ro", uri=True)
  269. answer_table = pd.read_sql(theSimpleQuery, con)
  270. if answer_table.empty:
  271. print ("Nessun risultato")
  272. sys.exit(1)
  273. else:
  274. return answer_table
  275. #%%
  276. path = "/Users/leonardocanova/Library/CloudStorage/OneDrive-ConsiglioNazionaledelleRicerche/TIGRO/Ricerche/db/first_db"
  277. entry = "filius"
  278. #df=ricercacatgr(entry, path)
  279. df=ricercaforme(interpreter(entry), path, 0, 0)
  280. dtale.show(df)
  281. # %%