1. A method for processing natural language comprising: at an electronic device: receiving a first text phrase; determining whether editing the first text phrase to match a second text phrase requires one or more of: inserting a first word into the first text phrase, wherein the second text phrase includes the first word; deleting a second word from the first text phrase; wherein the first text phrase includes the second word; and substituting a third word of the first text phrase with a fourth word, wherein the second text phrase includes the fourth word; in response to determining that editing the first text phrase to match the second text phrase requires one or more of inserting the first word into the first text phrase, deleting the second word from the first text phrase, and substituting the third word of the first text phrase with the fourth word, determining one or more of: an insertion cost associated with inserting the first word into the first text phrase; a deletion cost associated with deleting the second word from the first text phrase; and a substitution cost associated with substituting the third word of the first text phrase with the fourth word; determining, based on the one or more of the insertion cost, the deletion cost, and the substitution cost, a semantic edit distance between the first text phrase and the second text phrase in a semantic space, wherein a degree of semantic similarity between the first text phrase and the second text phrase is based on the semantic edit distance; determining, based on the degree of semantic similarity between the first text phrase and the second text phrase, a first intent associated with the first text phrase; and performing, based on the first intent, a task associated with the first text phrase.