Both algorithms were implemented in Java, and the code for both is almost identical, except for the set of instructions which computes the dynamic programming equation for propagating the beliefs up in the tree.
• For each a ∈ N , we have a parameter π a , which is the probability of a being the root symbol of a derivation.