Package org.languagetool.language

Examples of org.languagetool.language.Spanish


public class SpanishRuleDisambiguator extends AbstractRuleDisambiguator {

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


public class ElwithFemRuleTest extends TestCase {

  public void testRule() throws IOException {
    ElwithFemRule rule = new ElwithFemRule(null);
    RuleMatch[] matches;
    JLanguageTool langTool = new JLanguageTool(new Spanish());
    // correct sentences:
    matches = rule.match(langTool.getAnalyzedSentence("El alma inmortal."));
    assertEquals(0, matches.length);
    matches = rule.match(langTool.getAnalyzedSentence("Tomaré un agua."));
    assertEquals(0, matches.length);
View Full Code Here

  private GenericUnpairedBracketsRule rule;
  private JLanguageTool langTool;
 
  public void testSpanishRule() throws IOException {
    setUpRule(new Spanish());
    // correct sentences:
    assertMatches("Soy un hombre (muy honrado).", 0);
    // incorrect sentences:
    assertMatches("De dónde vas?", 1);
    assertMatches("¡Atención", 1);
View Full Code Here

import org.languagetool.language.Spanish;

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

  private GenericUnpairedBracketsRule rule;
  private JLanguageTool langTool;
 
  public void testSpanishRule() throws IOException {
    setUpRule(new Spanish());
    // correct sentences:
    assertMatches("Soy un hombre (muy honrado).", 0);
    // incorrect sentences:
    assertMatches("De dónde vas?", 1);
    assertMatches("¡Atención", 1);
View Full Code Here

public class MorfologikSpanishSpellerRuleTest {

  @Test
  public void testMorfologikSpeller() throws IOException {
    Spanish language = new Spanish();
    MorfologikSpanishSpellerRule rule = new MorfologikSpanishSpellerRule(TestTools.getMessages("en"), language);
    JLanguageTool langTool = new JLanguageTool(language);

    assertEquals(0, rule.match(langTool.getAnalyzedSentence("Escriba un texto aquí. LanguageTool le ayudará a afrontar algunas dificultades propias de la escritura.")).length);
   
View Full Code Here

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

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

TOP

Related Classes of org.languagetool.language.Spanish

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.