cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
sm3001
Level I

Error during stemming in text explorer: Inconsistent Recodes in access or evaluation of 'List'

Hello Community!

 

I'm trying to recode the stemming in text explorer based on a fixed dictionary of words and I'm getting this error "Inconsistent Recodes in access or evaluation of List". This is my code:

 

obj = dt << Text Explorer(
	Text Columns( :col1)
);
obj << Stemming("Stem for Combining");
obj << Add Recodes(
	{{"attractive", "Attract"},{"unattractive", "Attract"},{"attract", "Attract"},{"ugly", "Attract"},{"attraction", "Attract"},{"attracting", "Attract"}});

I'm assuming this error happens because "col1" column might not actually have some of these words to begin with. If yes, I cannot remove every word from this script that is absent because: 1. The recoding list is a lot larger than my example provided here and it would be very tedious. 2. This is a fixed recoding dictionary to be used with a lot of other columns so there will always be words that are absent in some.

 

Is there any solution to this? Or is there a simpler way to stem words based on this dictionary?

 

Thanks in advance!

0 REPLIES 0