Package opennlp.tools.formats

Examples of opennlp.tools.formats.DirectorySampleStream


  public ObjectStream<Parse> create(String[] args) {
   
    Parameters params = ArgumentParser.parse(args, Parameters.class);

   
    return new ConstitParseSampleStream(new FileToByteArraySampleStream(new DirectorySampleStream(params.getData(),
        null, false)));
  }
View Full Code Here


    TokenizerModel tokenizerModel = new TokenizerModelLoader().load(params.getTokenizerModel());
    Tokenizer tokenizer = new TokenizerME(tokenizerModel);

    ObjectStream<String> mucDocStream = new FileToStringSampleStream(
        new DirectorySampleStream(params.getData(), new FileFilter() {

          public boolean accept(File file) {
            return file.getName().toLowerCase().endsWith(".sgm");
          }
        }, false), Charset.forName("UTF-8"));
View Full Code Here

   
    TokenizerModel tokenizerModel = new TokenizerModelLoader().load(params.getTokenizerModel());
    Tokenizer tokenizer = new TokenizerME(tokenizerModel);
   
    ObjectStream<String> mucDocStream = new FileToStringSampleStream(
        new DirectorySampleStream(params.getData(), new FileFilter() {
         
          public boolean accept(File file) {
            return file.getName().toLowerCase().endsWith(".sgm");
          }
        }, false), Charset.forName("UTF-8"));
View Full Code Here

  public ObjectStream<Parse> create(String[] args) {

    Parameters params = ArgumentParser.parse(args, Parameters.class);


    return new ConstitParseSampleStream(new FileToByteArraySampleStream(new DirectorySampleStream(params.getData(),
        null, false)));
  }
View Full Code Here

    TokenizerModel tokenizerModel = new TokenizerModelLoader().load(params.getTokenizerModel());
    Tokenizer tokenizer = new TokenizerME(tokenizerModel);

    ObjectStream<String> mucDocStream = new FileToStringSampleStream(
        new DirectorySampleStream(params.getData(), new FileFilter() {

          public boolean accept(File file) {
            return StringUtil.toLowerCase(file.getName()).endsWith(".sgm");
          }
        }, false), Charset.forName("UTF-8"));
View Full Code Here

  public ObjectStream<Parse> create(String[] args) {

    OntoNotesFormatParameters params = ArgumentParser.parse(args, OntoNotesFormatParameters.class);

    ObjectStream<File> documentStream = new DirectorySampleStream(new File(
        params.getOntoNotesDir()), new FileFilter() {

      public boolean accept(File file) {
        if (file.isFile()) {
          return file.getName().endsWith(".parse");
View Full Code Here

  public ObjectStream<NameSample> create(String[] args) {

    OntoNotesFormatParameters params = ArgumentParser.parse(args, OntoNotesFormatParameters.class);

    ObjectStream<File> documentStream = new DirectorySampleStream(new File(
        params.getOntoNotesDir()), new FileFilter() {

      public boolean accept(File file) {
        if (file.isFile()) {
          return file.getName().endsWith(".name");
View Full Code Here

TOP

Related Classes of opennlp.tools.formats.DirectorySampleStream

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.