Exemplo n.º 1
0
 public static void transform2idx(String inFile, String outFile) throws Exception {
   BufferedReader br = new BufferedReader(new FileReader(inFile));
   BufferedWriter bw = new BufferedWriter(new FileWriter(outFile));
   String line;
   while ((line = br.readLine()) != null) {
     if (line.startsWith("###")) {
       bw.write(line + "\n");
       continue;
     }
     String[] spt = line.split("\t");
     String idx1 = EntityIndex.getIdx(spt[0]);
     String idx2 = EntityIndex.getIdx(spt[1]);
     if (idx1 != null && idx2 != null) bw.write(idx1 + "\t" + idx2 + "\n");
   }
   br.close();
   bw.close();
   LogInfo.logs("Job Done.");
 }
Exemplo n.º 2
0
 public static void main(String[] args) throws Exception {
   // processFile(args[0], args[1]);
   EntityIndex.initialize(args[2]);
   transform2idx(args[0], args[1]);
 }