Subscribe Bookmark RSS Feed

Need help saving Term Tables in Text Explorer with by variable (81 tables)

kritterb

Occasional Contributor

Joined:

Jul 26, 2017

I'm doing text analysis on abstracts by program area. I would like to save the Term and Phrase Lists output (Save Term Table) for each of the 81 categories of my By variable (Program).

 

I know how to do this manually, but I would love to write some kind of macro to reference these and pull them to a table that is saved automatically and can be exported to SAS base. I am familiar with writing macros in SAS, but I am new to JSL script and JMP in general. I think I have found guidance on how to get a collection of tables from JMP to SAS, but I have no idea how to pull the tables from within the Text Explorer report automatically.

 

 

Text Explorer(
	Text Columns( :Abstract ),
	Set Regex(
		Library( "Domain names" ),
		Library( "Money" ),
		Library( "Words" ),
		Library( "HTML Link Grabber" ),
		Library( "\[Bang!!! cleaner]\" ),
		Library( "Time" ),
		Library( "Numbers" )
	),
	Show Term List( 1 ),
	Show Phrase List( 1 ),
	Show Word Cloud( 1 ),
	Layout( "Ordered" ),
	Stemming( "Stem for Combining" ),
	Customize Regex( 0 ),
	Language( "English" ),
	By( :Program )
)

Much appreciation for any guidance on this issue.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales

Staff

Joined:

Mar 21, 2013

Solution

right-click on one of the columns in one of the term and phrase list outputs, pick Make Combined Data Table. I think that will make the table you need, with a column Program for your by variable and columns Term and Count from either the term list (or Phrase and Count from the phrase list). You can probably script this too, if you need to repeat the process more than a few times. Something like

te=Text Explorer(
	Text Columns( name ),
	Set Regex(
		Library( "Domain names" ),
		Library( "Money" ),
		Library( "Words" ),
		Library( "HTML Link Grabber" ),
		Library( "\[Bang!!! cleaner]\" ),
		Library( "Time" ),
		Library( "Numbers" )
	),
	Show Term List( 1 ),
	Show Phrase List( 1 ),
	Show Word Cloud( 1 ),
	Layout( "Ordered" ),
	Stemming( "Stem for Combining" ),
	Customize Regex( 0 ),
	Language( "English" ),
	By( :age )
);
firstreport = report(te[1]);
outline = firstreport[outlinebox("Term and Phrase Lists")];
strcolumn = outline[stringcolbox(1)];
strcolumn<<makecombineddatatable;

I used big class.jmp, so the names are changed.

I also used the ShowTree Structure command (from the outline node's blue triangle->Edit menu) to discover the shape and names of the display tree I used in that JSL. 

Craige
2 REPLIES
Craige_Hales

Staff

Joined:

Mar 21, 2013

Solution

right-click on one of the columns in one of the term and phrase list outputs, pick Make Combined Data Table. I think that will make the table you need, with a column Program for your by variable and columns Term and Count from either the term list (or Phrase and Count from the phrase list). You can probably script this too, if you need to repeat the process more than a few times. Something like

te=Text Explorer(
	Text Columns( name ),
	Set Regex(
		Library( "Domain names" ),
		Library( "Money" ),
		Library( "Words" ),
		Library( "HTML Link Grabber" ),
		Library( "\[Bang!!! cleaner]\" ),
		Library( "Time" ),
		Library( "Numbers" )
	),
	Show Term List( 1 ),
	Show Phrase List( 1 ),
	Show Word Cloud( 1 ),
	Layout( "Ordered" ),
	Stemming( "Stem for Combining" ),
	Customize Regex( 0 ),
	Language( "English" ),
	By( :age )
);
firstreport = report(te[1]);
outline = firstreport[outlinebox("Term and Phrase Lists")];
strcolumn = outline[stringcolbox(1)];
strcolumn<<makecombineddatatable;

I used big class.jmp, so the names are changed.

I also used the ShowTree Structure command (from the outline node's blue triangle->Edit menu) to discover the shape and names of the display tree I used in that JSL. 

Craige
kritterb

Occasional Contributor

Joined:

Jul 26, 2017

Thank you. I have no idea how I missed that option earlier, but the Make Combined Data Table was exactly what I needed.