Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Document Term Matrix in Text Miner

Reply
Contributor
Posts: 40

Document Term Matrix in Text Miner

I want to get the Document Term matrix. The following link explains how to get it using the SAS Text Miner Node but the node is not available in Text Miner 5.1

https://communities.sas.com/thread/9183?start=0&tstart=0

Can someone help me with how to get the matrix in TM 5.1?

Thank you.

Ravi

SAS Employee
Posts: 8

Re: Document Term Matrix in Text Miner

[ Edited ]

Since SAS Text Miner has incorporated many changes and enhancements after version 5.1, the following response is tailored towards the newer release (version 12.1 and after.)

 

You can use the attached SAS code in a SAS Code node after a Text Filter node to create a document-by-term data set. 

 

Here are the steps:

  1. Create a new SAS Code node and connect it after a Text Filter node.
  2. Open the Code Editor window of the SAS Code node.
  3. Enter the SAS code above in the Training Code section.
  4. Save the code and then exit from the Code Editor window.
  5. Run the SAS Code node.
  6. Once the SAS Code node runs successfully, the  textfilter<n>_termbydocmatrix data set can be found in the corresponding Enterprise Miner project Workspaces folder.  

Hope this helps!

 

Ann

Ask a Question
Discussion stats
  • 1 reply
  • 450 views
  • 0 likes
  • 2 in conversation