Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Using Alteryx for text document analysis

krobot0915
6 - Meteoroid

Hello, 

 

I would like to know if Alteryx can find a sentence with a keyword in it from a .txt file and somehow return that sentence to me? I know this might be a long shot but it would be SO HELPFUL when analyzing regulatory documents. 

 

The key words I would like to use are: shall, may, may not, should, should not, must, can, cannot

 

Thank you in advance! 

7 REPLIES 7
CarlDi
Alteryx
Alteryx

hi @krobot0915

 

Was thinking that if the sentences have periods (.), use that as a delimiter to split by rows with the text-to-column tool, so that each sentence would be have its own row. Then with the filter tool, use the contains expression to find the keywords. If you post the dataset, I'd be happy to take a look.

krobot0915
6 - Meteoroid

Hi CarlDi, 

 

Thank you so much. Here is the dataset that has been converted from a pdf to a .txt file. Please let me know if you have any trouble with the dataset. 

CarlDi
Alteryx
Alteryx

Hi @krobot0915

 

Thanks for providing that. There's many ways to address this in Alteryx. My approach is similar to my initial reply. See attached. Hope that helps!

krobot0915
6 - Meteoroid

Hi @CarlDi, 

 

I really appreciate your help. However, I have been unable to open your file, is there a special way I should be opening it? It seems like your alteryx version is newer than mine and I am trying to download the newest version in order to open your file but it doesnt seem to be working. Would you mind walking me through the steps you took or providing the workflow?

 

Thank you very much!

CarlDi
Alteryx
Alteryx

Maybe this screenshot will help, I also attached the workflow in a yxmd file format. Be mindful of the Input data tool configuration - make sure the delimiter is \n and ensure field length is sufficient or it will truncate your sentences.

 

keywords.PNG

 

 

Hope that helps!

krobot0915
6 - Meteoroid

CarlDi, 

 

Thank you very much for your help! This works perfectly!

sriniprad08
11 - Bolide

Hi,

I was going through the post. Looks interesting. Can you please let me know how to convert the .pdf to txt in Alteryx?

 

Thanks

Sriniv

Labels
Top Solution Authors