This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 03-18-201608:43 AM - edited on 03-08-201901:24 PM by SydneyF
This article features a workflow (created in version 10.1) that will allow you to search for key words within a column of text strings. Potential applications for this might be to scan a Twitter feed, customer product feedback or Facebook comments for key words such as the mention of particular people, descriptive words or subject matters. For this example, the purpose will be to search famous science quotes for a select group of key words.
In the first section of the workflow, we are performing the following functions:
Reading in the data - The first table contains the text strings to be searched (quotes); the second table contains the key words that we want to search for.
Adding a Record Id in order to join the original text strings back into the data.
Using the Text to Columns tool, we will split the text strings into individual rows for each word within each text string.
Append each of the key words to each of the records/words resulting from the previous step.
In the next section of the workflow, we will:
Use the Multi-Field Formula tool to change all words in both the text strings and key words to uppercase as the FindString function used downstream is case sensitive.
Use the RegEx tool to remove non-word characters from the text string words (such as periods, commas, etc.) so that we can do a double-check on the FindString by using a length test. This will prevent the FindString function from returning a match of the key word 'know' to the text string 'knowledge'.
Match words using the Formula tool and the FindString function in conjuction with comparing the length of the key words to the text string words.
In the final section of the workflow, we will complete the steps of:
Summarizing the counts of each key word to each Record ID of the text strings.