Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Text and Sentiment Analysis

alphasupport
7 - Meteor

Hello All, 

 

I am fairly new to Alteryx and I want to know if we can perform advanced level of text analytics which we do in Python such TF/IDF or Vector generation. 

If yes, then kindly guide me how can I get started. 

9 REPLIES 9
MarqueeCrew
20 - Arcturus
20 - Arcturus

@alphasupport,

 

Have you read @MattD's KB article on Python Scripts?

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
alphasupport
7 - Meteor

Hey, 

 

I have tried using that many times but I am getting error as "Error: Run Command (3): Either an Output connection or Input connection is required."

I am able to run the same script from CMD or and any other environment but not Alteryx. 

Also, it will be really great help if you anyone can throw some light on how to perform advanced level of Text analytics from Alteryx. 

 

Regards

KaneG
Alteryx Alumni (Retired)

Hi @alphasupport,

 

The error message that you're seeing there is because the Run Command needs another tool connected, easiest way would be to link a Browse and put the output of your script in the 'Read results' section of the config. This will read the results back in to Alteryx to view in the Browse Tool. the screenshot below shows a basic example of that configuration.

 

Run_Command.png 

 

 

As for learning more about Text Analytics, have a look at @NeilR's blog post on comparing sentiment analysis algorithms to get an idea of the possibilities.

 

In terms of TFIDF calculations though, the attached workflow gives some examples. It uses the Jane Austen example from here and also shows how the process could be performed without R using the same dataset from Output 5.

 

Kane

KaneG
Alteryx Alumni (Retired)

btw, you may need to install a couple of packages for that R script to work.

 

Just run this in a workflow with a single R tool:

 

install.packages(c("janeaustenr","tidytext"),repos="https://cran.ms.unimelb.edu.au/")

Feel free to change the mirror if you like to one closer to you

NeilR
Alteryx Alumni (Retired)

Here is another blog post that describes yet another option: building a custom text analytics tool with the Python SDK.

alphasupport
7 - Meteor

Hey. 

 

Apologies for delay in response. 

I tried exactly as you mentioned but NO luck yet. 

Alteryx is still throwing an error. 

 

My script is sooo simple that its just printing my name but Alteryx isnt allowing me to do that with Run Tool.

My Script reads like print("Hello")


Regards, 

Punit Shah

alphasupport
7 - Meteor

Dears, 

 

I have gone through this post earlier but doesn't look like easy and standard way. 

I have discovered great opportunity with Alteryx Connect 2018.1 and I would prefer to go ahead with that. 

 

Regards,

Punit Shah

KaneG
Alteryx Alumni (Retired)

It's great to see that you are liking Alteryx Connect! 

 

Just to round off the conversation, I've attached a workflow that includes 3 examples, 1 of creating then running a python script, 1 of just running and then bringing in the results of a python script and finally an example that shows the whole process.

 

Kane

alphasupport
7 - Meteor

Hey, 

 

I really appreciate your efforts. 

I think am good now with this "Run" tool. 

 

Thank you. :)

Cheers. 

 

Regards,

Punit Shah

Labels