Package org.languagetool.language

Examples of org.languagetool.language.Ukrainian


  @Test
  public void testRule() throws IOException {
    final MixedAlphabetsRule rule = new MixedAlphabetsRule(TestTools.getMessages("uk"));

    final JLanguageTool langTool = new JLanguageTool(new Ukrainian());

    // correct sentences:
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("сміття")).length);
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("not mixed")).length);
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("123454")).length);
View Full Code Here


  public void testRule() throws IOException {
    PunctuationCheckRule rule = new PunctuationCheckRule(TestTools.getEnglishMessages());

    RuleMatch[] matches;
    JLanguageTool langTool = new JLanguageTool(new Ukrainian());
   
    // correct sentences:
    matches = rule.match(langTool.getAnalyzedSentence("Дві, коми. Ось: дві!!!"));
    assertEquals(0, matches.length);
View Full Code Here

    tagger = new UkrainianTagger();
    tokenizer = new UkrainianWordTokenizer();
  }

  public void testDictionary() throws IOException {
    TestTools.testDictionary(tagger, new Ukrainian());
  }
View Full Code Here

  @Test
  public void testRule() throws IOException {
    TokenAgreementRule rule = new TokenAgreementRule(TestTools.getMessages("uk"));

    JLanguageTool langTool = new JLanguageTool(new Ukrainian());

    // correct sentences:
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("без повного")).length);
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("без неба")).length);
View Full Code Here

import org.languagetool.rules.UppercaseSentenceStartRule;

public class UppercaseSentenceStartRuleTest extends TestCase {

  public void testUkrainian() throws IOException {
    final Ukrainian ukrainian = new Ukrainian();
    final UppercaseSentenceStartRule rule = new UppercaseSentenceStartRule(TestTools.getEnglishMessages(), ukrainian);
    final JLanguageTool lt = new JLanguageTool(ukrainian);

    assertEquals(0, rule.match(lt.getAnalyzedSentence("Автор написав це речення з великої літери.")).length);
View Full Code Here

  public void testRule() throws IOException {
    SimpleReplaceRule rule = new SimpleReplaceRule(TestTools.getEnglishMessages());

    RuleMatch[] matches;
    JLanguageTool langTool = new JLanguageTool(new Ukrainian());

    // correct sentences:
    matches = rule.match(langTool.getAnalyzedSentence("Ці рядки повинні збігатися."));
    assertEquals(0, matches.length);
View Full Code Here

public class MorfologikUkrainianSpellerRuleTest {

  @Test
  public void testMorfologikSpeller() throws IOException {
    MorfologikUkrainianSpellerRule rule = new MorfologikUkrainianSpellerRule (TestTools.getMessages("uk"), new Ukrainian());

    JLanguageTool langTool = new JLanguageTool(new Ukrainian());

    // correct sentences:
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("До вас прийде заввідділу!")).length);
    assertEquals(0, rule.match(langTool.getAnalyzedSentence(",")).length);
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("123454")).length);
View Full Code Here

TOP

Related Classes of org.languagetool.language.Ukrainian

Copyright © 2018 www.massapicom. 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.