class PreReformPortugueseDashRule extends AbstractDashRule {

  private static final Pattern PATTERN = Pattern.compile("[a-zA-ZÂâÃãÇçÊêÓóÔôÕõü]");

  private static volatile AhoCorasickDoubleArrayTrie<String> trie;
  
  public PreReformPortugueseDashRule(ResourceBundle messages) {
    super(messages);
    setLocQualityIssueType(ITSIssueType.Typographical);
  }

  @Override
  public String getId() {
    return "PT_PREAO_DASH_RULE";
  }

  @Override
  public String getDescription() {
    return "Travessões no lugar de hífens";
  }

  @Override
  public String getMessage() {
    return "Um travessão foi utilizado em vez de um hífen.";
  }

  @Override
  protected boolean isBoundary(String s) {
    return !PATTERN.matcher(s).matches();  // chars from http://unicode.e-workers.de/portugiesisch.php
  }

  @Override
  protected AhoCorasickDoubleArrayTrie<String> getCompoundsData() {<FILL_FUNCTION_BODY>}

}

    AhoCorasickDoubleArrayTrie<String> data = trie;
    if (data == null) {
      synchronized (PreReformPortugueseDashRule.class) {
        data = trie;
        if (data == null) {
          trie = data = loadCompoundFile("/pt/pre-reform-compounds.txt");
        }
      }
    }
    return data;
  
<methods>public void <init>(java.util.ResourceBundle) ,public int estimateContextForSureMatch() ,public abstract java.lang.String getDescription() ,public java.lang.String getId() ,public abstract java.lang.String getMessage() ,public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence) throws java.io.IOException<variables>