Package edu.stanford.nlp.io

Examples of edu.stanford.nlp.io.RuntimeIOException


  public static List<Pair<String, String>> readMacros(String filename, String encoding) {
    try {
      BufferedReader bin = new BufferedReader(new InputStreamReader(new FileInputStream(filename), encoding));
      return readMacros(bin);
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here


        }
        macros.add(new Pair<String, String>(pieces[0], pieces[1]));
      }
      return macros;
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

        }

        sentIndex++;
      }
    } catch (IOException e) {
      throw new RuntimeIOException("MemoryTreebank.processFile IOException in file " + file, e);
    } finally {
      IOUtils.closeIgnoringExceptions(tr);
    }
  }
View Full Code Here

  {
    try {
      return ChineseGrammaticalStructure.
              readCoNLLXGrammaticalStructureCollection(filename);
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

  {
    try {
      return EnglishGrammaticalStructure.
              readCoNLLXGrammaticalStructureCollection(filename);
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

      tc.getTagsCache = tc.map.keySet().toArray(new String[tc.map.keySet().size()]);
      tc.sumCache = tc.calculateSumCache();
      return tc;
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

   
   
      }
      is.close();
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
    return char_dict;
  }
View Full Code Here

        //System.err.println("DEBUG: affDict: "+filename+" "+aDetectorLine);
        a.add(aDetectorLine);
      }
      is.close();
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
    return a;
  }
View Full Code Here

public class DcorefBenchmarkSlowITest extends TestCase {

  public static String runCorefTest(boolean deleteOnExit) throws Exception {
    final File WORK_DIR_FILE = File.createTempFile("DcorefBenchmarkTest", "");
    if ( ! (WORK_DIR_FILE.delete() && WORK_DIR_FILE.mkdir())) {
      throw new RuntimeIOException("Couldn't create temp directory " + WORK_DIR_FILE);
    }
    if (deleteOnExit) {
      WORK_DIR_FILE.deleteOnExit();
    }
View Full Code Here

      } while (nextToken != null && nextToken.word().length() == 0);

      return nextToken;

    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.io.RuntimeIOException

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.