1. A method for computing a language independent representation of a snippet comprising: receiving the snippet; building a dependency structure based on the received snippet, the dependency structure comprising multiple nodes; obtaining semantic and syntactic representations of leaf nodes of the dependency structure; and generating a semantic representation corresponding to a selected non-leaf node of the dependency structure by applying a semantic model to semantic and syntactic representations of parent nodes of the selected non-leaf node.