Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
| Entrambe le parti precedenti la revisione Revisione precedente Prossima revisione | Revisione precedente | ||
|
distribuzione_delle_frequenze [2021/06/02 20:05] admin |
distribuzione_delle_frequenze [2024/07/07 18:48] (versione attuale) admin |
||
|---|---|---|---|
| Linea 31: | Linea 31: | ||
| import re | import re | ||
| import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
| - | with open(' | + | f = open(' |
| + | testo = f.read() | ||
| testo=testo[1704: | testo=testo[1704: | ||
| + | |||
| + | # istruzioni per l' | ||
| testo=re.sub("'","' | testo=re.sub("'","' | ||
| testo=re.sub(" | testo=re.sub(" | ||
| testo=testo.lower() | testo=testo.lower() | ||
| + | # fine istruzioni per l' | ||
| + | |||
| testo=testo.split() | testo=testo.split() | ||
| fd=[testo.count(i) for i in set(testo)] | fd=[testo.count(i) for i in set(testo)] | ||
| Linea 60: | Linea 65: | ||
| <code python frequenze_etichettate_pinocchio.py> | <code python frequenze_etichettate_pinocchio.py> | ||
| + | import re | ||
| import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
| - | with open(' | + | f = open(' |
| + | testo = f.read() | ||
| + | testo=testo[1704: | ||
| + | # istruzioni per l' | ||
| testo=re.sub("'","' | testo=re.sub("'","' | ||
| + | testo=re.sub(' | ||
| testo=testo.lower() | testo=testo.lower() | ||
| - | # altre istruzioni per l' | + | # fine istruzioni per l' |
| - | # ... | + | |
| testo=testo.split() | testo=testo.split() | ||
| Linea 77: | Linea 86: | ||
| plt.show() | plt.show() | ||
| </ | </ | ||
| + | |||
| + | {{:: | ||