- Timestamp:
- 2019-10-17T21:05:21+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/maori-lang-detection/src/org/greenstone/atea/TextDumpPage.java
r33578 r33579 27 27 // first line always has a "key:" somewhere after the pageURL 28 28 int endIndex = line.indexOf("key:"); 29 String pageURL = line.substring(endIndex); 29 30 //String pageURL = line.substring(0, endIndex); 31 String pageURL = (endIndex == -1) ? line : line.substring(0, endIndex); 32 30 33 31 34 tuples.put("pageURL", pageURL.trim()); 32 35 33 String key = line.substring(endIndex); 34 tuples.put("key", key.trim()); 36 if(endIndex != -1) { 37 String key = line.substring(endIndex); 38 tuples.put("key", key.trim()); 39 } else { 40 debug("@@@@ no key for pageURL: " + pageURL); 41 } 42 43 if(pageURL.contains(TEXT_END_MARKER)) { 44 debug("@@@@ TEXT_END_MARKER assigned to pageURL for page: "); 45 debug("+++++++++"); 46 debug(unparsedPageDump); 47 debug("+++++++++"); 48 } 35 49 36 50 boolean readingPageText = false; … … 77 91 tuples.put("pageText", ""); 78 92 } 93 79 94 80 95 } catch (IOException ioe) { 81 96 error("@@@@@@@@@ Error reading in txtdump of a page.", ioe); 82 97 } 98 99 /* 100 // START DEBUG 101 debug("__________________________________________"); 102 for(Map.Entry<String, String> entry : tuples.entrySet()) { 103 String key = entry.getKey(); 104 String value = entry.getValue(); 105 debug(key + " - " + value); 106 } 107 debug("__________________________________________"); 108 // END DEBUG 109 */ 83 110 } 84 111
Note:
See TracChangeset
for help on using the changeset viewer.