[En] New Preposition Rule: accustomed to

I have a new preposition rule ‘accustomed to’ that I want to include in the LT.
Incorrect: We have become more accustomed of their routines.
Correct: We have become more accustomed to their routines.
Here is the code:

<!-- English rule, 2016-11-10 -->
<rule id="ACCUSTOMED_TO" name="accustomed to">
<pattern>
  <marker>
    <token>accustomed</token>
    <token negate='yes'>to<exception postag="PRP|PRP\$|CD" postag_regexp='yes'></exception></token>
  </marker>
</pattern>
<message>Did you mean: <suggestion>accustomed to</suggestion>?</message>
<short>Wrong preposition: accustomed to</short>
<example correction='accustomed to'>He is <marker>accustomed of</marker> playing football now.</example>
<example>He is accustomed to playing football now.</example>
</rule>

Please modify the code and publish it.

Added to my task list.

@Mike_Unwalla , Thanks. Please let me know when you will submit the code to GitHub. I think the code does not need much modification as this is a simple rule. But I’m in no hurry, do this at your convenience.

@RuleFreak , sorry for the delay in dealing with this rule.

I looked at sample sentences from COCA/NOW (http://corpus.byu.edu/) as a ‘sanity check’ for the rule. The rule gives many false warnings. For example, the following sentences are correct:

  • The trials in the Sahara accustomed both the athletes and the manager to high temperatures.
  • Players should be accustomed by now to the difficulty of …
  • … to much of the legislation to which we have become accustomed in modern times.
  • He had been accustomed in the previous five years to dealing with players on …

I cannot see a pattern that can prevent the false warnings, and thus I will not add the rule to the repository.

I have recently added two rules (DEPEND_ON and GRADUATE_FROM) where I faced a similar problem. You might want to add two antipatterns which will, of course, increase the probability of false negatives, but which will not cause false positives for the above examples

<rule id="ACCUSTOMED_TO" name="accustomed to">
    <antipattern>
        <token regexp="yes">to</token>
        <token regexp="yes" skip="-1">wh.*<exception scope="next">,</exception></token>
        <token>accustomed</token>
    </antipattern>
    <antipattern>
        <token skip="-1">accustomed<exception scope="next">,</exception></token>
        <token regexp="yes">to</token>
    </antipattern>
<pattern>
  <marker>
    <token>accustomed</token>
    <token negate='yes'>to<exception postag="PRP|PRP\$|CD" postag_regexp='yes'></exception></token>
  </marker>
</pattern>
<message>Did you mean: <suggestion>accustomed to</suggestion>?</message>
<short>Wrong preposition: accustomed to</short>
<example correction='accustomed to'>He is <marker>accustomed of</marker> playing football now.</example>
<example>He is accustomed to playing football now.</example>
<example>The trials in the Sahara accustomed both the athletes and the manager to high temperatures.</example>
<example>Players should be accustomed by now to the difficulty of ...</example> 
<example>... to much of the legislation to which we have become accustomed in modern times.</example>
<example>He had been accustomed in the previous five years to dealing with players on ...</example>
</rule>

@Mike_Unwalla, I understand that developing a pattern for this rule is somewhat difficult, but looking at your first sentence we get:

The trials in the Sahara accustomed both the athletes and the manager to high temperatures.

Here ‘accustomed’ and ‘to’ is associated somewhere.
Now I have a different question.
Can I run a dependency tracker to break the sentence into the subject, verb, object level?
We can run a dependency parser from here:
http://nlp.lsi.upc.edu/freeling/demo/demo.php
Many problems will be solved.

I don’t know. Possibly, @danielnaber or @MarcinMilkowski know.

@Knorr , many thanks. I will use your suggestion and add the rule.

Done (https://github.com/languagetool-org/languagetool/commit/2ef2729503b469e1333149490e5c5f811cf83061).