Examples of IncorrectExample


Examples of org.languagetool.rules.IncorrectExample

    }

  }

  private IncorrectExample setExample() {
    IncorrectExample example = null;
    if (inCorrectExample) {
      example = new IncorrectExample(correctExample.toString());
    } else if (inIncorrectExample) {
      final String[] corrections = exampleCorrection.toString().split("\\|");
      if (corrections.length > 0 && corrections[0].length() > 0) {
        example = new IncorrectExample(incorrectExample.toString(), corrections);
      } else {
        example = new IncorrectExample(incorrectExample.toString());
      }
    }     
    correctExample = new StringBuilder();
    incorrectExample = new StringBuilder();
    exampleCorrection = new StringBuilder();
View Full Code Here

Examples of org.languagetool.rules.IncorrectExample

    } else if (qName.equals(EXAMPLE)) {
      if (inCorrectExample) {
        correctExamples.add(correctExample.toString());
      } else if (inIncorrectExample) {
        incorrectExamples
            .add(new IncorrectExample(incorrectExample.toString()));
      }
      inCorrectExample = false;
      inIncorrectExample = false;
      correctExample = new StringBuilder();
      incorrectExample = new StringBuilder();
View Full Code Here

Examples of org.languagetool.rules.IncorrectExample

      tokenCounter = 0;
    } else if (EXAMPLE.equals(qName)) {
      if (inCorrectExample) {
        correctExamples.add(correctExample.toString());
      } else if (inIncorrectExample) {
        final IncorrectExample example;
        final String[] corrections = exampleCorrection.toString().split("\\|");
        if (corrections.length > 0 && corrections[0].length() > 0) {
          example = new IncorrectExample(incorrectExample.toString(), corrections);
        } else {
          example = new IncorrectExample(incorrectExample.toString());
        }
        incorrectExamples.add(example);
      }
      inCorrectExample = false;
      inIncorrectExample = false;
View Full Code Here

Examples of org.languagetool.rules.IncorrectExample

    }

  }

  private IncorrectExample setExample() {
    IncorrectExample example = null;
    if (inCorrectExample) {
      example = new IncorrectExample(correctExample.toString());
    } else if (inIncorrectExample) {
      final String[] corrections = exampleCorrection.toString().split("\\|");
      if (corrections.length > 0 && corrections[0].length() > 0) {
        example = new IncorrectExample(incorrectExample.toString(), corrections);
      } else {
        example = new IncorrectExample(incorrectExample.toString());
      }
    }     
    correctExample = new StringBuilder();
    incorrectExample = new StringBuilder();
    exampleCorrection = new StringBuilder();
View Full Code Here

Examples of org.languagetool.rules.IncorrectExample

public class AfterTheDeadlineEvaluatorTest {
 
  @Test
  public void testIsExpectedErrorFound() throws XPathExpressionException {
    AfterTheDeadlineEvaluator evaluator = new AfterTheDeadlineEvaluator("fake");
    IncorrectExample example = new IncorrectExample("This <marker>is is</marker> a test");
    assertTrue(evaluator.isExpectedErrorFound(example, "<results><error><string>is is</string></error></results>"));
    assertFalse(evaluator.isExpectedErrorFound(example, "<results><error><string>This is</string></error></results>"));
    assertFalse(evaluator.isExpectedErrorFound(example, "<results></results>"));
    assertTrue(evaluator.isExpectedErrorFound(example,
            "<results>" +
View Full Code Here

Examples of org.languagetool.rules.IncorrectExample

    } else if (qName.equals(EXAMPLE)) {
      if (inCorrectExample) {
        correctExamples.add(correctExample.toString());
      } else if (inIncorrectExample) {
        incorrectExamples
            .add(new IncorrectExample(incorrectExample.toString()));
      }
      inCorrectExample = false;
      inIncorrectExample = false;
      correctExample = new StringBuilder();
      incorrectExample = new StringBuilder();
View Full Code Here

Examples of org.languagetool.rules.IncorrectExample

        break;
      case EXAMPLE:
        if (inCorrectExample) {
          correctExamples.add(correctExample.toString());
        } else if (inIncorrectExample) {
          final IncorrectExample example;
          final String[] corrections = exampleCorrection.toString().split("\\|");
          if (corrections.length > 0 && corrections[0].length() > 0) {
            example = new IncorrectExample(incorrectExample.toString(), corrections);
          } else {
            example = new IncorrectExample(incorrectExample.toString());
          }
          incorrectExamples.add(example);
        }
        inCorrectExample = false;
        inIncorrectExample = false;
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.