VectorHelper { public static String[] loadTermDictionary(File dictFile) throws IOException { try (InputStream in = new FileInputStream(dictFile)) { return loadTermDictionary(in); } } private  VectorHelper(); static String vectorToCSVString(Vector vector, boolean namesAsComments); static String buildJson(Iterable<Pair<String, Double>> iterable); static String buildJson(Iterable<Pair<String, Double>> iterable, StringBuilder bldr); static List<Pair<Integer, Double>> topEntries(Vector vector, int maxEntries); static List<Pair<Integer, Double>> firstEntries(Vector vector, int maxEntries); static List<Pair<String, Double>> toWeightedTerms(Collection<Pair<Integer, Double>> entries,
                                                           final String[] dictionary); static String vectorToJson(Vector vector, String[] dictionary, int maxEntries, boolean sort); static void vectorToCSVString(Vector vector,
                                       boolean namesAsComments,
                                       Appendable bldr); static String[] loadTermDictionary(File dictFile); static String[] loadTermDictionary(Configuration conf, String filePattern);  }
@Test public void testLoadTermDictionary() throws Exception { VectorHelper.loadTermDictionary(conf, inputPathOne.toString()); VectorHelper.loadTermDictionary(conf, inputPathTwo.toString()); }