cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Tzu-Chun
Level III

Add/Remove Stop words in Text Explorer

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.

Capture.JPG

 

Overall, I would like to remvoe the stopwords/stopword exceptions using JMP scriping. Any ideas are appriciated.

 

Many thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Add/Remove Stop words in Text Explorer

Thanks for the clarification. In your case, I would re-launch Text Explorer in each iteration.

View solution in original post

3 REPLIES 3

Re: Add/Remove Stop words in Text Explorer

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.

Tzu-Chun
Level III

Re: Add/Remove Stop words in Text Explorer

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.  

Re: Add/Remove Stop words in Text Explorer

Thanks for the clarification. In your case, I would re-launch Text Explorer in each iteration.