Jose Lema
unread,May 27, 2024, 10:40:30 PM5/27/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Suite of automatic linguistic analysis tools
Hi there,
I have been using TAALED, and when opening the spreadsheet (i.e., .csv) outcomes file, I encountered an error ("number stored as text") in most columns and rows. I tried to fix it using Excel, but some data were still presented as text and/or numbers.
Thanks to the developers who shared the Python code, I made some tweaks to it, and now the outcomes seem to work better in Excel. All data now appears stored as numbers throughout.
Here are some of the changes made to the original code:
**Lines 434-437**:
```python
# Directly load the model without set_data_path
import spacy
nlp = spacy.load("en_core_web_sm")
```
**Lines 973-981**:
```python
out_list = []
for vars in index_list:
if isinstance(vars, float):
out_list.append("{:.2f}".format(vars))
else:
out_list.append(str(vars))
csvwriter.writerow(out_list)
outf.close()
```
Please find attached the whole corrected code.
I am more than happy to hear from you if found the same issues.
Jose :)