Back to LanguageTool Homepage - Privacy - Imprint

Help: Inflection Flow Query: has vs have


(Tathagat Banerjee) #1

Hi,

I'm trying to implement a rule as below for a specific use case.

<!-- has the ability|capacity for|to -->
<rule>
  <pattern case_sensitive="no">
    <token inflected="yes">has</token>
    <token>the</token>
    <token inflected="yes" regexp="yes">ability|capacity</token>
    <token inflected="yes" regexp="yes">for|to</token>
  </pattern>
  <message>Make sentences concise by eliminating wordy phrases. Use can if possible.</message>
  <url>https://writing.wisc.edu/Handbook/CCS_wordyphrases.html</url>
</rule>

Using this rule, I try the sentence, 'Does he have the ability to commit violence?', and it does not work.

  1. Note I am making up this rule, there is an existing rule which handles this specific scenario, I'm trying to understand the logic.
  2. In the case above, it does not work because, from dictionary.dump, have has the inflection has, but has does not have any inflection.
  3. Therefore, to get any such rule to work, the base word has to be replaced with the inflected form of the word in the rule, and it does not work the other way around? Is this correct?

That is, setting <token inflection="yes">has</token> will not include have but setting <token inflection="yes">have</token> will include has due to the direction of the flow from inflected version -> base version?

Thanks so much,
Tat


(Daniel Naber) #2

You're right, whenever you use inflected="yes", you'll need to specify the base form of the word. I'll see if I can add some logic that throws a useful error in this case.


(Tathagat Banerjee) #3

Sorry, you mean inflected form of the word right? Above -

"you'll need to specify the base inflected form of the word"

So in the rule, i need to use have (inflected form), and it will work. But if i use has (base form) it will not work.

Thanks so much.

Tat


(Daniel Naber) #4

have is what I call the base form, see e.g. http://grammar-monster.com/glossary/base_form.htm


(Tathagat Banerjee) #5

Hi Daniel,

I had a look at the link, and then did some digging in dictionary.dump. I understand now. It is unfortunately somewhat counter intuitive in this case.

Thank you for explaining it. The heuristic I was using (in my head) was the smaller the word (has) is the base, and the bigger word (have) is the inflected. This is clearly not correct from the link you provided.

It makes more sense now. Thanks so much.

Tat