# Find keywords in text (from a large list)

**URL:** https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331
**Category:** Ask a question
**Created:** [December 2, 2020, 9:59am UTC](https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331 "2020-12-02T09:59:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://community.parabola.io/u/Frederic)
#### Post date: [December 2, 2020, 9:59am UTC](https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331/1 "2020-12-02T09:59:31Z")

</div>

Hi,

I’d like to create a “tags” column, to better categorize some content.

The idea would be to search content (ie food recipes) for keywords from a list (100+ keywords) and if there is a match, either list keywords in a new column (ie “Chinese” or “Japanese”) , or (ideally) add tags to a new column (i.e. if keywords “Chinese” or “Japanese” =\> tag = “Asian”)

The new column can contain multiple tags

As the list is pretty heavy, I’d like to avoid if/then… rules

something similar to

> **[Power query: Add column with list of keywords found in text column](https://community.powerbi.com/t5/Desktop/Power-query-Add-column-with-list-of-keywords-found-in-text/td-p/83109)**
>
> In power query I have a text column with phrases. I want to categorize the phrases by one or more keywords found in the text. The keywords are defined in another table.   I would like the found keywords to be added as a table/list in a new...

> **[Excel formula: Categorize text with keywords | Exceljet](https://exceljet.net/formula/categorize-text-with-keywords)**
>
> At the core, this is an INDEX and MATCH function.

What’s the best way to do this with Parabola?

thanks in advance!

---

<div class="post-metadata">

### Author: ![daniel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/daniel/32/732_2.png) [@daniel](https://community.parabola.io/u/daniel)
#### Post date: [December 2, 2020, 10:48pm UTC](https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331/2 "2020-12-02T22:48:04Z")

</div>

Hey @Frederic! Welcome to the community.

Here’s a walkthrough on how you can achieve this using Parabola. This assumes you have a separate list of keywords and tags that you can import.

 ![keyword-flow](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/9/932d32eded79c8de7c31017fd90d789e55df5af2.jpeg)

Start by importing your keywords/tags and recipes. Here’s what my **recipes** data looks like:

 ![recipes](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/c/c8ca056ded8fa6b1860de4b1ae7592c38234d335.png)

And here’s what my **keywords** data looks like:

 ![keywords-tags](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/4/4ac46afb52efed8bbf88db0eefce293e1ae34504.png)

Using two [Insert Text Column](https://parabola.io/transform/insert-text-column) steps we can create new columns for each table called `Join` and insert a value of `1`. This new column will eventually be used to merge the tables together.

 ![insert-text](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/a/a6bf8276e03370c9d0a4a929d314228ae169d2ea.png)

I like to reorder the columns, but it’s a personal preference. This won’t affect your flow. We’ll now use a [Combine tables](https://parabola.io/transform/combine-tables) step to join on the matching `Join` column.

 ![combine-tables](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/4/41c5aad6f85f6c8886a87b121e098abc10e73bfc.png)

This will create duplicate rows, but we’ll take care of that later. We’ll use an [Insert if/else column](https://parabola.io/transform/insert-if-else-column). Don’t worry, it will only require one rule. 🙂

 ![if-else](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/9/981a5dd8074bf13c8af3b191e9044a8a5ad03cb3.png)

Let’s create a new column called `Keyword?`. If a recipe contains a keyword in the same row, the value `Yes` will be inserted in that column. Otherwise, the value is blank.

Lastly, we can use a [Filter rows](https://parabola.io/transform/filter-rows) to show rows that have a value of `Yes` in `Keywords?` column. The resulting table should show us a list of recipes, keywords, and tags associated with those keywords.

 ![filter-rows](https://us1.discourse-cdn.com/flex020/uploads/parabola/original/2X/b/b678d89d41860909d4316a9cb7017050e32d3d33.png)

Let me know if that helps!

---

<div class="post-metadata">

### Author: ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://community.parabola.io/u/Frederic)
#### Post date: [December 3, 2020, 9:11am UTC](https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331/3 "2020-12-03T09:11:46Z")

</div>

thanks a lot @daniel, it looks fantastic! I’m going to give a try now:)

---

<div class="post-metadata">

### Author: ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://community.parabola.io/u/Frederic)
#### Post date: [December 7, 2020, 2:29pm UTC](https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331/4 "2020-12-07T14:29:26Z")

</div>

Hi @daniel

workaround implemented, thank you!

I even slightly improved it by adding a “merge duplicate rows’. step at the end, with a ',” delimiter to have multiple tags (if any) for one recipe.

The only limitation I see atm, is the “insert if/else column” function which is case sensitive (if keywords is “French” , and it is written “french” in the recipe, it won’t find it). Do you know any fix to this issue?

thanks  
Fred

---

<div class="post-metadata">

### Author: ![daniel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/daniel/32/732_2.png) [@daniel](https://community.parabola.io/u/daniel)
#### Post date: [December 7, 2020, 9:10pm UTC](https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331/5 "2020-12-07T21:10:11Z")

</div>

Hey @Frederic,

Glad to see you improved on the flow!

To capture case sensitivity, try using an [Insert text column](https://parabola.io/transform/insert-text-column) to duplicate the values of your `Keywords` column. You can then use a [Change text casing](https://parabola.io/transform/change-text-casing) step to make those keywords lowercase.

You should now have two columns with both casings for your keywords.

In your [Insert if/else column](https://parabola.io/transform/insert-if-else-column) settings, you can add a condition to target the lowercase keywords using the same rule that’s already in place. If your recipe has an uppercase or lowercase keyword, the `Keyword?` column should now populate with the value `Yes`.

---

<div class="post-metadata">

### Author: ![Frederic](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@Frederic](https://community.parabola.io/u/Frederic)
#### Post date: [December 8, 2020, 7:38pm UTC](https://community.parabola.io/t/find-keywords-in-text-from-a-large-list/1331/6 "2020-12-08T19:38:02Z")

</div>

thank you Daniel, really helpful. I made both the “recipes” and “keywords” value. lowercase and it works perfectly.

thanks!
