Examples of English


Examples of org.languagetool.language.English

public class TatoebaSentenceSourceTest {
 
  @Test
  public void testTatoebaSource() {
    InputStream stream = WikipediaSentenceSourceTest.class.getResourceAsStream("/org/languagetool/dev/wikipedia/tatoeba-en.txt");
    TatoebaSentenceSource source = new TatoebaSentenceSource(stream, new English());
    assertTrue(source.hasNext());
    assertThat(source.next().getText(), is("\"What is your wish?\" asked the little white rabbit."));
    assertThat(source.next().getText(), is("The mother wakes up her daughter."));
    assertThat(source.next().getText(), is("Ken beat me at chess."));
    assertFalse(source.hasNext());
View Full Code Here

Examples of org.languagetool.language.English

 
  public void testFilter() throws Exception {
    final String input = "How to?";

    final TokenStream stream = new AnyCharTokenizer(TEST_VERSION_CURRENT, new StringReader(input));
    final LanguageToolFilter filter = new LanguageToolFilter(stream, new JLanguageTool(new English()), false);
    //displayTokensWithFullDetails(filter);

    String start = "_POS_SENT_START";
    assertTokenStreamContents(filter,
        new String[] { start, "How", "_LEMMA_how", "_POS_WRB", "to",   "_LEMMA_to", "_POS_TO", "_LEMMA_to", "_POS_IN", "?",    "_POS_SENT_END" },
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.