Assisted free form decision definition using rules vocabulary

A computer program product of decision definition using a rules vocabulary includes program code for: receiving free form input; identifying terms contained within the free form input; searching the rules vocabulary objects for terms; responsive to the term being found, obtaining input from a user as to whether to use the found term; responsive to the term not being found; searching the rules vocabulary attributes for terms having attributes corresponding to the term; responsive to the term being found, obtaining input from a user as to whether to use the found term; and refactoring the free form input with the found term accepted by the user. The program code also includes code for updating the rules vocabulary with the term identified in the free form input as a synonym for the term found in said rules vocabulary. One embodiment further provides determining semantic equivalence between a plurality of rules using a rules database having preferred terms.

PRIORITY CLAIM

The present application claims benefit of priority under 35 USC § 120 and § 365 to the previously filed United Kingdom Patent Application No. 1210811.4 titled, “Assisted Free Form Decision Definition Using Rules Vocabulary” with a priority date of Jun. 19, 2012. The content of that application is incorporated by reference herein.

BACKGROUND

1. Technical Field

The present disclosure relates to computer-based decision definition and in particular to computer-based decision definition using a rules vocabulary.

2. Description of the Related Art

“Information Models and Systems”, found at http://dret.net/lectures/infosys-ws06/infosys, discloses the semantic structure of documents including the use of rules. Rules are a formal or refined statement of a requirement that is expressed in a technology-independent fashion. The article also discloses the use of a controlled vocabulary that is a standardised set of terms to help searchers find information. A closed vocabulary can be thought of as a fixed or closed dictionary in which all rules are defined using the same set of terms. The article does not disclose how such a closed vocabulary might be built.

Another document provided at http://docs.oracle.com/html/E27987_01/toc.htm discloses the concept of transforming natural language expressions into executable rules. Rules are authored by a user using a word processor to define the rule. The building of a vocabulary is not disclosed.

The document found at http://www.prweb.com/releases/2006/07/prweb410401.htm discloses the writing of rules in natural language in a word processor, a drawing program, or a spreadsheet. A rule is defined based on an existing rule vocabulary. Keywords are not added or amended during the rule writing process.

“Evaluating Interfaces for Privacy Policy Rule Authoring” (Karet et al., CHI 2006 Proceedings, Apr. 22-27, 2006, Montreal, Canada) discloses adding constraints to personal information at the policy level rather than at the operational vocabulary and rules levels. The document does not disclose authoring of rules using an expanded operational vocabulary.

“Building natural language interfaces for rule-based expert systems”, Proceedings of the 10th international joint conference on Artificial intelligence—Volume 2 (IJCAI'87), Vol. 2. Morgan Kaufmann Publishers Inc., San Francisco, Calif., USA, 682-687 by Galina Datskovsky Moerdler, Kathleen R. McKeown, and J. Robert Ensor, 1987 discloses the mapping of a natural language into an expert system. The article does not disclose the evolution of vocabulary and rules in the expert system itself.

BRIEF SUMMARY

Embodiments of the present disclosure provide a computer program product comprising a computer-readable storage device having computer-readable program code embodied therewith, the computer program code configured to cause a data processing system to perform decision definition using a rules vocabulary, the program code comprising code for: receiving free form input; identifying terms contained within the free form input; searching the rules vocabulary objects for terms; responsive to the term being found, obtaining input from a user as to whether to use the found term; responsive to the term not being found; searching the rules vocabulary attributes for terms having attributes corresponding to the term; responsive to the term being found, obtaining input from a user as to whether to use the found term; and refactoring the free form input with the found term accepted by the user. The steps of this processor execution of code provide the advantage of allowing an end user to generate rules in free from, but also allowing the use of a defined rules vocabulary with the benefits of a consistent usage of vocabulary and of attributes associated with the vocabulary.

In one embodiment, the terms are any of objects, attributes, values, relationships or verbs.

In one embodiment, the program code further comprises code for updating the rules vocabulary with the term identified in the free form input. This updating has the advantage of allowing the consistent rules vocabulary to be added to if there really is no term corresponding to the term used by the user pre-existing in the vocabulary.

In one embodiment, the program code further comprises code for updating the rules vocabulary with the term identified in the free form input as a synonym for the term found in the rules vocabulary. This updating has the advantage of allowing the user to use a term which is part of their natural language, but also having the advantage of using a term which is consistent with that used by other users.

In one embodiment, responsive to input from the user to not use the term found during the search of the rule vocabulary objects for terms, the rules vocabulary attributes are searched for terms having attributes corresponding to the term. This search has the advantage that if an object corresponding to the object in the input from the user is not found during a search for objects, then a corresponding object may be found by comparing the attributes of pre-existing objects in the rules database.

Embodiments of the present disclosure further provide a method of determining semantic equivalence between a plurality of rules using a rules database having preferred terms, comprising the steps of: identifying at least one of objects, attributes, values, relationships or verbs in each of the plurality of rules; replacing each of the at least one of objects, attributes, values, relationships, and verbs in each of the plurality of rules with a preferred term found in the rules database to form a plurality of amended rules; and comparing a first of the plurality of amended rules and a second of the plurality of amended rules; responsive to the comparison being true, then identifying the first of the plurality of rules and the second of the plurality of rules as being equivalent. This sequence of processes has the advantage of allowing a consistent set of rules to be used without duplication of rules but without restricting the terms used by a user.

In one embodiment the method further comprises the step of replacing generalised terms with semantically equivalent terms.

Embodiments of the present disclosure also provide a system and a computer program product for carrying out the method functions described above.

DETAILED DESCRIPTION

In the following detailed description of exemplary embodiments of the disclosure, specific exemplary embodiments in which the disclosure may be practiced are described in sufficient detail to enable those skilled in the art to practice the disclosure, and it is to be understood that other embodiments may be utilized and that logical, architectural, programmatic, mechanical, electrical and other changes may be made without departing from the spirit or scope of the present disclosure. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present disclosure is defined by the appended claims and equivalents thereof.

In the following detailed description, numerous specific details such as specific method orders, structures, elements, and connections have been set forth. It is to be understood however that these and other specific details need not be utilized to practice embodiments of the present disclosure. In other circumstances, well-known structures, elements, or connections have been omitted, or have not been described in particular detail in order to avoid unnecessarily obscuring this description.

It is understood that the use of specific component, device and/or parameter names (such as those of the executing utility/logic described herein) are for example only and not meant to imply any limitations on the disclosure. The disclosure may thus be implemented with different nomenclature/terminology utilized to describe the components/devices/parameters herein, without limitation. Each term utilized herein is to be given its broadest interpretation given the context in which that terms is utilized.

Those of ordinary skill in the art will appreciate that the hardware components and basic configuration depicted in the presented figures may vary. For example, the illustrative components within the data processing system (DPS1000,FIG. 10) are not intended to be exhaustive, but rather are representative to highlight essential components that are utilized to implement the present disclosure. For example, other devices/components may be used in addition to or in place of the hardware depicted. The depicted example is not meant to imply architectural or other limitations with respect to the presently described embodiments and/or the general disclosure. The data processing system depicted inFIG. 10may be, for example, an IBM eServer pSeries system, a product of International Business Machines Corporation in Armonk, N.Y., running the Advanced Interactive Executive (AIX) operating system or LINUX operating system.

Referring toFIG. 1, rule 1102, rule 2104and rule 3106are shown. Each of the rules is a free form sentence in natural language describing a particular course of action which should be followed. AlthoughFIG. 1shows three rules, there may be any number of rules. An example might be “When the customer is less than 18 years old then reject the order”. Another example might be “When the purchaser's age is more than 65 then apply 5% elderly person's discount to order”. These rules are being authored by a user to, for example, allow them to be used to implement policies across a broad computing system or to allow a global policy to be implemented across different applications and contexts. When the rules are authored, they are then used to update a rules vocabulary108.

Rules can be broken down into terms such as, for example, objects and attributes. Attributes may have values such as “18”, “John Doe”, “2BE” or “NOT2B” or they may reference other concepts such as “brother of . . . ”. Using the first example above, the rule “When the customer is less than 18 years old then reject the order” can be broken down as follows:

Similarly, using the second example above, the rule “When the purchaser's age is more than 65 apply 5% elderly person's discount to order” can be broken down as follows:

FIG. 2shows a rules vocabulary108comprising terms202. Terms202are, for example, objects or attributes or relationships such as “brother of . . . ”. Although seven terms are shown, there may be a single term or any number of terms. Rules vocabularies108may be general purpose or they may be specialised for particular purposes, users, industries or the like.

FIG. 3shows a local vocabulary for the second example above. The vocabulary is “local” because that is the scope of the sharing, i.e. the local vocabulary is a subset of the global vocabulary that is local to the user of the vocabulary. A first object “Purchaser” is shown. The object “Purchaser” has one attribute “age”. A second object “Order” is also shown. The object “Order” also has one attribute “discount”. These correspond with the terms in the breakdown of the rule in the second example above.

FIG. 4shows an example rules vocabulary108containing terms202. A first object “Customer” is shown. That object has a synonym of “Client”, so that either term can be used interchangeably. The object “Customer” has three attributes, “age”, “name” and “id”. The attribute “age” has a synonym of “d.o.b.” (date of birth) and the attribute “name” has a synonym of “surname”. The object “Vehicle” has four attributes, “age”, “license number”, “make” and “model”. The object “Order” has one attribute “order number”.

FIG. 5shows a flow diagram of an embodiment of the present disclosure used to update a rules vocabulary108, such as that shown inFIG. 1, from free form input rules102,104,106. The process starts at step502. Free form input, such as the rules102,104,106described in the two examples above is received from a user at step504. At step506, the free form input is analysed to identify terms such as objects, attributes, values and relationships. In the second example above, the object “Purchaser” has an attribute of “age” and the object “order” has an attribute of “discount”. This analysis can be done by known methods such as syntactic analysis or by parsing or by pattern matching. At step508, the terms202in the rules vocabulary108are searched for terms corresponding to the objects found during the analysis step506. In this example, the search is for the objects “Purchaser” and “order”.

At step510, if the search is successful and the object is found in the rules vocabulary108, then the found object is presented to the user as a candidate for the object in the rule102,104,106. In the second example above, the search of the rules database108for the object “Purchaser” will find the object “Customer”, which already has a synonym of “Client”.

At step518, the user is presented with the object found and its associated attributes, that is “Customer”, with a synonym of “Client” and attributes of “age”, “name” and “id”. The user is asked whether this object is the one that should be used, i.e. should “Customer” be used instead of “Purchaser”, optionally should “Purchaser” be added as a synonym of “Customer” or optionally should “Purchaser” not be treated as the same as or a synonym of “Customer”, i.e. “Purchaser” and “Customer” are to be treated as disjoint. At step522, if the user agrees that this object (“Customer”) is the one that should be used, or that “Purchaser” be added as a synonym of “Customer”, then the rule is reworded using the object “Customer” in place of “Purchaser”. In one embodiment, not shown inFIG. 5, the user is offered the option of adding the searched term to the existing vocabulary. The process then ends at step524.

If the search at step508is unsuccessful and the object is not found in the rules vocabulary108, then at step512another search of the attributes in the rules database108is carried out for attributes corresponding to those found in the rule. In the second example above, the attributes are “age” and “discount”. At step514, if the search is successful and a corresponding attribute is found in the rules vocabulary108, then the found attribute is presented, at step520, to the user as a candidate for the attribute in the rule102. In the second example above, the search of the rules database108will find the attribute “age”, associated with the object “Customer” in addition to the attribute “age”, associated with the object “Vehicle”. The user selects which of the two objects is the appropriate one to use. In a preferred embodiment, not shown inFIG. 5, the user is offered the option of adding the searched term to the existing vocabulary. At step522, if the user agrees that this object (“Customer”) is the one that should be used, or that “Purchaser” be added as a synonym of “Customer”, then the rule is reworded using the object “Customer” in place of “Purchaser”. The process then ends at step524.

At step514, if the search is unsuccessful and a corresponding attribute is not found in the rules vocabulary108, the process then ends at step524.

FIG. 6shows the local vocabulary ofFIG. 3used in the second example above after consolidation with the rules vocabulary ofFIG. 4. The first object “Purchaser” having one attribute “age” has been replaced by a first object “Customer” having three attributes “age, “name” and “id”. The user entered “Purchaser” as an object, but a search of the rules vocabulary found “Customer” as an object which already existed in the rules vocabulary and which was likely to be an equivalent object. The user agreed at step522of the process shown inFIG. 5that the term should be replaced. As it is already known that the object “Customer” in the rules vocabulary has attributes of “name” and “id” as well as “age”, then these additional attributes are added to the local vocabulary for the object “Customer”. The synonyms “d.o.b.” and “surname” found in the rules vocabulary have been added to the attributes “age” and “name” respectively.

A second object “Order” is also shown inFIG. 3having a single attribute “discount”. The user entered “Order” as an object and the term was found. However, the object “Order” in the rules vocabulary had two attributes “discount” and “order number”. As it is already known that the object “Order” in the rules vocabulary has attributes of “order number” as well as “discount”, then in the local vocabulary ofFIG. 6, this additional attribute is added to the local vocabulary for the object “Order”.

FIG. 7shows the example rules vocabulary ofFIG. 4used in the second example above after consolidation with the local vocabulary ofFIG. 3. A first object “Customer” is shown having a synonym of “Client”, so that either term can be used interchangeably. A further synonym of “Purchaser” has been added so that this can also be used interchangeably. The object “Order” is shown having an attribute “order number”. A further attribute of “discount” has been added to the object “Order”.

FIG. 8shows a flow diagram of another embodiment of the present disclosure in which a user is prompted as to whether or not to add a found term as a synonym and also in which a search of attributes in the rules vocabulary108is completed if a user does not accept a term found in the search of the rules vocabulary108for objects. The step510inFIG. 8is the same step510as shown inFIG. 5. Similarly, steps512,514,518,520,522and524are the same steps as shown inFIG. 5.

At step518, if the user does not accept the term, then processing proceeds to step512where the vocabulary term attributes are searched for attributes which correspond to the searched term. If the user does accept the term, then at step802, input is obtained from the user as to whether to add the term accepted by the user at step518to the rules vocabulary108as a synonym. Processing then continues at step522described above with reference toFIG. 5.

At step520, if the user does not accept the term, then processing ends at step524. If the user does accept the term, at step804, input is obtained from the user as to whether to add the term accepted by the user at step520to the rules vocabulary108as a synonym. Processing then continues at step522described above with reference toFIG. 5.

In another embodiment of the disclosure, the rules vocabulary108is searched for verbs, such as “reject” or “approve” instead of attributes, such as “age”. In a variation of this embodiment, the rules vocabulary is searched for both attributes and for verbs.

In a further embodiment of the disclosure, the rules vocabulary108is searched for synonyms of attributes in the same way as synonyms of objects are searched. In a variation of this embodiment, synonyms of verbs are searched instead of synonyms for attributes, or as well as synonyms for attributes.

In another embodiment of the disclosure, semantically equivalent rules which infer the same conditional statement can be identified. For example, the two rules:

Referring toFIG. 9, the process is started at step902. In order to determine whether two rules are semantically equivalent, the rules first have their objects, values and verbs identified at step904. Any combination or permutation of objects, values, verbs or other term such as relationships may be identified, but for the following example, objects, values and verbs will be identified.

In the first rule, the term “customer” is identified as an object, the number “18 years” is identified as a value, the term “reject” is identified as a verb, and the term “order” is identified as an object. In the second rule, the term “client” is identified as an object, the number “18” is identified as a value, the term “refuse” is identified as a verb, and the term “sale” is identified as an object.

At step906, each object, value or verb is replaced in each of the rules by the preferred term, i.e. if the object, value or verb used in the rule is identified as a synonym, then that usage is replaced by the term in the rules database with which it is associated with.

In the first rule, “customer” is a preferred term and so the term “customer” remains. The number “18 years” is identified as a synonym for “18” and so “18 years” is replaced by “18”. The verb “reject” is identified as a synonym for “refuse” and so the verb “reject” is replaced by “refuse”. The object “order” is identified as a preferred term and so it remains. The first rule now reads “When the customer is less than 18 then refuse the order”.

In the second rule, “client” is identified as a synonym for “customer” and so “client” is replaced by “customer”. The number “18” is identified as a preferred term and so “18” remains. The verb “refuse” is identified as a preferred term and so the verb “refuse” remains. The object “sale” is identified as a synonym for “order” and so “sale” is replaced with “order”. The second rule now reads “If the customer's age is not greater than 18 then refuse the order”.

Either before or after the replacement of the terms, some generalized terms are replaced with semantically equivalent preferred terms. For example, “less than” and “not greater than” are semantically equivalent. In this case adjustments may also have to be made to the value as “less than” does differ from “not greater than” for the boundary condition of 18 years of age. As an example, the value “18” may be replaced by the value “17.99” in the second rule when “not greater than” is compared for semantic equivalence with “less than”. This step is shown inFIG. 9at step908.

At step910, the amended first rule and the amended second rules are compared for equivalence. This comparison may be an absolute comparison or it may be a comparison that disregards differences which are either minor or of a specified type which does not affect the meaning of the rules.

At step912, responsive to the comparison between the amended first rule and the amended second rule being true, then the first rule and the second rule are identified as being equivalent. Optionally, appropriate changes may be made to the rules database to ensure that future rules equivalent to the first and second rule use the preferred terms. The process ends at step914.

The various function aspects of the disclosure are carried out by execution of program code and/or program instructions on a processor of a computer or data processing system (DPS).FIG. 10illustrates an example data processing system, which includes processor1005, memory1010, and storage device1015, which are all communicatively interconnected via a system bus or interconnect1020. Within memory1010are one or more applications and or executable modules, including decision definition application/module1025, which executes on processor1005to configure the processor to perform the various processes described herein. Storage device1015includes therein rules vocabulary108, among other stored components. DPS100also comprises one or more input/output devices, including general input device1030and general output device1035, which are also communicatively coupled to processor1005via system interconnect1020. As shown, DPS1000can be connected to an external network1050via a network interfacing card (NIC)1040.

In each of the flow charts above, one or more of the methods may be embodied in a computer readable medium containing computer readable code such that a series of steps are performed when the computer readable code is executed on a computing device. In some implementations, certain steps of the methods are combined, performed simultaneously or in a different order, or perhaps omitted, without deviating from the spirit and scope of the disclosure. Thus, while the method steps are described and illustrated in a particular sequence, use of a specific sequence of steps is not meant to imply any limitations on the disclosure. Changes may be made with regards to the sequence of steps without departing from the spirit or scope of the present disclosure. Use of a particular sequence is therefore, not to be taken in a limiting sense, and the scope of the present disclosure is defined only by the appended claims.

The article of manufacture containing the programming code is used by either executing the code directly from the storage device, by copying the code from the storage device into another storage device such as a hard disk, RAM, etc., or by transmitting the code for remote execution using transmission type media such as digital and analog communication links. The methods of the disclosure may be practiced by combining one or more machine-readable storage devices containing the code according to the present disclosure with appropriate processing hardware to execute the code contained therein. An apparatus for practicing the disclosure could be one or more processing devices and storage systems containing or having network access to program(s) coded in accordance with the disclosure.

Thus, it is important that while an illustrative embodiment of the present disclosure is described in the context of a fully functional computer (server) system with installed (or executed) software, those skilled in the art will appreciate that the software aspects of an illustrative embodiment of the present disclosure are capable of being distributed as a program product in a variety of forms, and that an illustrative embodiment of the present disclosure applies equally regardless of the particular type of media used to actually carry out the distribution.

While particular embodiments of the present disclosure have been shown and described, it will be obvious to those skilled in the art that, based upon the teachings herein, changes and modifications may be made without departing from this disclosure and its broader aspects. Consequently, the appended claims are to encompass within their scope all such changes and modifications as are within the true spirit and scope of this disclosure and embodiments of the disclosure are intended to be limited only by the scope of the appended claims, giving full cognizance to equivalents in all respects.