IP Library Granted Patent US 10,467,339
Granted Patent B1
US 10,467,339 · App. 16/022,408 · Granted Nov 5, 2019

Using machine learning and natural language processing to replace gender biased words within free-form text

Inventor: Weiwei Shen (Santa Clara, CA)
Assignee: SAP SE
G06F17/2735G06F17/274G06F17/2705G06F17/2795G06F3/0481G06F3/0484
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,467,339
App. No.
16/022,408
Granted
Nov 5, 2019
Kind
B1
Abstract

A classification engine classifies words into gender-biased or neutral classes and outputs classification labels and probabilities the words were correctly classified. A dictionary engine generates a set of gender-biased words based on their labels, if their probability exceeds a threshold, if they are defined within a set of definitions. For each such word, the dictionary engine parses the set of definitions to extract the most frequent meaning of that word in a part of speech; parses the set of definitions to extract a synonym for the most frequent meaning of that word in that part of speech; and parses the classification engine output to determine that synonym's classification label. A synonym is selected that is labeled in the neutral class as a replacement for the gender-biased word. A dictionary entry is generated that includes the word, the part of speech, and the synonym.

Claims (66)

1. A method for building a dictionary of replacement words for gender-biased words, the method comprising:

respectively classifying, by a classification engine of the computer system incorporating a machine learning model, words of a corpus into a male-biased class, a female-biased class, or a neutral class, the classification engine outputting each classified word, a label indicating the class into which the word is classified, and a probability that the word was correctly classified;

generating, by a dictionary engine of the computer system, a set of gender-biased words by selecting words that are labeled as being in the male-biased class or the female-biased class, for which the probability exceeds a first threshold, and that are defined within a set of definitions;

for each word of the set of gender-biased words, by the dictionary engine of the computer system:

parsing the set of definitions to extract the most frequent meaning of that word in a part of speech;

parsing the set of definitions to extract a synonym for the extracted most frequent meaning of that word in that part of speech;

parsing the output of the classification engine to determine the label indicating the class into which that synonym was labeled;

selecting at least one synonym that is labeled as being in the neutral class as a replacement for the word of the set of gender-biased words; and

generating a dictionary entry comprising the word, the part of speech, and the selected at least one synonym for that word.

2. The method of claim 1 , wherein generating the set of gender-biased words comprises, for each selected word that is labeled as being in the male-biased class or the female-biased class and for which the probability exceeds a threshold:

determining whether the set of definitions comprises a definition for that word; and

based upon the set of definitions not comprising a definition for that word, excluding that word from the set of gender-biased words.

3. The method of claim 1 , further comprising:

for each synonym that is labeled as being in the male-biased class or the female-biased class, parsing the output of the classification engine to determine the probability that the synonym was correctly classified; and

selecting at least one synonym that is labeled as being in the male-biased class or the female-biased class, based upon the probability that that synonym was correctly classified.

4. The method of claim 3 , wherein the at least one synonym that is labeled as being in the male-biased class or the female-biased class is selected based upon the probability being less than a second threshold.

5. The method of claim 4 , wherein the first and second thresholds are different than one another.

6. The method of claim 3 , wherein at least one synonym that is labeled as being in the male-biased class or the female-biased class is selected based upon the probability of that synonym being lower than the probability of another synonym.

7. The method of claim 1 , further comprising filtering out, by the dictionary engine of the computer system, any words from the set of gender-biased words that are stop words, include punctuations other than a dash, or include a number.

8. The method of claim 1 , further comprising deleting the dictionary entry based upon the part of speech being noun.

9. The method of claim 1 , further comprising:

receiving, in a first graphical user interface (GUI) forming part of an end-user layer of the computer system, first user input comprising free-form text;

respectively classifying, by the classification engine of the computer system incorporating the machine learning model, words of the free-form text into the male-biased class, the female-biased class, or the neutral class, at least one of the words of the free-form text being classified into the male-biased class or the female-biased class;

displaying, in the first GUI, the replacement word for at least one of the words classified into the male-biased class or the female-biased class;

receiving, in the first GUI, second user input revising the free-form text by selecting the displayed replacement word; and

posting, by the computer system, the revised free-form text to a web site for display in a second GUI forming part of the end-user layer of the computer system.

10. A computer system comprising:

at least one data processor; and

memory storing instructions which, when executed by the at least one data processor, result in operations comprising:

respectively classifying, by a classification engine of the computer system incorporating a machine learning model, words of a corpus into a male-biased class, a female-biased class, or a neutral class, the classification engine outputting each classified word, a label indicating the class into which the word is classified, and a probability that the word was correctly classified;

generating, by a dictionary engine of the computer system, a set of gender-biased words by selecting words that are labeled as being in the male-biased class or the female-biased class, for which the probability exceeds a first threshold, and that are defined within a set of definitions;

for each word of the filtered set of gender-biased words, by the dictionary engine of the computer system:

parsing the set of definitions to extract the most frequent meaning of that word in a part of speech;

parsing the set of definitions to extract a synonym for the extracted most frequent meaning of that word in that part of speech;

parsing the output of the classification engine to determine the label indicating the class into which that synonym was labeled;

selecting at least one synonym that is labeled as being in the neutral class as a replacement for the word of the filtered set of gender-biased words; and

outputting a dictionary entry comprising the word, the part of speech, and the selected at least one synonym for that word.

11. The computer system of claim 10 , wherein generating the set of gender-biased words comprises, for each selected word that is labeled as being in the male-biased class or the female-biased class and for which the probability exceeds a threshold:

determining whether the set of definitions comprises a definition for that word; and

based upon the set of definitions not comprising a definition for that word, excluding that word from the set of gender-biased words.

12. The computer system of claim 10 , the memory further storing instructions which, when executed by the at least one data processor, result in operations comprising:

for each synonym that is labeled as being in the male-biased class or the female-biased class, parsing the output of the classification engine to determine the probability that the synonym was correctly classified; and

selecting at least one synonym that is labeled as being in the male-biased class or the female-biased class, based upon the probability that that synonym was correctly classified.

13. The computer system of claim 12 , wherein the at least one synonym that is labeled as being in the male-biased class or the female-biased class is selected based upon the probability being less than a second threshold.

14. The computer system of claim 13 , wherein the first and second thresholds are different than one another.

15. The computer system of claim 14 , wherein at least one synonym that is labeled as being in the male-biased class or the female-biased class is selected based upon the probability of that synonym being lower than the probability of another synonym.

16. The computer system of claim 10 , the memory further storing instructions which, when executed by the at least one data processor, result in operations comprising filtering out, by the dictionary engine of the computer system, any words from the set of gender-biased words that are stop words, include punctuations other than a dash, or include a number.

17. The computer system of claim 10 , the memory further storing instructions which, when executed by the at least one data processor, result in operations comprising deleting the dictionary entry based upon the part of speech being noun.

18. The computer system of claim 10 , the memory further storing instructions which, when executed by the at least one data processor, result in operations comprising:

receiving, in a first graphical user interface (GUI) forming part of an end-user layer of the computer system, first user input comprising free-form text;

respectively classifying, by the classification engine of the computer system incorporating the machine learning model, words of the free-form text into the male-biased class, the female-biased class, or the neutral class, at least one of the words of the free-form text being classified into the male-biased class or the female-biased class;

displaying, in the first GUI, the replacement word for at least one of the words classified into the male-biased class or the female-biased class;

receiving, in the first GUI, second user input revising the free-form text by selecting the displayed replacement word; and

posting, by the computer system, the revised free-form text to a web site for display in a second GUI forming part of the end-user layer of the computer system.

19. A non-transitory computer-readable medium storing instructions which, when executed by at least one data processor of a computer system, result in operations comprising:

respectively classifying, by a classification engine of the computer system incorporating a machine learning model, words of a corpus into a male-biased class, a female-biased class, or a neutral class, the classification engine outputting each classified word, a label indicating the class into which the word is classified, and a probability that the word was correctly classified;

generating, by a dictionary engine of the computer system, a set of gender-biased words by selecting words that are labeled as being in the male-biased class or the female-biased class, for which the probability exceeds a first threshold, and that are defined within a set of definitions;

for each word of the filtered set of gender-biased words, by the dictionary engine of the computer system:

parsing the set of definitions to extract the most frequent meaning of that word in a part of speech;

parsing the set of definitions to extract a synonym for the extracted most frequent meaning of that word in that part of speech;

parsing the output of the classification engine to determine the label indicating the class into which that synonym was labeled;

selecting at least one synonym that is labeled as being in the neutral class as a replacement for the word of the filtered set of gender-biased words; and

outputting a dictionary entry comprising the word, the part of speech, and the selected at least one synonym for that word.

20. The computer-readable medium of claim 19 , further storing instructions which, when executed by the at least one data processor, result in operations comprising:

for each synonym that is labeled as being in the male-biased class or the female-biased class, parsing the output of the classification engine to determine the probability that the synonym was correctly classified; and

selecting at least one synonym that is labeled as being in the male-biased class or the female-biased class, based upon the probability that that synonym was correctly classified.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 28, 2018
From: SHEN, WEIWEI
To: SAP SE
Reel/Frame 046233/0889 →
Cited By (12)
US 12,197,842 US 12,229,179 US 12,229,839 US 12,367,349 US 12,423,526 US 12,482,164 US 12,505,282 US 12,511,139 US 12,513,099 US 12,561,684 US 12,614,036 US 12,645,877