Examples of toFinalString()


Examples of org.languagetool.rules.patterns.Match.toFinalString()

    Match match = getMatch("POS1", "POS2", true);
    final Polish polish = new Polish();
    match.setSynthesizer(polish.getSynthesizer());
    match.setToken(getAnalyzedTokenReadings("inflectedform11", "POS1", "Lemma1"));
    //getting empty strings, which is what we want
    assertEquals("[]", Arrays.toString(match.toFinalString(polish)));

    // contrast with a speller = false!
    match = getMatch("POS1", "POS2", false);
    match.setSynthesizer(polish.getSynthesizer());
    match.setToken(getAnalyzedTokenReadings("inflectedform11", "POS1", "Lemma1"));
View Full Code Here

Examples of org.languagetool.rules.patterns.Match.toFinalString()

    // contrast with a speller = false!
    match = getMatch("POS1", "POS2", false);
    match.setSynthesizer(polish.getSynthesizer());
    match.setToken(getAnalyzedTokenReadings("inflectedform11", "POS1", "Lemma1"));
    assertEquals("[(inflectedform11)]", Arrays.toString(match.toFinalString(polish)));

    //and now a real word - we should get something
    match = getMatch("subst:sg:acc.nom:m3", "subst:sg:gen:m3", true);
    match.setSynthesizer(polish.getSynthesizer());
    match.setToken(getAnalyzedTokenReadings("AON", "subst:sg:acc.nom:m3", "AON"));
View Full Code Here

Examples of org.languagetool.rules.patterns.Match.toFinalString()

    //and now a real word - we should get something
    match = getMatch("subst:sg:acc.nom:m3", "subst:sg:gen:m3", true);
    match.setSynthesizer(polish.getSynthesizer());
    match.setToken(getAnalyzedTokenReadings("AON", "subst:sg:acc.nom:m3", "AON"));
    assertEquals("[AON-u]", Arrays.toString(match.toFinalString(polish)));

    //and now pure text changes       
    match = getTextMatch("^(.*)$", "$0-u", true);
    match.setSynthesizer(polish.getSynthesizer());
    match.setLemmaString("AON");
View Full Code Here

Examples of org.languagetool.rules.patterns.Match.toFinalString()

    //and now pure text changes       
    match = getTextMatch("^(.*)$", "$0-u", true);
    match.setSynthesizer(polish.getSynthesizer());
    match.setLemmaString("AON");
    assertEquals("[AON-u]", Arrays.toString(match.toFinalString(polish)));
    match.setLemmaString("batalion");
    //should be empty
    assertEquals("[]", Arrays.toString(match.toFinalString(polish)));
    match.setLemmaString("ASEAN");
    //and this one not
View Full Code Here

Examples of org.languagetool.rules.patterns.Match.toFinalString()

    match.setSynthesizer(polish.getSynthesizer());
    match.setLemmaString("AON");
    assertEquals("[AON-u]", Arrays.toString(match.toFinalString(polish)));
    match.setLemmaString("batalion");
    //should be empty
    assertEquals("[]", Arrays.toString(match.toFinalString(polish)));
    match.setLemmaString("ASEAN");
    //and this one not
    assertEquals("[ASEAN-u]", Arrays.toString(match.toFinalString(polish)));
  }
}
View Full Code Here

Examples of org.languagetool.rules.patterns.Match.toFinalString()

    match.setLemmaString("batalion");
    //should be empty
    assertEquals("[]", Arrays.toString(match.toFinalString(polish)));
    match.setLemmaString("ASEAN");
    //and this one not
    assertEquals("[ASEAN-u]", Arrays.toString(match.toFinalString(polish)));
  }
}
View Full Code Here

Examples of org.languagetool.rules.patterns.MatchState.toFinalString()

    Match match = getMatch("POS1", "POS2", true);
    final Polish polish = new Polish();
    MatchState matchState = new MatchState(match, polish.getSynthesizer());
    matchState.setToken(getAnalyzedTokenReadings("inflectedform11", "POS1", "Lemma1"));
    //getting empty strings, which is what we want
    assertEquals("[]", Arrays.toString(matchState.toFinalString(polish)));

    // contrast with a speller = false!
    match = getMatch("POS1", "POS2", false);
    matchState = new MatchState(match, polish.getSynthesizer());
    matchState.setToken(getAnalyzedTokenReadings("inflectedform11", "POS1", "Lemma1"));
View Full Code Here

Examples of org.languagetool.rules.patterns.MatchState.toFinalString()

    // contrast with a speller = false!
    match = getMatch("POS1", "POS2", false);
    matchState = new MatchState(match, polish.getSynthesizer());
    matchState.setToken(getAnalyzedTokenReadings("inflectedform11", "POS1", "Lemma1"));
    assertEquals("[(inflectedform11)]", Arrays.toString(matchState.toFinalString(polish)));

    //and now a real word - we should get something
    match = getMatch("subst:sg:acc.nom:m3", "subst:sg:gen:m3", true);
    matchState = new MatchState(match, polish.getSynthesizer());
    matchState.setToken(getAnalyzedTokenReadings("AON", "subst:sg:acc.nom:m3", "AON"));
View Full Code Here

Examples of org.languagetool.rules.patterns.MatchState.toFinalString()

    //and now a real word - we should get something
    match = getMatch("subst:sg:acc.nom:m3", "subst:sg:gen:m3", true);
    matchState = new MatchState(match, polish.getSynthesizer());
    matchState.setToken(getAnalyzedTokenReadings("AON", "subst:sg:acc.nom:m3", "AON"));
    assertEquals("[AON-u]", Arrays.toString(matchState.toFinalString(polish)));

    //and now pure text changes       
    match = getTextMatch("^(.*)$", "$0-u", true);
    match.setSynthesizer(polish.getSynthesizer());
    match.setLemmaString("AON");
View Full Code Here

Examples of org.languagetool.rules.patterns.MatchState.toFinalString()

    //and now pure text changes       
    match = getTextMatch("^(.*)$", "$0-u", true);
    match.setSynthesizer(polish.getSynthesizer());
    match.setLemmaString("AON");
    matchState = new MatchState(match, polish.getSynthesizer());
    assertEquals("[AON-u]", Arrays.toString(matchState.toFinalString(polish)));
    match.setLemmaString("batalion");
    //should be empty
    matchState = new MatchState(match, polish.getSynthesizer());
    assertEquals("[]", Arrays.toString(matchState.toFinalString(polish)));
    match.setLemmaString("ASEAN");
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.