5. A method as recited in claim 1 , the learning comprising optimizing an objective function to learn a matrix, and the method further comprising indexing a collection of queries for the transformed n-gram space using a high-dimensional indexing technique based at least in part on the learned matrix.
5. A method as recited in claim 1 , the learning comprising optimizing an objective function to learn a matrix, and the method further comprising indexing a collection of queries for the transformed n-gram space using a high-dimensional indexing technique based at least in part on the learned matrix. 6. A method as recited in claim 5 , wherein the high-dimensional indexing technique comprises use of Locality Sensitive Hashing (LSH) for generating locality sensitive hash functions that are based at least in part on a cosine similarity measured in the transformed n-gram space.