def predict_next_word(self, sentence):
    dy.renew_cg()
    init_state = self.builder.initial_state()
    R = dy.parameter(self.R)
    bias = dy.parameter(self.bias)
    state = init_state
    for cw in sentence:
        x_t = dy.lookup(self.lookup, int(cw))
        state = state.add_input(x_t)
    y_t = state.output()
    r_t = (bias + (R * y_t))
    prob = dy.softmax(r_t)
    return prob
def predict_next_word(self, sentence):
    dy.renew_cg()
    init_state = self.builder.initial_state()
    R = dy.parameter(self.R)
    bias = dy.parameter(self.bias)
    state = init_state
    for cw in sentence:
        x_t = dy.lookup(self.lookup, int(cw))
        state = state.add_input(x_t)
    y_t = state.output()
    r_t = (bias + (R * y_t))
    prob = dy.softmax(r_t)
    return prob