EXEMPLAR-BASED NATURAL LANGUAGE PROCESSING
First Claim
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; and
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.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and processes for exemplar-based natural language processing are provided. In one example process, a first text phrase can be received. It can be determined whether editing the first text phrase to match a second text phrase requires one or more of inserting, deleting, and substituting a word of the first text phrase. In response to determining that editing the first text phrase to match the second text phrase requires one or more of inserting, deleting, and substituting a word of the first text phrase, one or more of an insertion cost, a deletion cost, and a substitution cost can be determined. A semantic edit distance between the first text phrase and the second text phrase in a semantic space can be determined based on one or more of the insertion cost, the deletion cost, and the substitution cost.
-
Citations
21 Claims
-
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; andsubstituting 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; and 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. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
18. A method for processing natural language comprising:
at an electronic device; receiving a first text phrase; determining one or more word-level differences of the first text phrase with respect to a second text phrase, wherein the one or more word-level differences include one or more of; a first word-level difference comprising the second text phrase including a first word that does not correspond to any word of the first text phrase; a second word-level difference comprising the first text phrase including a second word that does not correspond to any word of the second text phrase; and a third word-level difference comprising the first text phrase including a third word that is different from a corresponding fourth word of the second text phrase; and determining a total semantic cost associated with the one or more word-level differences based on one or more of; a salience of the first word; a salience of the second word; a salience of the third word; a salience of the fourth word; and a semantic similarity between the third word and the fourth word in a semantic space; wherein a degree of semantic similarity between the first text phrase and the second text phrase is based on the total semantic cost. - View Dependent Claims (19)
-
20. A non-transitory computer-readable storage medium comprising computer-executable instructions for causing a processor to:
-
receive a first text phrase; determine whether editing the first text phrase to match a second text phrase requires one or more of; insert a first word into the first text phrase, wherein the second text phrase includes the first word; delete a second word from the first text phrase;
wherein the first text phrase includes the second word; andsubstitute 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; and determine, 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.
-
-
21. An electronic device comprising:
-
one or more processors; memory; and one or more programs, wherein the one or more program are stored in the memory and configured of be executed by the one or more processors, the one or more programs including instructions for; 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; andsubstituting 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; and 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.
-
Specification