Package org.languagetool.language

Source Code of org.languagetool.language.AustralianEnglish

/* LanguageTool, a natural language style checker
* Copyright (C) 2012 Marcin MiƂkowski (http://www.languagetool.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
* USA
*/

package org.languagetool.language;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;

import org.languagetool.rules.Rule;
import org.languagetool.rules.en.MorfologikAustralianSpellerRule;

public class AustralianEnglish extends English {

  @Override
  public final String[] getCountries() {
    return new String[]{"AU"};
  }

  @Override
  public final String getName() {
    return "English (Australian)";
  }

  @Override
  public List<Rule> getRelevantRules(ResourceBundle messages) throws IOException {
    final List<Rule> rules = new ArrayList<>();
    rules.addAll(super.getRelevantRules(messages));   
    // Australian English speller...
    rules.add(new MorfologikAustralianSpellerRule(messages, this));
    return rules;
  }

}
TOP

Related Classes of org.languagetool.language.AustralianEnglish

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.