/** * This searches for the file on the classpath before reading it. If it doesn't find the file, * it throws a {@code FileNotFoundException}. * * @param fileName The name of the file to be read * @return An arraylist of the lines of the file. */ public static ArrayList<String> readFromClasspath(String fileName) throws FileNotFoundException { return read(getInputStream(fileName), Charset.defaultCharset().name(), identityTransformer); }
/** * This searches for the file on the classpath before reading it. If it doesn't find the file, * it throws a {@code FileNotFoundException}. * * @param fileName The name of the file to be read * @return An arraylist of the lines of the file. */ public static ArrayList<String> readFromClasspath(String fileName) throws FileNotFoundException { return read(getInputStream(fileName), Charset.defaultCharset().name(), identityTransformer); }
HashMap<String, double[]> embedding = new HashMap<>(); BufferedReader in = new BufferedReader(new InputStreamReader(LineIO.getInputStream(filenames .get(resourceId)))); double maxAbsValueInAnyDimension = 0;
HashMap<String, double[]> embedding = new HashMap<>(); BufferedReader in = new BufferedReader(new InputStreamReader(LineIO.getInputStream(filenames .get(resourceId)))); double maxAbsValueInAnyDimension = 0;