<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sent2features(sentence, template):
 """ extract features in a sentence :type sentence: list of token, each token is a list of tag """

    return [word2features(sentence, i, template) for i in range(len(sentence))]