Identifying templates with parameters in text fragments
You might consider using word2vec to identify phrases in the corpus.  The presence of a phrase (instead of single tokens) is likely to indicate a 'template.'  

From here, the tokens most similar to your template phrase are likely to be the values for your parameters.