Package edu.stanford.nlp.io

Examples of edu.stanford.nlp.io.RuntimeIOException


        return (LexicalizedParser) o;
      }
      throw new ClassCastException("Wanted LexicalizedParser, got " +
                                   o.getClass());
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here


      } else {
        throw new FileNotFoundException("Could not find " + modelName +
                                        " inside " + zipFilename);
      }
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
    return parser;
  }
View Full Code Here

      ObjectOutputStream out = IOUtils.writeStreamFromString(filename);
      out.writeObject(this);
      out.close();
      System.err.println("done.");
    } catch (IOException ioe) {
      throw new RuntimeIOException(ioe);
    }
  }
View Full Code Here

      out.flush();
      out.close();
      System.err.println("done.");
    } catch (IOException e) {
      System.err.println("Trouble saving parser data to ASCII format.");
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

      @Override
      public Annotator create() {
        try {
          return annotatorImplementation.ner(properties);
        } catch (FileNotFoundException e) {
          throw new RuntimeIOException(e);
        }
      }

      @Override
      public String additionalSignature() {
View Full Code Here

      init(br);
      br.close();
      isr.close();
      fis.close();
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

          }
          map.put(traditional, simplified);
        }
      }
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

      while ((line = br.readLine()) != null) {
        bw.write(apply(line));
        bw.newLine();
      }
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

      br.close();
      isr.close();
      fis.close();
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

        }
        sufs.add(fields[2]);
      }
      ASBCDetectorReader.close();
    } catch (FileNotFoundException e) {
      throw new RuntimeIOException("ASBC dictionary not found", e);
    } catch (IOException e) {
      throw new RuntimeIOException("ASBC dictionary problem", e);
    } finally {
      if (ASBCDetectorReader != null) {
        try {
          ASBCDetectorReader.close();
        } catch (IOException ioe) {
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.