Package edu.stanford.nlp.io

Examples of edu.stanford.nlp.io.RuntimeIOException


     
      // add all edges to the actual graph
      for(IntermediateEdge ie: edges){
        IndexedWord source = nodeMap.get(ie.source, ie.sourceCopy);
        if (source == null) {
          throw new RuntimeIOException("Failed to find node " + ie.source + "-" + ie.sourceCopy);
        }
        IndexedWord target = nodeMap.get(ie.target, ie.targetCopy);
        if (target == null) {
          throw new RuntimeIOException("Failed to find node " + ie.target + "-" + ie.targetCopy);
        }
        assert(target != null);
        synchronized (LOCK) {
          // this is not thread-safe: there are static fields in GrammaticalRelation
          GrammaticalRelation rel = GrammaticalRelation.valueOf(ie.dep);
View Full Code Here


              }
              is.close();
            } catch (IOException e) {
              result.remove(key);
              System.err.println("argsToProperties could not read properties file: " + result.getProperty(key));
              throw new RuntimeIOException(e);
            }
          }
        }
      } else {
        remainingArgs.add(args[i]);
View Full Code Here

        result.setProperty((String)propKey,newVal.trim());
      }
      is.close();
      return result;
    } catch (IOException e) {
      throw new RuntimeIOException("propFileToProperties could not read properties file: " + filename, e);
    }
  }
View Full Code Here

        oos.writeObject(linearWeights);
      }
      oos.writeObject(inputLayerWeights);
      oos.writeObject(outputLayerWeights);
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

      oos.close();
      gos.close();
      bos.close();
      return bos.toByteArray();
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

      ois.close();
      gis.close();
      bis.close();
      return output;
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

      if (o instanceof LogisticClassifier<?, ?>) {
        return (LogisticClassifier<String, String>) o;
      }
      throw new ClassCastException("Wanted SingletonPredictor, got " + o.getClass());
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

  public TreeRecorder(Mode mode, String filename) {
    this.mode = mode;
    try {
      out = new BufferedWriter(new FileWriter(filename));
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

      default:
        throw new IllegalArgumentException("Unknown mode " + mode);
      }
      out.newLine();
    } catch (IOException e) {
      throw new RuntimeIOException(e);
    }
  }
View Full Code Here

  public void display(boolean verbose, PrintWriter pw) {
    try {
      out.close();
    } 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.