155156157158159160161162163164
// line contains content. Add it to the builder. content.append(line); } } } catch (IOException ioe) { throw new IOError(ioe); } // There was no content left in this document. return null; }
102103104105106107108109
Integer.parseInt(date.substring(0, 4)), Integer.parseInt(date.substring(4, 6)), Integer.parseInt(date.substring(6, 8))); curDocTimestamp = calendar.getTimeInMillis(); } catch (IOException ioe) { throw new IOError(ioe); } }
140141142143144145146147148149
// into a single token content.append(line.substring(lineStart)).append(" "); } } } catch (IOException ioe) { throw new IOError(ioe); } // There was no content left in this document. return null; }
7980818283848586
public PukWaCDocumentIterator(String documentsFile) { try { documentsReader = new BufferedReader(new FileReader(documentsFile)); advance(); } catch (IOException ioe) { throw new IOError(ioe); } }
154155156157158159160161162163164
advance(); break; } // Case for if we didn't property read the line catch (IOException ioe) { throw new IOError(ioe); } // Some lines in the PukWaC are corrupted due to missing characters. // We silently catch these errors here and try to advance further to // the next parse tree. Note that if none further exist, advance // will still return and we will break from the loop.
197198199200201202203204
String clmethod = clusterMethod.getClutoName(); String crtmethod = criterionMethod.getClutoName(); return ClutoWrapper.cluster(matrix, clmethod, crtmethod, numClusters); } catch (IOException ioe) { throw new IOError(ioe); } }
210211212213214215216217
// co-occurrence matrix into the lower dimensional subspace wordSpace = LocalityPreservingProjection.project( termDocMatrix, affinityMatrix, dimensions); } catch (IOException ioe) { //rethrow as Error throw new IOError(ioe); } }
117118119120121122123124125
throw new NoSuchElementException("No futher entries"); MatrixEntry me = next; try { advance(); } catch (IOException ioe) { throw new IOError(ioe); } return me; }
145146147148149150151152153
throw new NoSuchElementException("No futher entries"); MatrixEntry me = next; try { next = advance(); } catch (IOException ioe) { throw new IOError(ioe); } return me; }
116117118119120121122123
utterances = currentXmlDoc.getElementsByTagName("u"); currentNodeIndex = 0; } catch (org.xml.sax.SAXException saxe) { saxe.printStackTrace(); } catch (IOException ioe) { throw new IOError(ioe); } }