< Day Day Up > |
Rule-based systems vary greatly in complexity. Rules are usually stored in some repository, such as a database. The total collection of rules is known as the rule base or knowledge base. Simple rule-based systems typically utilize an IF. . .THEN format to store rules. Each rule lists a condition (the if part) that must be met for the rule to be true. The rule also specifies what action or result (the then part) must take place. There is no set standard for forming rules, but they should be based on meaningful and clear ideas. Since the rules need to be formalized in written language that dictates programmatic action, it may take some time to create a useful rule base. The sample application in this chapter will parse human language and then use rules to determine how data should be stored in a database. Note The sample application in this chapter will parse a sentence and use rules to determine how the data should be stored in a database. The portion of code that examines the sentence is not the same as natural language processing (NLP). NLP is a complex process that attempts to understand human language. It is discussed further in Chapter 9. The Phases of Rule-based SystemsApplications that use rules may apply them in a four-phase process. The phases are as follows:
The final phase is the most critical one. It is not realistic to expect that rules will never have to be changed once they are defined. Just as a human employee must be trained and then retrained, so too does a successful rule-based system.
|
< Day Day Up > |