1. A computer-implemented method comprising: receiving a query; identifying an original term occurring in the query; determining one or more substitution contexts for the original term, wherein a substitution context includes one or more context terms and an indication of a position in the query of the original term and the one or more context terms; determining a score for each substitution context of the one or more substitution contexts; selecting one or more substitution contexts based on the score of each substitution context; and determining one or more substitute terms for the original term in the context of the one or more selected substitution contexts.