3. A method as recited in claim 1 , the learning comprising employing a metric learning method to optimize an objective function.
3. A method as recited in claim 1 , the learning comprising employing a metric learning method to optimize an objective function. 4. A method as recited in claim 3 , wherein the objective function is for learning a matrix M, and the objective function comprises: max M ≥ 0 ⁢ ∑ ( q i , q j ) ∈ S + ⁢ ⁢ ϕ ⁡ ( q i ) T ⁢ M ⁢ ⁢ ϕ ⁡ ( q j ) ϕ ⁡ ( q i ) T ⁢ M ⁢ ⁢ ϕ ⁡ ( q i ) ⁢ ϕ ⁡ ( q j ) T ⁢ M ⁢ ⁢ ϕ ⁡ ( q j ) - ⁢ ∑ ( q i , q j ) ∈ S - ⁢ ⁢ ϕ ⁡ ( q i ) T ⁢ M ⁢ ⁢ ϕ ⁡ ( q j ) ϕ ⁡ ( q i ) T ⁢ M ⁢ ⁢ ϕ ⁡ ( q i ) ⁢ ϕ ⁡ ( q j ) T ⁢ M ⁢ ⁢ ϕ ⁡ ( q j ) ⁢ λ ⁢  M  1 , where φ(q i ) is a vector representation of one of the queries q i in the n-gram space, φ(q j ) is a vector representation of one of the queries q j in the n-gram space, S + comprises the similar query pairs in the training data, S − comprises the dissimilar query pairs in the training data, ∥M∥ 1 denotes the sum of absolute values of elements in matrix M and λ is a scaling factor that controls sparsity of matrix M.