phân tích xác suất một phần cây bắc qua một chuỗi nhất định là bắt nguồn từ với một nonterminal nhất định. Chúng tôi sẽ giữ lại tên 6 và ắc quy sử dụng: bên trong phân tích xác suất cao nhất của một NLq cây con Sử dụng lập trình năng động, | The Probability of a String 397 probability partial parse tree spanning a certain substring that is rooted with a certain nonterminal. We will retain the name 5 and use accumulators Si p 7 the highest inside probability parse of a subtree Npq Using dynamic programming we can then calculate the most probable parse for a sentence as follows. The initialization step assigns to each unary production at a leaf node its probability. For the inductive step we again know that the first rule applying must be a binary rule but this time we find the most probable one instead of summing over all such rules and record that most probable one in the variables whose values are a list of three integers recording the form of the rule application which had the highest probability. 1. Initialization ỗị p p P N - Wp 2. Induction 5i p g max P N N-i Nk SAp r 5k r l q p r q Store backtrace tpilp q argmaxP N - Nj Nk 5j p r 5i r l c ij 3. Termination and path readout by backtracking . Since our grammar has a start symbol then by construction the probability of the most likely parse rooted in the start symbol P t 51 1 m We want to reconstruct this maximum probability tree We do this by regarding as a set of nodes and showing how to construct this 2. We could alternatively find the highest probability node of any category that dominates the entire sentence as P f max ổị l m l i n 398 11 Probabilistic Context Free Grammars set. Since the grammar has a start symbol the root node of the tree must be Nịm. We then show in general how to construct the left and right daughter nodes of a nonterminal node and applying this process recursively will allow us to reconstruct the entire tree. If is in the Viterbi parse and Ipilp 9 j k r then left Npr right Note that where we have written rgmax above it is possible for there not to be a unique maximum. We assume that in such cases the parser just chooses one maximal parse at random. It actually makes things considerably more complex to .