Package opennlp.tools.parser

Examples of opennlp.tools.parser.ChunkContextGenerator


    this(model.getBuildModel(), model.getAttachModel(), model.getCheckModel(),
        new POSTaggerME(model.getParserTaggerModel()),
        new ChunkerME(model.getParserChunkerModel(),
        ChunkerME.DEFAULT_BEAM_SIZE,
        new ParserChunkerSequenceValidator(model.getParserChunkerModel()),
        new ChunkContextGenerator(ChunkerME.DEFAULT_BEAM_SIZE)),
        model.getHeadRules(),
        beamSize, advancePercentage);
  }
View Full Code Here


   
    parseSamples.reset();
   
    // chunk
    ChunkerModel chunkModel = ChunkerME.train(languageCode, new ChunkSampleStream(
        parseSamples), new ChunkContextGenerator(), mlParams.getParameters("chunker"));
   
    parseSamples.reset();
   
    // build
    System.err.println("Training builder");
View Full Code Here

    this(model.getBuildModel(), model.getCheckModel(),
        new POSTaggerME(model.getParserTaggerModel(), 10, 0),
        new ChunkerME(model.getParserChunkerModel(),
            ChunkerME.DEFAULT_BEAM_SIZE,
            new ParserChunkerSequenceValidator(model.getParserChunkerModel()),
            new ChunkContextGenerator(ChunkerME.DEFAULT_BEAM_SIZE)),
            model.getHeadRules(), beamSize, advancePercentage);
  }
View Full Code Here

    parseSamples.reset();
   
    // chunk
    ChunkerModel chunkModel = ChunkerME.train(languageCode,
        new ChunkSampleStream(parseSamples),
        new ChunkContextGenerator(), mlParams.getParameters("chunker"));
   
    parseSamples.reset();
   
    // check
    System.err.println("Training checker");
View Full Code Here

  public ParserChunker(String modelFile) throws IOException {
    this(modelFile,K,K);
  }
 
  public ParserChunker(String modelFile, int beamSize, int cacheSize) throws IOException {
    super(new SuffixSensitiveGISModelReader(new File(modelFile)).getModel(), new ChunkContextGenerator(cacheSize), beamSize);
    continueStartMap = new HashMap(model.getNumOutcomes());
    for (int oi=0,on=model.getNumOutcomes();oi<on;oi++) {
      String outcome = model.getOutcome(oi);
      if (outcome.startsWith(ParserME.CONT)){
        continueStartMap.put(outcome,ParserME.START+outcome.substring(ParserME.CONT.length()));
View Full Code Here

    this(model.getBuildModel(), model.getCheckModel(),
        new POSTaggerME(model.getParserTaggerModel(), 10, 0),
        new ChunkerME(model.getParserChunkerModel(),
            ChunkerME.DEFAULT_BEAM_SIZE,
            new ParserChunkerSequenceValidator(model.getParserChunkerModel()),
            new ChunkContextGenerator(ChunkerME.DEFAULT_BEAM_SIZE)),
            model.getHeadRules(), beamSize, advancePercentage);
  }
View Full Code Here

    parseSamples.reset();
   
    // chunk
    ChunkerModel chunkModel = ChunkerME.train(languageCode,
        new ChunkSampleStream(parseSamples),
        new ChunkContextGenerator(), mlParams.getParameters("chunker"));
   
    parseSamples.reset();
   
    // check
    System.err.println("Training checker");
View Full Code Here

    this(model.getBuildModel(), model.getAttachModel(), model.getCheckModel(),
        new POSTaggerME(model.getParserTaggerModel()),
        new ChunkerME(model.getParserChunkerModel(),
        ChunkerME.DEFAULT_BEAM_SIZE,
        new ParserChunkerSequenceValidator(model.getParserChunkerModel()),
        new ChunkContextGenerator(ChunkerME.DEFAULT_BEAM_SIZE)),
        model.getHeadRules(),
        beamSize, advancePercentage);
  }
View Full Code Here

   
    parseSamples.reset();
   
    // chunk
    ChunkerModel chunkModel = ChunkerME.train(languageCode, new ChunkSampleStream(
        parseSamples), new ChunkContextGenerator(), mlParams.getParameters("chunker"));
   
    parseSamples.reset();
   
    // build
    System.err.println("Training builder");
View Full Code Here

    this(model.getBuildModel(), model.getCheckModel(),
        new POSTaggerME(model.getParserTaggerModel(), 10, 0),
        new ChunkerME(model.getParserChunkerModel(),
            ChunkerME.DEFAULT_BEAM_SIZE,
            new ParserChunkerSequenceValidator(model.getParserChunkerModel()),
            new ChunkContextGenerator(ChunkerME.DEFAULT_BEAM_SIZE)),
            model.getHeadRules(), beamSize, advancePercentage);
  }
View Full Code Here

TOP

Related Classes of opennlp.tools.parser.ChunkContextGenerator

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.