1. A computer-implemented method, comprising: identifying a first query and a second query from a same user session; identifying first related queries associated with the first query and second related queries associated with the second query, each of the first related queries associated with a relatedness weight indicating a strength of a relation between the first query and the respective first related query, and each of the second related queries associated with the relatedness weight indicating the weight of the relation between the second query and the respective second related query; identifying one or more first features for the first query, each first feature including at least one term from one of the first related queries; identifying one or more second features for the second query, each second feature including at least one term from one of the second related queries; creating a first feature vector for the first query, the first feature vector including one or more terms from the first related queries, and for each term, including the relatedness weight associated with the respective first related query that includes the respective term; creating a second feature vector for second query, the second feature vector including one or more terms from the second related queries, and for each term, including the relatedness weight associated with the respective second related query that includes the respective term; comparing the first feature vector and the second feature vector to determine a similarity of the first query and the second query; associating the first query with the second query as a keyword based on a determination that the similarity exceeds a threshold; identifying an electronic advertisement responsive to the second query based on the associating; and providing the electronic advertisement for display on a user device.