• Keine Ergebnisse gefunden

Answer-Sentence Syntactic Alignment Prob- Prob-lem

GA for Answer-Sentence Syntactic Alignment

6.2 Answer-Sentence Syntactic Alignment Prob- Prob-lem

Let us assume that we have a tuple: {sentence, answer}, in which the answer is a substring of the sentence. ConsiderS to be the sentence where the answer is already replaced with a special string w0, and γ =len(S) is the number of words inS. For example, S =“The First Helicopter was invented in Kyiv by w0 in 1909”, where the answer candidate is given by w0 =“Igor Sikorsky” and γ = 11. Consider also a function τ(S) which returns the position of w0 in the sentence S, and two other functionsPl(wi, ²) andPr(wi, ²), which returns the likelihood that a word wi occurs

² words to the left and to the right of w0 respectively2. In the working example, τ(S) = 9 and Pr and Pl are given by some external model (1≤i≤γ).

Consider that words fromS are removed in such a way that the syntactic fitness of the answer candidate is maximized, that is, that the remaining words maximize the likelihood of the answer candidate to the EAT. For the purpose of keeping track of words that remain on the aligned sentenceS0, consider the next binary variable:

Yi =

½ 1 if the wordwi is in the aligned sentenceS0 0 otherwise.

2These functions are described in details in section 5.2.1.

July 14, 2006

6.2. Answer-Sentence Syntactic Alignment Problem 57 For instance, an aligned sentenceS0 is “The * Helicopter was invented * * by w0 in 19093, whereY2 =Y6 =Y7 = 0 and Y1 =Y3 =Y4 =Y5 =Y8 =Y10 =Y11= 1.

The number of remaining words (NRW) between the word wi and w0 is defined as follows:

In our working example, NRW(11)=NRW(5)=1. Since the goal is to find an align-ment that maximizes the syntactic fitness of the answer candidate with respect to its context, the new fitness function takes into account the set of values for Yi as follows: This functionK particularly equally favours query terms by giving them a weight of α(wsk). δl and δr are the left and right offset respectively. An offset is a translation of context terms. For instance, consider the following sentenceS0 to be an alignment of S: “The * Helicopter was invented * * by + + + w0 + + in 1909”. In S0, the offset are marked with a “+”, thus, δl= 3 and δr = 2.

Sometimes constituents or words are inserted next to the answer candidate in sentences on the training data, which can distort the alignment. Offsets attempt to tackle this problem head-on. In the instructive example, S0 can align a sentence in the training tuples, such as “The Helicopter was invented by a man named w0 in Kyiv in 1909”.

In short, removing words aims for improving the alignment when a smaller num-ber of words within new sentences are desired, and offset a larger numnum-ber of words.

It is extremely clear that not all possible alignments are considered, but the number of possible alignments exponentially increases as long as the number of words in the sentence also increases.

The number of possible alignmentsConsider τ(S) to be the position where the answer candidatew0 occurs. Then,Ll=τ(S)1 is the number of words to the left of the answer candidate, andLr =γ−τ(S) is the number of words to the right.

All possible combinations of Ll words are given by Ll!. At this point, we consider each word different from each other. It is a good approximation, because sentences are split into small pieces of text in which each word rarely occurs more than once.

Similarly, the number of combinations to the right of w0 is Lr!. Incidentally, every

6.2. Answer-Sentence Syntactic Alignment Problem 58 combination of words to the left can occur simultaneously along with any combina-tion of words to the right.

Then, the total number of Possible Alignments (PA) is given by:

P A=Ll!∗Lr!

In addition, consider that words can be arbitrarily removed from both contexts.

Combinations regarding different context lengths must then be taken into account (Ll,Ll1,. . .,0). Therefore, the number of possible alignments is defined as follows:

P A=

For our working example, the number of possible word alignments is 184936:

P A=

If word orderings are deliberately restricted to combinations that preserve their relative order. The number of possible combinations is:

P A=

In the example, the number of possible alignments is 1024:

P A=

All effects of offsets are not considered yet. The current formula takes into account only when values for offsets are zero. At the same time that the value for any of the offsets is greater than zero, the corresponding value for the word next to w0 is one.

In the case of the left context, the number of new possible combinations is:

l

Similarly, the number of new possible combinations due to the right context is:

r

6.3. The GA for Answer-Sentence Syntactic Alignment 59 Eventually, the number of possible alignments is defined as follows:

P A=

where ∆land ∆rare upper bounds for their respective offset. Regarding the working example, if values for ∆l = 5 and ∆r = 5 are considered, then the number of possible combinations is 17024:

This result considers only one tuple {question, sentence, answer} consisting of ten words. However, the overall number dramatically increases due to the following two factors: (a) for each sentence, many answer candidates are feasible, and (b) the number of sentences is larger than one.

Using the result in section 4.2. A reasonable estimate of the total number of Possible Alignmentsfor a set of σ different sentences is:

P A= σ∗Υ¯ ( ¯Υ1)

Υ is the average number of words on a sentence. Thus, the factor¯ Υ( ¯¯ Υ−1)2 represents the number of possible answer candidates of different length on a sentence. In our illustrative example,

P A= 2514(141)

2 12544 = 28537600

Then, the number of possible alignments for a set of 25 sentences is 28537600 ( ¯Υ = 14). Consequently, an efficient search algorithm is necessary to early detect and test promising alignments.

6.3 The GA for Answer-Sentence Syntactic