Package com.clearnlp.conversion

Examples of com.clearnlp.conversion.KaistC2DConverter


    fout.close();
  }
 
  void convertKaist(String[] args)
  {
    AbstractC2DConverter converter = new KaistC2DConverter(new HeadRuleMap(UTInput.createBufferedFileReader(args[0])));
    String[] inputFiles = UTFile.getSortedFileList(args[1], "ptb");
    String outputFile;
    PrintStream fout;
    CTReader reader;
    DEPTree dTree;
    CTTree cTree;
   
    for (String inputFile : inputFiles)
    {
      outputFile = UTFile.replaceExtension(inputFile, "dep");
      reader = new CTReader(UTInput.createBufferedFileReader(inputFile));
      fout = UTOutput.createPrintBufferedFileStream(outputFile);
      System.out.println(outputFile);
     
      while ((cTree = reader.nextTree()) != null)
      {
        dTree = converter.toDEPTree(cTree);
        fout.println(dTree.toStringDEP()+"\n");
      }
     
      reader.close();
      fout.close();
View Full Code Here


    fout.close();
  }
 
  void convertKaist(String[] args)
  {
    AbstractC2DConverter converter = new KaistC2DConverter(new HeadRuleMap(UTInput.createBufferedFileReader(args[0])));
    String[] inputFiles = UTFile.getSortedFileList(args[1], "ptb");
    String outputFile;
    PrintStream fout;
    CTReader reader;
    DEPTree dTree;
    CTTree cTree;
   
    for (String inputFile : inputFiles)
    {
      outputFile = UTFile.replaceExtension(inputFile, "dep");
      reader = new CTReader(UTInput.createBufferedFileReader(inputFile));
      fout = UTOutput.createPrintBufferedFileStream(outputFile);
      System.out.println(outputFile);
     
      while ((cTree = reader.nextTree()) != null)
      {
        dTree = converter.toDEPTree(cTree);
        fout.println(dTree.toStringDEP()+"\n");
      }
     
      reader.close();
      fout.close();
View Full Code Here

    fout.close();
  }
 
  void convertKaist(String[] args)
  {
    AbstractC2DConverter converter = new KaistC2DConverter(new HeadRuleMap(UTInput.createBufferedFileReader(args[0])));
    String[] inputFiles = UTFile.getSortedFileList(args[1], "ptb");
    String outputFile;
    PrintStream fout;
    CTReader reader;
    DEPTree dTree;
    CTTree cTree;
   
    for (String inputFile : inputFiles)
    {
      outputFile = UTFile.replaceExtension(inputFile, "dep");
      reader = new CTReader(UTInput.createBufferedFileReader(inputFile));
      fout = UTOutput.createPrintBufferedFileStream(outputFile);
      System.out.println(outputFile);
     
      while ((cTree = reader.nextTree()) != null)
      {
        dTree = converter.toDEPTree(cTree);
        fout.println(dTree.toStringDEP()+"\n");
      }
     
      reader.close();
      fout.close();
View Full Code Here

TOP

Related Classes of com.clearnlp.conversion.KaistC2DConverter

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.