Package org.languagetool.tokenizers

Examples of org.languagetool.tokenizers.WordTokenizer


  private WordTokenizer tokenizer;

  @Override
  public void setUp() {
    tagger = new EsperantoTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here


  private WordTokenizer tokenizer;
     
  @Override
  public void setUp() {
    tagger = new RussianTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here

  private WordTokenizer tokenizer;
     
  @Override
  public void setUp() {
    tagger = new SlovakTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here

  private static final String FILE = "/lt/performance-test/en.txt";

  protected void testPerformance(LanguageModel model, int ngramLength) throws Exception {
    try (FileInputStream fis = new FileInputStream(FILE)) {
      String content = StringTools.readStream(fis, "UTF-8");
      WordTokenizer wordTokenizer = new WordTokenizer();
      List<String> words = wordTokenizer.tokenize(content);
      String prevPrevWord = null;
      String prevWord = null;
      int i = 0;
      long totalMicros = 0;
      for (String word : words) {
View Full Code Here

  private WordTokenizer tokenizer;

  @Override
  public void setUp() {
    tagger = createTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here

  private WordTokenizer tokenizer;

  @Override
  public void setUp() {
    tagger = new FrenchTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here

  private JLanguageTool lt;
 
  @Override
  public void setUp() throws IOException {
    tagger = new FrenchTagger();
    tokenizer = new WordTokenizer();
    French language = new French();
    sentenceTokenizer = new SRXSentenceTokenizer(language);
    disambiguator = new XmlRuleDisambiguator(language);
    disamb2 = new DemoDisambiguator();   
    lt = new JLanguageTool(language);
View Full Code Here

  private WordTokenizer tokenizer;
     
  @Override
  public void setUp() {
    tagger = new SwedishTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here

  private WordTokenizer tokenizer;
     
  @Override
  public void setUp() {
    tagger = new DutchTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here

  private WordTokenizer tokenizer;

  @Override
  public void setUp() {
    tagger = new ItalianTagger();
    tokenizer = new WordTokenizer();
  }
View Full Code Here

TOP

Related Classes of org.languagetool.tokenizers.WordTokenizer

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.