Examples of English


Examples of com.dawidweiss.carrot.util.tokenizer.languages.english.English

          // you have to download a separate Carrot2-component called
          // carrot2-stemmer-lametyzator.jar, put it in classpath
          // and add new Polish() below.
          new Language[]
          {
            new English(),
            new Dutch(),
            new French(),
            new German(),
            new Italian(),
            new Spanish()
View Full Code Here

Examples of com.dawidweiss.carrot.util.tokenizer.languages.english.English

          // you have to download a separate Carrot2-component called
          // carrot2-stemmer-lametyzator.jar, put it in classpath
          // and add new Polish() below.
          new Language[]
          {
            new English(),
            new Dutch(),
            new French(),
            new German(),
            new Italian(),
            new Spanish()
View Full Code Here

Examples of com.jgaap.languages.English

    canonicizers = new ArrayList<Canonicizer>();
    eventSets = new HashMap<EventDriver, EventSet>();
    results = new HashMap<AnalysisDriver, List<Pair<String,Double>>>();
    eventCullers = new ArrayList<EventCuller>();
    docType = Type.GENERIC;
    this.language = new English();
  }
View Full Code Here

Examples of language.English

      path = scan.nextLine().substring(5).trim();
      int l = Integer.parseInt(scan.nextLine().substring(5).trim());
      if(l == 0)
        lang = new Deutsch();
      else if(l == 1)
        lang = new English();
      else if(l == 2)
        lang = new Spanish();
      while(scan.hasNextLine())
        presets.add(scan.nextLine().split("=")[1]);
       
      scan.close();
    }
    catch(Exception exc){} 
   
    if(lang == null)
      lang = new English();
   
    try
    {
      if(!path.isEmpty())
        ffmpeg = new FFMpeg(path, lang, this);
View Full Code Here

Examples of org.languagetool.language.English

              match.getSuggestedReplacements());
    }
  }

  public void testEnglish() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new English());
    assertEquals(0, tool.check("A test that should not give errors.").size());
    assertEquals(1, tool.check("A test test that should give errors.").size());
    assertEquals(0, tool.check("I can give you more a detailed description.").size());
    assertEquals(10, tool.getAllRules().size());
    tool.activateDefaultPatternRules();
View Full Code Here

Examples of org.languagetool.language.English

    assertEquals(2, match.getLine());
    assertEquals(14, match.getColumn());   // TODO: should actually be 15, as in testPositionsWithEnglish()
  }

  public void testAnalyzedSentence() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new English());
    //test soft-hyphen ignoring:
    assertEquals("<S> This[this/DT]  is[be/VBZ]  a[a/DT]  test­ed[tested/JJ,test/VBD,test/VBN,test­ed]  sentence[sentence/NN,sentence/VB,sentence/VBP].[./.,</S>]", tool.getAnalyzedSentence("This is a test\u00aded sentence.").toString());
    //test paragraph ends adding
    assertEquals("<S> </S><P/> ", tool.getAnalyzedSentence("\n").toString());
 
View Full Code Here

Examples of org.languagetool.language.English

    //test paragraph ends adding
    assertEquals("<S> </S><P/> ", tool.getAnalyzedSentence("\n").toString());
 
 
  public void testParagraphRules() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new English());
   
    //run normally
    List<RuleMatch> matches = tool.check("(This is an quote.\n It ends in the second sentence.");
    assertEquals(2, matches.size());
    assertEquals(2, tool.getSentenceCount());
View Full Code Here

Examples of org.languagetool.language.English

    assertEquals("EN_UNPAIRED_BRACKETS", matches.get(0).getRule().getId());
    assertEquals(2, tool.getSentenceCount());
 
   
  public void testWhitespace() throws IOException {
    final JLanguageTool tool = new JLanguageTool(new English());
    final AnalyzedSentence raw = tool.getRawAnalyzedSentence("Let's do a \"test\", do you understand?");
    final AnalyzedSentence cooked = tool.getAnalyzedSentence("Let's do a \"test\", do you understand?");
    //test if there was a change
    assertFalse(raw.equals(cooked));
    //see if nothing has been deleted
View Full Code Here

Examples of org.languagetool.language.English

  }

  public void testOverlapFilter() throws IOException {
    final Category category = new Category("test category");
    final List<Element> elements1 = Arrays.asList(new Element("one", true, false, false));
    final PatternRule rule1 = new PatternRule("id1", new English(), elements1, "desc1", "msg1", "shortMsg1");
    rule1.setSubId("1");
    rule1.setCategory(category);

    final List<Element> elements2 = Arrays.asList(new Element("one", true, false, false), new Element("two", true, false, false));
    final PatternRule rule2 = new PatternRule("id1", new English(), elements2, "desc2", "msg2", "shortMsg2");
    rule2.setSubId("2");
    rule2.setCategory(category);

    final JLanguageTool tool = new JLanguageTool(new English());
    tool.addRule(rule1);
    tool.addRule(rule2);

    final List<RuleMatch> ruleMatches1 = tool.check("And one two three.");
    assertEquals("one overlapping rule must be filtered out", 1, ruleMatches1.size());
View Full Code Here

Examples of org.languagetool.language.English

public class EnglishRuleDisambiguator extends AbstractRuleDisambiguator {

  @Override
  protected Language getLanguage() {
    return new English();
  }
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.