0

i have a script that calculate for each sentence a vector of double, and i stored results in a file like sentence ---> vector which is normally double[].. example:

 heres link to listen live to our discussion of debtceiling politics --->[D@184497d1
 now were talking debtceiling w dick polman and bill galston--->[D@f9d87b

now i want to use these vectors, so i did a script to get the second part of each line :

    String str;

    while ((str = in.readLine()) != null) {
         String substr = "--->";
         String[] parts = str.split(substr);
         String before = parts[0];
         String after = parts[1];
         System.out.println(after);
    }
}

but i want to have the convert the "after" to double [] ..

anony
  • 185
  • 2
  • 14
  • 1
    You've corrupted the data when you wrote it. – Kayaman Mar 09 '17 at 14:42
  • Umm .. iw rite it like .. output.write(sentence+"--->"+vector); while the vector is declared double[] vector =...; so there is no solution here to decode it in its initial format ? – anony Mar 09 '17 at 14:47
  • No. See the duplicate. You've corrupted the data when you wrote it, so you need to rewrite the files. – Kayaman Mar 09 '17 at 14:47
  • okey i understand now.. thank you for your help – anony Mar 09 '17 at 14:52

0 Answers0