public void saveTestData(String path, String source[], boolean train, Map<String, Boolean> map) {
        parser.initParser();
        Map<String, SenData> senMap = new TreeMap<>();
        for (String s : source) {
            File f = new File(s);
            File[] files = f.listFiles();
            for (File file : files) {
                Document doc = loadCorpus(file);
                List<Sentence> sens = doc.getSentence();
                for (Sentence sen : sens) {
                    SenData dt = preparedData(sen, train);
                    for (DDIPair pair : dt.ddiList) {
                        String key = pair.arg1.id + pair.arg2.id;
                        if (map.containsKey(key)) {
                            pair.ddi = map.get(key);
                        } else {
                            key = pair.arg2.id + pair.arg1.id;
                            if (map.containsKey(key)) {
                                pair.ddi = map.get(key);
                            } else {
                                System.out.println("No answer found for pair:\t" + pair.id);
                            }
                        }
                    }
                    senMap.put(dt.senID, dt);
                }
            }
        }
        try {
            System.out.println("---> Writing sendata to disk ...." + senMap.size() + " objects ...");
            Data.write(path, senMap);
            System.out.println("Saving data ... done!");
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }