Package org.languagetool.language

Examples of org.languagetool.language.Dutch


public class DutchRuleDisambiguator extends AbstractRuleDisambiguator {

  @Override
  protected Language getLanguage() {
    return new Dutch();
  }
View Full Code Here


    tagger = new DutchTagger();
    tokenizer = new WordTokenizer();
  }

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

  private GenericUnpairedBracketsRule rule;
  private JLanguageTool langTool;
 
  public void testDutchRule() throws IOException {
    setUpRule(new Dutch());
    // correct sentences:
    assertMatches("Het centrale probleem van het werk is de ‘dichterlijke kuischheid’.", 0);
    //this was a bug as there are several pairs that start with the same char:
    assertMatches(" Eurlings: “De gegevens van de dienst zijn van cruciaal belang voor de veiligheid van de luchtvaart en de scheepvaart”.", 0);
    assertMatches(" Eurlings: \u201eDe gegevens van de dienst zijn van cruciaal belang voor de veiligheid van de luchtvaart en de scheepvaart\u201d.", 0);
View Full Code Here

import java.io.IOException;

public class JLanguageToolTest extends TestCase {

  public void testDutch() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new Dutch());
    tool.activateDefaultPatternRules();
    assertEquals(0, tool.check("Een test, die geen fouten mag geven.").size());
    assertEquals(1, tool.check("Een test test, die een fout moet geven.").size());
    assertEquals(1, tool.check("Dit is fout.!").size());
    //test uppercasing rule:
View Full Code Here

import org.languagetool.language.Dutch;

public class DutchConcurrencyTest extends AbstractLanguageConcurrencyTest {
  @Override
  protected Language createLanguage() {
    return new Dutch();
  }
View Full Code Here

import java.io.IOException;

public class JLanguageToolTest extends TestCase {

  public void testDutch() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new Dutch());
    tool.activateDefaultPatternRules();
    assertEquals(0, tool.check("Een test, die geen fouten mag geven.").size());
    assertEquals(1, tool.check("Dit is fout.!").size());
    //test uppercasing rule:
    /* 
View Full Code Here

public class MorfologikDutchSpellerRuleTest {
 
  @Test
  public void testSpeller() throws IOException {
    Dutch language = new Dutch();
    MorfologikDutchSpellerRule rule = new MorfologikDutchSpellerRule(TestTools.getEnglishMessages(), language);
    JLanguageTool langTool = new JLanguageTool(language);

    assertEquals(0, rule.match(langTool.getAnalyzedSentence("Amsterdam")).length);
    assertEquals(0, rule.match(langTool.getAnalyzedSentence("ipv")).length)// in ignore.txt
View Full Code Here

    tagger = new DutchTagger();
    tokenizer = new WordTokenizer();
  }

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

import java.io.IOException;

public class UppercaseSentenceStartRuleTest extends TestCase {

  public void testDutchSpecialCases() throws IOException {
    final JLanguageTool lt = new JLanguageTool(new Dutch());
   
    assertEquals(1, lt.check("A sentence.").size());
    assertEquals(0, lt.check("'s Morgens...").size());

    assertEquals(2, lt.check("a sentence.").size());
View Full Code Here

*/
public class DutchWrongWordInContextRuleTest extends TestCase {

  public void testRule() throws IOException {
    DutchWrongWordInContextRule rule = new DutchWrongWordInContextRule(null);
    JLanguageTool langTool = new JLanguageTool(new Dutch());

    // Mine/Miene (example, can be removed)
//     assertEquals(0, rule.match(langTool.getAnalyzedSentence("Die Explosion der Mine.")).length); // correct sentence
//     assertEquals(1, rule.match(langTool.getAnalyzedSentence("Die Mienen sind gestern Abend explodiert.")).length); // wrong sentence
//     assertEquals("Minen", rule.match(langTool.getAnalyzedSentence("Er hat das mit den Mienen weggesprengt."))[0].getSuggestedReplacements().get(0)); // test suggestion
View Full Code Here

TOP

Related Classes of org.languagetool.language.Dutch

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.