Just 3 days ago as of this writing, the punkt_tab data module became a requirement of nltk 3.8.2 due to a security issue, so STATS TEXTANALYSIS requires an update to download that module. nltk also suffers from the numpy 2.0 problem and requires an older version of numpy.
So do the following.
1. Install STATS PACKAGE INSTALL via Extensions > Extension Hub if you don't already have it.
2. Use it (on the Extensions menu) to install numpy version 1.26.4
3. Open a syntax window in SPSS and run the following code (select all these
lines and use Run > All)
begin program python.
import nltk
nltk.download()
end program.
This will open a window listing the available data modules for NLTK.
It tends to come up behind the other windows, so look around for it :-(
4. Click on the All menu at the top of that window. Find punkt_tab and click to install it.
5. Close that window, and you should be good to go.
We will get STATS_TEXTANALYSIS updated to include this new module in the list of automatically installed packages, but the interactive install, which only has to be done once, will get this set up faster.
I have attached a screenshot showing some of the basic output from TEXTANALYSIS applied to an election survey.
--
Original Message:
Sent: 8/21/2024 11:07:00 AM
From: Kyle Shaw
Subject: RE: SPSS Stats TEXTANALYSIS Python extension
This is the error message I am getting. I also tried uninstalling SPSS and reinstalling everything and same issue. I also tried running that script in the syntax editor and nothing happened.
------------------------------
Kyle Shaw
------------------------------