Pattern Entities
  • 07 Jun 2024
  • 1 Minute to read
  • PDF

Pattern Entities

  • PDF

Article summary

Pattern or Regular Expression Extraction allows you to extract information presented in a format that can be described using Regular Expression (RegEx). Once you've created a pattern entity, Digital Agent Native NLU will perform a regex extraction on each incoming message and add it to event.nlu.entities.

Example:

Given a Pattern Entity definition with [A-Z]{3}-[0-9]{4}-[A-Z]{3} as pattern:

Extraction will go like this:

User InputTypeValue
Find product BHZ-1234-UYT
SKU
BHZ-1234-UYT
{ name: 'SKU',
  type: 'pattern',
  meta:
   { confidence: 1,
     provider: 'native',
     source: 'BHZ-1234-UYT',
     start: 13,
     end: 25,
     raw: {} },
  data: {
    extras: {},
    value: 'BHZ-1234-UYT',
    unit: 'string'
    }
}


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.