Examples of Romanian


Examples of org.languagetool.language.Romanian

public class RomanianRuleDisambiguator extends AbstractRuleDisambiguator {

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

Examples of org.languagetool.language.Romanian

  private GenericUnpairedBracketsRule rule;
  private JLanguageTool langTool;
 
  public void testRomanianRule() throws IOException {
    setUpRule(new Romanian());
    // correct sentences:
    assertMatches("A fost plecat (pentru puțin timp).", 0);
    assertMatches("Nu's de prin locurile astea.", 0);
    assertMatches("A fost plecat pentru „puțin timp”.", 0);
    assertMatches("A fost plecat „pentru... puțin timp”.", 0);
View Full Code Here

Examples of org.languagetool.language.Romanian

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    rule = new SimpleReplaceRule(TestTools.getMessages("ro"));
    langTool = new JLanguageTool(new Romanian());
  }
View Full Code Here

Examples of org.languagetool.language.Romanian

public class CompoundRuleTest extends CompoundRuleTestAbs {

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    langTool = new JLanguageTool(new Romanian());
    rule = new CompoundRule(TestTools.getMessages("ro"));
  }
View Full Code Here

Examples of org.languagetool.language.Romanian

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

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

Examples of org.languagetool.language.Romanian

    assertTrue(!check(german, "bla <script>").contains("<script>"));

    // other tests for special characters
    final String germanSpecialChars = check(german, "ein kleiner test. Und wieder Erwarten noch was: öäüß+ öäüß.");
    assertTrue("Expected special chars, got: '" + germanSpecialChars + "'", germanSpecialChars.contains("öäüß+"));
    final String romanianSpecialChars = check(new Romanian(), "bla bla șțîâă șțîâă și câteva caractere speciale");
    assertTrue("Expected special chars, got: '" + romanianSpecialChars + "'", romanianSpecialChars.contains("șțîâă"));
    final Polish polish = new Polish();
    final String polishSpecialChars = check(polish, "Mówiła długo, żeby tylko mówić mówić długo.");
    assertTrue("Expected special chars, got: '" + polishSpecialChars+ "'", polishSpecialChars.contains("mówić"));
    // test http POST
    assertTrue(checkByPOST(new Romanian(), "greșit greșit").contains("greșit"));
    // test supported language listing
    final URL url = new URL("http://localhost:" + DEFAULT_PORT + "/Languages");
    final String languagesXML = StringTools.streamToString((InputStream) url.getContent(), "UTF-8");
    if (!languagesXML.contains("Romanian") || !languagesXML.contains("English")) {
      fail("Error getting supported languages: " + languagesXML);
View Full Code Here

Examples of org.languagetool.language.Romanian

import org.languagetool.language.Romanian;

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

Examples of org.languagetool.language.Romanian

  private GenericUnpairedBracketsRule rule;
  private JLanguageTool langTool;
 
  public void testRomanianRule() throws IOException {
    setUpRule(new Romanian());
    // correct sentences:
    assertMatches("A fost plecat (pentru puțin timp).", 0);
    assertMatches("Nu's de prin locurile astea.", 0);
    assertMatches("A fost plecat pentru „puțin timp”.", 0);
    assertMatches("A fost plecat „pentru... puțin timp”.", 0);
View Full Code Here

Examples of org.languagetool.language.Romanian

  @Override
  public void setUp() {
    tagger = new RomanianTagger();
    tokenizer = new RomanianWordTokenizer();
    Romanian language = new Romanian();
    sentenceTokenizer = new SRXSentenceTokenizer(language);
    disambiguator = new XmlRuleDisambiguator(language);
    disamb2 = new DemoDisambiguator();
  }
View Full Code Here

Examples of org.languagetool.language.Romanian

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

  public void testDictionary() throws IOException {
    TestTools.testDictionary(tagger, new Romanian());
  }
View Full Code Here
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.