Package org.languagetool.language

Examples of org.languagetool.language.Demo


    }
    return getPatternRule(elements);
  }

  private PatternRule getPatternRule(List<Element> elements) {
    return new PatternRule("", new Demo(), elements, "my description", "my message", "short message");
  }
View Full Code Here


public class AbstractPatternRulePerformerTest {

  @Test
  public void testTestAllReadings() throws Exception {
    Element element1 = new Element("foo", false, false, false);
    PatternRule simpleRule = new PatternRule("FAKE", new Demo(), Collections.singletonList(element1), "descr", "message", "short");
    ElementMatcher elemMatcher = new ElementMatcher(element1);

    AbstractPatternRulePerformer p = new MockAbstractPatternRulePerformer(simpleRule, null);

    assertTrue(p.testAllReadings(tokenReadings("foo", null), elemMatcher, null, 0, 0, 0));
View Full Code Here

  @Test
  public void testTestAllReadingsWithChunks() throws Exception {
    Element chunkElement = new Element(null, false, false, false);
    chunkElement.setChunkElement(new ChunkTag("myChunk"));
    PatternRule simpleRule = new PatternRule("FAKE", new Demo(), Collections.singletonList(chunkElement), "descr", "message", "short");
    ElementMatcher elemMatcher = new ElementMatcher(chunkElement);

    AbstractPatternRulePerformer p = new MockAbstractPatternRulePerformer(simpleRule, null);

    assertFalse(p.testAllReadings(tokenReadings("bar", null), elemMatcher, null, 0, 0, 0));
View Full Code Here

TOP

Related Classes of org.languagetool.language.Demo

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.