For phrase p, we compute its vector g(p) through recursive computation on the parse.
if phrase p is the yield of a parent node in a parse tree, and phrases c 1 and c 2 are the yields of its two child nodes, we define g(p) recursively as follows: where f is an element-wise activation function (tanh), [g(c 1 ); g(c 2 )] ∈ R 2n is the concatenation of the child vectors, W ∈ R n×2n is the composition matrix, b ∈ R n is the offset, and n is the dimensionality of the word embeddings.