Examples of SourceGrammarFile


Examples of opennlp.ccg.grammardoc.SourceGrammarFile

          SourceGrammarFileType.GRAMMAR.getFileName())
          ? "index" : baseName);
      fb.append(".html");
      String targetName = fb.toString();

      SourceGrammarFile sourceFile
        = grammar.getSourceGrammarFile(fileType);
      Templates templates = loadTemplates(baseName);
     
      if(templates != null) {
        documenterContext.log("Generating " + targetName);

        try {
          File f = new File(destDir, targetName);
          StreamResult res = new StreamResult(
              new BufferedOutputStream(new FileOutputStream(f)));
          res.setSystemId(f);
         
          Transformer transformer = templates.newTransformer();
          transformer.setURIResolver(this);
          transformer.setParameter("sections", sections);   
          transformer.transform(
              new StreamSource(sourceFile.getSourceFile()), res);
        }
        catch(TransformerException te) {
          throw new DocumenterSourceException(
              "problem transforming output: "
                  + te.getMessageAndLocation(), te,
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.