comparison src/pagerank/LinkConvertGraph.java @ 3:b44abb9aa09f draft

add resources/article.xml
author one
date Wed, 05 Sep 2012 11:59:02 +0900
parents 1744340f8be6
children dcd59917a2dd
comparison
equal deleted inserted replaced
2:1744340f8be6 3:b44abb9aa09f
88 88
89 89
90 90
91 91
92 public static void main(String[] args) { 92 public static void main(String[] args) {
93 // final String filename = "./resource/article.xml"; 93 final String filename = "./resources/article.xml";
94 final String filename = "/Users/aotokage/testProgram/wiki/ja-pages_current.xml"; 94 // final String filename = "/Users/aotokage/testProgram/wiki/ja-pages_current.xml";
95 95
96 LinkConvertGraph lcg; 96 LinkConvertGraph lcg;
97 97
98 try { 98 try {
99 99
100 lcg = new LinkConvertGraph(filename); 100 lcg = new LinkConvertGraph(filename);
101 101
102 lcg.parseXml(); 102 lcg.parseXml();
103 // lcg.printHash(); 103 // lcg.printHash();
104 104
105 FileOutputStream fos = new FileOutputStream("./resource/wikiLink.log"); 105 FileOutputStream fos = new FileOutputStream("./resources/wikiLink.log");
106 lcg.printHash(fos); 106 lcg.printHash(fos);
107 107
108 HashMap<String,HashSet<String>> hash = lcg.getHash(); 108 HashMap<String,HashSet<String>> hash = lcg.getHash();
109 109
110 110
111 final String filenameD = "./resource/tinkerpopDB"; 111 final String filenameD = "./resources/tinkerpopDB";
112 112
113 Graph graph = new TinkerGraph(); 113 Graph graph = new TinkerGraph();
114 FileOutputStream out = new FileOutputStream(new File(filename)); 114 FileOutputStream out = new FileOutputStream(new File(filename));
115 LinkToVertex ltn = new LinkToVertex(graph); 115 LinkToVertex ltn = new LinkToVertex(graph);
116 116