четверг, 17 сентября 2009 г.

Mixed strategy

Search in both directions. If it is not clear what kind of search - direct or reverse - is the most appropriate for a particular application, should be implemented search in two directions. In this case, the starting points are the initial and final state, and the search is carried toward the center.
The conclusion in two ways. With this approach, the original data is used to activate rights, which other antecedents are sorted in reverse order. Secondary queries that do not correspond to any investigation or data are stored as "demons" that can later be satisfied by new or the latest data received. The system can be devised in such a way that the data satisfy the "demons" (antecedents of activated rules) will not activate additional rules that "make" the system at the forthcoming direct withdrawal to focus on rules that take into account the previous context.

Parsing the start in the left corner. Applying the above technique to parsing, we obtain the so-called analysis starting at the left corner. In terms of the example in section parsing, the system will first review the "they", will rule 9 - the only rule that can be applied to that word, then rule 3, explaining the PRO, and then rule 1, as the only rule, the investigation begins with NP. Then the system tries to parse top-down "are flying planes" as VP.

Conclusion

Usually in artificial intelligence systems used one of two types of analysis. The first - an analysis of bottom-up or direct analysis, and the second-down or reverse. The difference between them is determined by the direction in which search is conducted (from beginning to end, or vice versa) and which element (or a consequence of antecedent) activates the rule.
Factor efficiency and ease of implementation can play a decisive role in choosing the type of analysis to be applied in a specific application, but it must be remembered that the use of mixed strategies is also possible.

пятница, 10 июля 2009 г.

Comparison

Efficiency. Choosing the type of analysis (top down or bottom-up) depends on the configuration tree, which carried out a search. If, on average, each element should be a larger number of elements, rather than precede, the analysis of top-down (or the reverse analysis) would be more effective and vice versa. Consider the extreme case. Assume that the search area forms a tree with a vertex in the initial state. Then, using the direct approach, we will have to search for virtually the entire tree, while the opposite approach - only in its linear part.



Comparison and unification. In systems with a set of logical rules, or systems analysis to select direct or reverse the chain of analysis affects the degree of difficulty of the comparison. A direct chain analysis of the system is constantly subject to new facts that have no free variables. Thus constantly compares the background, it is likely with free variables, with the facts that do not have such.

On the other hand, systems with a backward chain analysis of the honor of asking specific questions. If the rules are set out in the logic of predicates and not the logic of judgments, then a comparison is made between the question of variable in the investigation of variables. Secondary queries can contain variables, so in general the system with the opposite chain analysis should be designed in such a way that they could compare two character structures, each of which can contain variables, which would require the creation of an algorithm unification.

среда, 8 июля 2009 г.

Systems with embedded rules.

Consider the direct and inverse chain analysis on the example of an imaginary set of rules on how to spend an evening. The rules are as usual, antecedent located on the left, as a consequence - the right, due to all regulations are met, a review is conducted in parallel.
1. A good movie on TV + Early morning meetings no later films ®
2. Early morning meetings do not + We need to work late ® Jobs
3. We need to work + required documents ® Work in the office
4. Later films ® Do not sleep late
5. Work late ® Do not sleep late
6. Work late ® Return to the office
7. Work in the office ® Return to the office



For example, Rule 1 states that if the TV is a good movie and I have tomorrow early morning meetings do not, then I follow the regime of "later a movie".
Consider the first example of direct chain analysis. Assume that the system has received initial information that the sooner tomorrow utorm I do not have meetings. Activated rules 1 and 2. Assume further that the system received a message that I need to work on. Active Rule 3 and Rule 2 is called and vypolnyaetya, whence the conclusion that I was in a "work late", with the result that triggered and implemented rules 5 and 6. As a result, the system is that I should go back to the office and do not sleep late.


Now consider the same problem with the use of a chain of analysis. Assume that the system has received background information that I do not have a meeting tomorrow morning, but I need more work, then it (the system) was asked whether I go back to the office. This request activates the rules 6 and 7. In turn, there is the question "Working late" or "Work in the office? This enabled the rules 2 and 3, and the question is "Early in the morning meetings do not," "We need to work" or "required documents"? The first two antecedent are satisfied, so rule 2 will be called and executed, which would entail the satisfaction of antecedent "Working late, call and execution of rule 6, in which the system will come to the conclusion that I should go back to the office.



Please note that the direct parsing generated more consequences, and if the reverse - requests. Since in both cases used the same data, in the course of the analysis performed by the same rules, but activated different.

понедельник, 6 июля 2009 г.

Examples 2

Construe a bottom-up begins with the words in the sentence. Again, the analysis is conducted from left to right, and first applied the rule with the lowest number. So, the first word of first sentence "they" refers to the background of rule 9, which after the issuing the statement that "they" is a pronoun (PRO). Then the rule 3 and shall issue, that "they" is the NP. NP corresponds background of 1 and 5, but none of these rules are not yet due, so the analysis moves to the "are". You rule 11 (despite the fact that Rule 12 is also due, it was not performed in accordance with the rule of the sequence of rules). Then the rule 10, 8 and 2 (Fig. 3a). At this stage, further analysis of the sequence of NP + AUX + ADJ + NP is impossible, so we return to the last due, but not yet implemented the rule, ie to rule 4. Analysis of the sequence of NP + AUX + NP as possible, so once again with the last due to unfulfilled. Now that rule 13, which gives that "flying" is a V. Then the rules of 6 and 5 (Fig. 3c). Collation posledovatellnosti NP + AUX + VP is not possible, therefore, carried out to 7 and gives the assertion that "are flying" is the VT. Then try to obey rules 1 and 5, to what ends, and syntactic parsing (Fig. 3d).

This example was carried out to compare the mechanisms of syntactic parsing from the bottom up and top down. Establishing a strict order from left to right parsing and numbering of the rules due to the desire to use the most similar algorithm, despite the fact that parsing results were different.