-
Notifications
You must be signed in to change notification settings - Fork 135
Tutorial Symbolic Reduction
A symbolic reduction is about reducing multiple different grammars down to a single one. This allows you to capture multiple ways in which to ask a single question, but then to have it all funnelled into a single grammar that does the work. This greatly reduces complexity and duplication of effort when working with large grammars
Imagine all the different ways you can say hello to someone, but the answer is always going to be the same ( Later on we'll see how we can create multiple responses to the same question, but let's keep it simple for now )
<?xml version="1.0" encoding="UTF-8"?>
<aiml version="2.0">
<category>
<pattern>HELLO</pattern>
<template>
<srai>HELLO_RESPONSE</srai>
</template>
<category>
<category>
<pattern>HI</pattern>
<template>
<srai>HELLO_RESPONSE</srai>
</template>
<category>
<category>
<pattern>GOOD MORNING</pattern>
<template>
<srai>HELLO_RESPONSE</srai>
</template>
<category>
<category>
<pattern>HELLO_RESPONSE</pattern>
<template>
<srai>Hi there!</srai>
</template>
<category>
</aiml>
For more details about this tag see srai tag
Back to Tutorial | Back - Regular Expressions | Next - Random Selection
Email: [email protected] | Twitter: @keiffster | Facebook: keith.sterling | LinkedIn: keithsterling | My Blog
- Home
- Background
- Guiding Principles
- Reporting an Issue
- Installation
- You And Your Bot
- Bots
- Clients
- Configuration
- AIML
- Sentence Splitting
- Natural Langauge Processing
- Normalization
- Spelling
- Sentiment Analysis
- Translation
- Security
- Hot Reload
- Logging
- Out of Band
- Multi Language
- RDF Support
- Rich Media
- Asynchronous Events
- Triggers
- External Services
- Dynamic Sets, Maps & Vars
- Extensions
- Pre & Post Processors
- Custom Nodes
- The Brain Tree
- Utilities
- Building It Yourself
- Creating Your Own Bot
- Contributing
- Performance Testing
- FAQ
- History
- Website