Skip to main content

Advanced Expressions

Create rules for your Topics' keywords that filter feedback exactly as you define.

Garen DiBernardo avatar
Written by Garen DiBernardo
Updated this week

What are Advanced Expressions?

Expressions allow you create rules for your keywords. The rules are based on keywords and phrases, but Expressions allow you to further refine which keywords and phrases get allocated to which Topic.


An example expressions could be save AND time. This will allocate all feedback to a topic if the feedback has BOTH "save" and "time" as keywords. It is important to note that keywords overwrite expressions. So if the same topic also contains the keyword "time", all comments (also those who do not contain "save") will go to this topic regardless of the expression. Expressions can add or exclude feedback if those used words are not also keywords.

Advanced Expressions allow you to:

  • Differentiate similar expressions, for example, "break", "broken" and "busted".

  • Combine 50/100 or 150 variations of keywords for example, "package", "parcel" and "pack" etc.

  • Match keywords such as "knee0012", "X of Y" and "iPhone 3".

Thanks to the Expression editor, creating powerful key expressions is easy in Lumoa. The AI understands key expressions and will suggest new topics and key phrases accordingly.

Before you begin

Expressions can be accessed while Editing Topics. To edit and manage topics follow these steps:

  1. Navigate to the Impact page.

  2. From Topics Widget, click on the Pen icon. ✏️

Then, select a Topic. Expressions for that Topic will appear empty unless some have already been added, e.g., by your analytics manager:

The three most used Expressions

In the following the most used expressions as well as some examples will be listed.

AND

In the example below, we are adding the words app and easy to an expression, with the AND command in the middle. This will make it so that only feedback that has both easy and app will go to this Topic.

AND NOT ANY

We can also use expressions to disallow feedback from being allocated to a Topic. In the below example, if a feedback contains the word slow, it will NOT get allocated to this Topic if the feedback also contains the word app:

OR

Another expression might be the OR command, as shown below. It can either be written as OR or as a dash |

The following expression will allocate feedback to this Topic if it contains either the words speed OR fast.

It can also look like this:

This expression also allows you to combine multiple keywords that should be combined either with "AND" or with "AND NOT ANY".

For example, it is possible to write an expression that sorts all comments that contain friendly, grumpy or kind AND also either agent, personnel or employee. This would look like this:

It could also look like this:

Other frequently used expressions

Word parts

Expressions also allow you to sort word parts to a category. This can be especially useful for languages that work with different genders or many cases, but there are also use cases for English.

Everything before and after a part of the word

`.*bank.*`

With this expression, every comment that contains the word "bank" will be sorted here. For example, comments containing banker or databank.

Everything after a word part

`invest.*`

With this expression, every word that follows "sun" will be sorted into this category, e.g., investment or investor.


Everything before a word part

`.*day`

This last version of the expression allocates all words that have letters before "day" to this category, so Monday or holiday.

Matching specific words

Normally a keyword like "match" will also lead to the allocation of variations such as "matching" or "matches". Sometimes it can be relevant to make sure that only a specific spelling or version will be sorted into a topic. There are different possibilities to do so.

lowercase:sport

This expression both allocates both comments that contain both the lowercase and uppercase word to the topic. So in this example, comments with the keyword Sport and sport will be considered here.

text:sport

In this version, only the exact match will be considered, so in this case only comments that contain sport (and not Sport) will be allocated to this topic.


Below are some additional examples for how you can create your own syntax. Note that this can get quite complex if needed, and you can contact [email protected] for assistance.

Expression name
Expression syntax
Matching example
Not matching example
AND expression
slow AND app
App is slow, slow app
app, slow
OR expression
(slow OR fast) AND app
app is fast, slow app
blue app, fast slow
NOT expression
slow AND NOT app
service is slow, slow delivery
slow app, app is slow
Tag property
tags.platform=ios
(feedback having ios tag)
(feedback not having ios tag)
Comment property
comment='-'
-
--, -me, hello
Translated comment
translatedComment=''
(empty comment)
a, hello, anything
Sentiment Category
sentenceCategory='Negative'
Bad, Horrible, Poor
Great!, ok, banana
Sentence Text
sentenceText='hi'
hi
h, hi you, hi!, HI

Please find this Excel document with examples of Advanced Expressions. Below is the same list with references.

  1. See reference results of using the above example excel:

## categorizing: 

* 'Missing packet'
* ('Packet', 'Packet', 'Content missing')

* 'Lost packet'
* ('Packet', 'Packet', 'Content missing')

* 'Lost my packet'
* ('Packet', 'Packet', 'Content missing')

* 'Lost my blue broken packet'
* ('Packet', 'Packet', 'Content missing')

* 'Lost my 3 blue broken packets'
* ('Packet', 'Packet', 'Content missing')

* 'Lost few packets'
* ('Packet', 'Packet', 'Content missing')

* 'Missing parcel'
* ('Packet', 'Packet', 'Content missing')

* 'Lost parcel' * ('Packet', 'Packet', 'Content missing')
* 'didn't receive package'

* ('Delivery', 'Delivery', 'Not delivered')
* 'didn't receive' * ('Delivery', 'Delivery', 'Not delivered')

* 'Missing one packet'
* ('Packet', 'Packet', 'Content missing')

* 'Missing two packets'
* ('Packet', 'Packet', 'Content missing')

* 'Missing 3 packets'
* ('Packet', 'Packet', 'Content missing')

* 'Packet haven't come'
* ('Delivery', 'Delivery', 'Not delivered')

* 'Packet didn't come'
* ('Delivery', 'Delivery', 'Not delivered')

* 'Packet haven't arrived'
* ('Delivery', 'Delivery', 'Not delivered')

* 'Packet didn't arrive'
* ('Delivery', 'Delivery', 'Not delivered')

* 'packet late'
* ('Delivery', 'Delivery', 'Late')

* 'parcel is late'
* ('Delivery', 'Delivery', 'Late')

* 'box is very late'
* ('Delivery', 'Delivery', 'Late')

* 'it was supposed arrive by 24.8'
* ('Delivery', 'Delivery', 'Late')

* '1/3 packages were missing'
* ('Packet', 'Packet', 'Content missing')

* '1 of 2 packages is missing'
* ('Packet', 'Packet', 'Content missing')

* '2 out of 3 packages are missing'
* ('Packet', 'Packet', 'Content missing')

* 'it's easy'
* ('Easiness', 'Easiness', 'Easiness')

* 'difficult to navigate'
* ('Easiness', 'Easiness', 'Easiness')

* 'broken package'
* ('Delivery', 'Delivery', 'Broken package')

* 'have a break'
* ('Breaks', 'Breaks', 'Breaks')

* 'breaks are too short'
* ('Breaks', 'Breaks', 'Breaks')

* 'sarah was amazing'
* ('Staff', 'Staff', 'Staff')

* 'bob said hello'
* ('Staff', 'Staff', 'Staff')

* 'people were very professional'
* ('Staff', 'Staff', 'Staff')

* 'didn't receive sms'
* ('Sms', 'Sms', 'Sms')

E.g. The Packet / Packet / Content Missing topic expressions such as these:

(missing|lost) {package description}? {package}

Successfully categorizes the following feedback:

* 'Missing packet' 

* 'Lost packet'

* 'Lost my packet'

* 'Lost my blue broken packet'

* 'Lost my 3 blue broken packets'

* 'Lost few packets'

* 'Missing parcel'

* 'Lost parcel'

See table structure example:

Expression name

Expression syntax

Matching example

Not matching example

lemma field 
lemma:apple   
apple, apples, APPLES
banana
noun type
is:noun
'work' as in 'great work'
'work' as in 'does not work'
verb type
is:verb
'work' as in 'does not work'
'work' as in 'great work'
adjective type
is:adjective
'stable' as in 'stable app'
'stable' as in 'horse stable'
number type
is:number
2, 3, 100
two, three, hundred
date type
is:date
1.11.2022
1st may, 1/1/2022
email type
is:email
www.lumoa.me
address type
is:address
Puutie 1, Puutie 1 a 2
Puutie A, puutie 1, puutie 1 a 2
alternatives
blue banana|apple
blue banana, blue apple
banana, red apple, orange
optional
missing large? box
missing box, missing large box
missing banana box
kleene's star
so very* late
so late, so very very late
so banana late
reference
missing {packet-like}
missing package, missing packet
lost package, missing banana
phrase
"it's banana"
it's banana, it's bananas
its banana, it's orange
regular expression
`\\d+/\\d+`
1/2, 2/3, 4/12
one/two, 1.5/2, 1 / 2, 1/two
pipe
work > is:noun
'work' as in 'great work'
banana, work as in 'i work had'

Advanced Expressions AND, OR, and NOT

# categories: 

* General/General/General
* Speed/Speed/Service speed
* service AND slow

* Speed/Speed/Customer service speed
* customer service AND (slow OR fast)

* Speed/Speed/App speed
* app AND slow

* Speed/Speed/Speed general
* slow AND NOT (service OR app OR customer service)

* Bugs/Bugs/iOS
* bugs AND tags.platform='ios'

* Bugs/Bugs/Android
* bugs AND tags.platform='android'

* Bugs/Bugs/Bugs general
* bugs AND tags.platform=null

* Bugs/Bugs/Other platforms
* bugs AND NOT (tags.platform='android' OR tags.platform='ios' OR tags.platform=null)

* Question/Question/Customer
* {question word} AND tags.cnv_actor='customer'

* Question/Question/Agent
* {question word} AND tags.cnv_actor='agent'

* Question/Question/First
* {question word} AND tags.cnv_index=1

* Question/Question/Speed
* {question word} AND {speed}

* Number/Number/Number
* tags.number=-1.5

* Nothing/Nothing/Nothing
* translatedComment=''

* Greetings/Greetings/Finnish
* comment='Terve'

* Sentiment/Sentiment/Negative
* sentimentCategory='Negative'

* Highlight/Highlight/Highlight
* isHighlight=true

* Sentence match/Sentence match/Sentence match
* sentenceText='Sentence match'

Did this answer your question?