Back to LanguageTool Homepage - Privacy - Imprint

Remove gonna as a suggestion for VBG


(Nicholas Walker) #1

I am working on this rule in English:

		  <rule id="PRESENT_PARTICPLE_NEEDED" name="Parallelism error">
        <pattern>
		<token regexp="yes">like|love|hate|dislike|enjoy|appreciate</token>
		  <token postag="VBG"></token>
		  <token postag="IN"></token>
		  <token postag_regexp="yes" postag="NN.*"></token>
		  <token postag="IN"></token>
		  <token postag_regexp="yes" postag="NN.*"></token>
		  <token>,</token>
		  <marker><token postag_regexp="yes" postag="VB|VBP"></token></marker>
		  <token>to</token>
		   <token postag_regexp="yes" postag="NN.*"></token>
		  <token postag_regexp="yes" postag="CC|IN|SENT_END|,"></token>
          </pattern>
        <message>Use a present participle to keep your series parallel. Revise: <suggestion><match no="8" postag="VBG"/></suggestion>.</message>

        <example correction="going" type="incorrect">I like staying at home for cooking, <marker>go</marker> to the cinema, and eating at restaurants.</example>
      </rule>

The problem is that LT offers “going” and “gonna” as VBG for “go.” I do bot want to suggest “gonna.”

How can I remove “gonna” so that it never appears as a suggestion without having to write a rule specifically for the token “go.”


(Daniel Naber) #2

I don’t think there’s a way to remove it only from this rule’s suggestions. But as it’s colloquial, the question is whether it should be suggested at all. If not, it can be removed by adding it to removed.txt.


(Nicholas Walker) #3

Thanks for your reply.

Adding “gonna” to the removed.txt file (gonna (tab) go (tab) VBG) has the following effect.
In the desktop Jar, CTRL + T reveals that “gonna” is now tagged with “null” but the suggestion continues for match no=“8” postag=“VBG” as “going, gonna”.

I don’t ever want to suggest “gonna” as the VBG of “go”. Is there somewhere else I can remove it?


(Daniel Naber) #4

Sorry, I forgot that the synthesizer (which finds all the forms of a lemma) does not consider remove.txt. What you could try is this (not tested): add gonna to prohibited.txt and add suppress_misspelled="yes" to your match element.


(Nicholas Walker) #5

Hello Daniel,

Thanks for your suggestion. It works, sort of. Here’s what happens when I add “gonna” to the prohibit.txt file and then add suppress_misspelled=“yes” to the match tag.

Starting check in English (American)…

  1. Line 1, column 37
    Message: Use a present participle to keep your series parallel. Revise: going, . (deactivate)
    Correction: going;

If you look closely, the suggestion gives “going” + “,” + " ".

It is not ideal. I would prefer for the rule not to suppress gonna but rather for LT to assign a different postag to “gonna” entirely (postag=“NONSTANDARD” maybe?).

Here is another example of a rule which illustrates more clearly why the prohibit.txt workaround is less than ideal for my purposes.

		<rule id="PRESENT_PARTICPLE_NEEDED_2" name="Parallelism error 2">
         <pattern>
		  <token inflected="yes" regexp="yes">like|love|enjoy|appreciate</token>
		  <token postag="VBG"></token>
		 <token></token>
		  <token>,</token>
		 <marker><token postag="VB"></token></marker>
		 <token></token>
		  <token>,</token>
		  <marker><token postag="VB"></token></marker>
		  		</pattern>
        <message>Keep the items in your series parallel: <suggestion><match no="2" postag="VBG" suppress_misspelled="yes"/>, <match no="5" postag="VBG" suppress_misspelled="yes"/>, <match no="8" postag="VBG" suppress_misspelled="yes"/></suggestion>.</message>
		<short>Parallelism</short>
<example>I like playing sports, listen TV, go see my firends.</example>
            </rule>

Starting check in English (American)…

  1. Line 2, column 24
    Message: Keep the items in your series parallel: playing, listening, going, playing, listening, . (deactivate)
    Correction: playing, listening, going; playing, listening,
    Context: …ith my friends. I like playing sports, listen TV, go see my firends.

As you can see, the LT system returns the first two items in the suggestion but leaves out the prohibited word. This makes for a ponderous feedback message. One could say that I am overloading the error detection rule by offering three forms in the suggestion. I might have to reconsider my formulation of this rule. The reason why I have made it this way is to illustrate the parallel series using the learner’s own sentence.


(Daniel Naber) #6

You don’t need to have the suggestions in <message>. Maybe this work better in your case?

<message>the message</message>
<suggestion suppress_misspelled="yes">suggestion 1</suggestion>
<suggestion suppress_misspelled="yes">suggestion 2</suggestion>
<suggestion suppress_misspelled="yes">suggestion 3</suggestion>