title: Finding gender related words in a text file
body: <p>So let say, I have the following statement as <code>str</code> = <code>What recent discussions she has had with the Secretary of State for Work and Pensions on the effect of that Department’s welfare policies on women</code></p>
  <p>In the statement, you can clearly see that the question addressed to the woman by a word such as 'she'. How can I find female-specific words in a given text (see above text for example) and for how many times they have been used using python.
  For example</p>
  <pre><code>maleWords = '[He, his]'
  femaleWords = '[She,her]'
  
  word=&quot;What recent discussions she has had with the Secretary of State for Work and Pensions on the effect of that Department’s welfare policies on women&quot;
  </code></pre>
  <p>maleCount = sum(1 if word in maleWords else 0 for word in maleWords)
  femaleCount = sum(1 if word in femaleWords else 0 for word in femaleWords)</p>
  <p>target_gender = 'male' if maleCount &gt;= femaleCount else 'female'
  print(f&quot;text's target gender is {target_gender}&quot;)</p>
  <p>But the result showing target gender is male while by looking at sentence target gender is female.</p>