Hi,
I was trying to control stop words in text explorer using the folllowing example script.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj << Add Stopwords( {"use", "feel", "like"} );
obj << Add Stopword Exceptions({"use", "feel", "like"});
obj << Add Stopwords( {"use", "feel", "like"} );
After setting the stopword exceptions, I can't add the same stop words again in the text explorer. And those stop words are show in both Local and Local exceptions. I was expecting setting the a word expection will delete the local stop word automatically.
Overall, I would like to remvoe the stopwords/stopword exceptions using JMP scriping. Any ideas are appriciated.
Many thanks in advance.
Thanks for the clarification. In your case, I would re-launch Text Explorer in each iteration.
Why would you add a stop word and then add an exception for the same word?
You may add stop words to any of the scopes (except Built-in). JMP will automatically remove these words from the Term and Phrase lists. You may also add exceptions and JMP will not automatically remove these words from the same lists. The behavior you observed is consistent and expected.
So, to answer your question, do not add exceptions for words if you want to stop those words. The Text Explorer user interface is designed to facilitate interactive exploration. You can add or remove words from any scope or exception. The scripting interface is designed to apply previous decisions (stopping, recoding, and so on) as a convenience when working with another corpus of similar documents so as not to have to repeat all the work interactively.
Hi Mark,
Thanks for your reply. However, I was trying to remove those stop words I added using scripting instead of adding and making exceptions at the same time. Adding exceptions is just one of the methods I tried to remove stop word but it is not I will do in analysis.
The scenario is that I have different sets of stop words dictionary for the same analysis, so it is convenient for me to do the following steps (add stopword set 1 -> remove stopword set 1 -> add sopwords set 2-> remove stopword set 2 .... and so on) in a loop. When the number of of words of each set goes large, it is time consuming to do it manually. That was the reason why I need to control the stop words using JSL.
Sorry for the confusion.
Thanks for the clarification. In your case, I would re-launch Text Explorer in each iteration.