Changeset 7440
- Timestamp:
- 2004-05-26T14:39:57+12:00 (20 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/packages/mg/java/org/greenstone/mg/MGPassesWrapper.java
r7403 r7440 51 51 52 52 /** set the file paths */ 53 public native void setPath(String filename); 54 /** set the file paths */ 53 55 public native void setPaths(String base_path, String filename); 54 56 … … 61 63 public boolean processDocument(String docs_text) { 62 64 String [] docs = docs_text.split(String.valueOf(END_OF_DOCUMENT)); 65 System.err.println("num docs split into "+docs.length); 63 66 for (int i=0; i<docs.length; i++) { 64 67 try { -
trunk/gsdl3/packages/mg/src/text/gs3_mg_passes.c
r7431 r7440 45 45 /* 46 46 $Log$ 47 Revision 1.2 2004/05/26 02:39:57 kjdon 48 some hacky changes - fix up under linux 49 47 50 Revision 1.1 2004/05/25 03:30:12 kjdon 48 51 new mg passes for gs3. I thought I had commited this already … … 230 233 void clear_variables() { 231 234 232 buf_size = 3 * 1024 * 1024; /* 3Mb */233 invf_buffer_size = 5 * 1024 * 1024; /* 5Mb */234 ChunkLimit = 0;235 InvfLevel = 2;236 SkipSGML = 0;237 MakeWeights = 0;238 Comp_Stats = NULL;239 comp_stat_point = 0;240 bytes_processed = 0;241 bytes_received = 0;242 stemmer_num = 0; /* default to the lovin stemmer */243 stem_method = 0;244 Trace = NULL;245 filename = NULL;246 num_docs = 0;247 block_bytes = 0;248 249 Passes = 0;250 trace = 0;251 Dump = 0;252 files = NULL;253 num_files = 0;254 trace_name = NULL;255 256 235 buf_size = 3 * 1024 * 1024; /* 3Mb */ 236 invf_buffer_size = 5 * 1024 * 1024; /* 5Mb */ 237 ChunkLimit = 0; 238 InvfLevel = 2; 239 SkipSGML = 0; 240 MakeWeights = 0; 241 Comp_Stats = NULL; 242 comp_stat_point = 0; 243 bytes_processed = 0; 244 bytes_received = 0; 245 stemmer_num = 0; /* default to the lovin stemmer */ 246 stem_method = 0; 247 Trace = NULL; 248 filename = NULL; 249 num_docs = 0; 250 block_bytes = 0; 251 252 Passes = 0; 253 trace = 0; 254 Dump = 0; 255 files = NULL; 256 num_files = 0; 257 trace_name = NULL; 258 259 257 260 } 258 261 void set_invf_level(char level) { … … 278 281 } 279 282 283 void set_path(char * filen) { 284 int len = strlen(filen); 285 if (filename) { 286 Xfree (filename); 287 filename = NULL; 288 } 289 filename = Xstrdup (filen); 290 // put this here for now 291 SkipSGML=0; 292 Dump=1; 293 trace = 512; 294 if (!trace_name) 295 trace_name = make_name (filename, TRACE_SUFFIX, NULL); 296 if (!(Trace = fopen (trace_name, "a"))) 297 Message ("Unable to open \"%s\". No tracing will be done.", trace_name); 298 else 299 setbuf (Trace, NULL); 300 301 } 280 302 void set_paths(char * basep, char* filen) { 281 303 int len = strlen(filen); … … 684 706 685 707 init_driver (); 686 char * doc = "hello there kath"; 687 process_document(doc, 17); 708 /* here we have to do something to process docs from stdin */ 688 709 finalise_driver(); 689 710 if (Trace) -
trunk/gsdl3/src/packages/mg/java/org/greenstone/mg/MGPassesWrapper.java
r7403 r7440 51 51 52 52 /** set the file paths */ 53 public native void setPath(String filename); 54 /** set the file paths */ 53 55 public native void setPaths(String base_path, String filename); 54 56 … … 61 63 public boolean processDocument(String docs_text) { 62 64 String [] docs = docs_text.split(String.valueOf(END_OF_DOCUMENT)); 65 System.err.println("num docs split into "+docs.length); 63 66 for (int i=0; i<docs.length; i++) { 64 67 try { -
trunk/gsdl3/src/packages/mg/src/text/gs3_mg_passes.c
r7431 r7440 45 45 /* 46 46 $Log$ 47 Revision 1.2 2004/05/26 02:39:57 kjdon 48 some hacky changes - fix up under linux 49 47 50 Revision 1.1 2004/05/25 03:30:12 kjdon 48 51 new mg passes for gs3. I thought I had commited this already … … 230 233 void clear_variables() { 231 234 232 buf_size = 3 * 1024 * 1024; /* 3Mb */233 invf_buffer_size = 5 * 1024 * 1024; /* 5Mb */234 ChunkLimit = 0;235 InvfLevel = 2;236 SkipSGML = 0;237 MakeWeights = 0;238 Comp_Stats = NULL;239 comp_stat_point = 0;240 bytes_processed = 0;241 bytes_received = 0;242 stemmer_num = 0; /* default to the lovin stemmer */243 stem_method = 0;244 Trace = NULL;245 filename = NULL;246 num_docs = 0;247 block_bytes = 0;248 249 Passes = 0;250 trace = 0;251 Dump = 0;252 files = NULL;253 num_files = 0;254 trace_name = NULL;255 256 235 buf_size = 3 * 1024 * 1024; /* 3Mb */ 236 invf_buffer_size = 5 * 1024 * 1024; /* 5Mb */ 237 ChunkLimit = 0; 238 InvfLevel = 2; 239 SkipSGML = 0; 240 MakeWeights = 0; 241 Comp_Stats = NULL; 242 comp_stat_point = 0; 243 bytes_processed = 0; 244 bytes_received = 0; 245 stemmer_num = 0; /* default to the lovin stemmer */ 246 stem_method = 0; 247 Trace = NULL; 248 filename = NULL; 249 num_docs = 0; 250 block_bytes = 0; 251 252 Passes = 0; 253 trace = 0; 254 Dump = 0; 255 files = NULL; 256 num_files = 0; 257 trace_name = NULL; 258 259 257 260 } 258 261 void set_invf_level(char level) { … … 278 281 } 279 282 283 void set_path(char * filen) { 284 int len = strlen(filen); 285 if (filename) { 286 Xfree (filename); 287 filename = NULL; 288 } 289 filename = Xstrdup (filen); 290 // put this here for now 291 SkipSGML=0; 292 Dump=1; 293 trace = 512; 294 if (!trace_name) 295 trace_name = make_name (filename, TRACE_SUFFIX, NULL); 296 if (!(Trace = fopen (trace_name, "a"))) 297 Message ("Unable to open \"%s\". No tracing will be done.", trace_name); 298 else 299 setbuf (Trace, NULL); 300 301 } 280 302 void set_paths(char * basep, char* filen) { 281 303 int len = strlen(filen); … … 684 706 685 707 init_driver (); 686 char * doc = "hello there kath"; 687 process_document(doc, 17); 708 /* here we have to do something to process docs from stdin */ 688 709 finalise_driver(); 689 710 if (Trace) -
trunk/indexers/mg/java/org/greenstone/mg/MGPassesWrapper.java
r7403 r7440 51 51 52 52 /** set the file paths */ 53 public native void setPath(String filename); 54 /** set the file paths */ 53 55 public native void setPaths(String base_path, String filename); 54 56 … … 61 63 public boolean processDocument(String docs_text) { 62 64 String [] docs = docs_text.split(String.valueOf(END_OF_DOCUMENT)); 65 System.err.println("num docs split into "+docs.length); 63 66 for (int i=0; i<docs.length; i++) { 64 67 try { -
trunk/indexers/mg/src/text/gs3_mg_passes.c
r7431 r7440 45 45 /* 46 46 $Log$ 47 Revision 1.2 2004/05/26 02:39:57 kjdon 48 some hacky changes - fix up under linux 49 47 50 Revision 1.1 2004/05/25 03:30:12 kjdon 48 51 new mg passes for gs3. I thought I had commited this already … … 230 233 void clear_variables() { 231 234 232 buf_size = 3 * 1024 * 1024; /* 3Mb */233 invf_buffer_size = 5 * 1024 * 1024; /* 5Mb */234 ChunkLimit = 0;235 InvfLevel = 2;236 SkipSGML = 0;237 MakeWeights = 0;238 Comp_Stats = NULL;239 comp_stat_point = 0;240 bytes_processed = 0;241 bytes_received = 0;242 stemmer_num = 0; /* default to the lovin stemmer */243 stem_method = 0;244 Trace = NULL;245 filename = NULL;246 num_docs = 0;247 block_bytes = 0;248 249 Passes = 0;250 trace = 0;251 Dump = 0;252 files = NULL;253 num_files = 0;254 trace_name = NULL;255 256 235 buf_size = 3 * 1024 * 1024; /* 3Mb */ 236 invf_buffer_size = 5 * 1024 * 1024; /* 5Mb */ 237 ChunkLimit = 0; 238 InvfLevel = 2; 239 SkipSGML = 0; 240 MakeWeights = 0; 241 Comp_Stats = NULL; 242 comp_stat_point = 0; 243 bytes_processed = 0; 244 bytes_received = 0; 245 stemmer_num = 0; /* default to the lovin stemmer */ 246 stem_method = 0; 247 Trace = NULL; 248 filename = NULL; 249 num_docs = 0; 250 block_bytes = 0; 251 252 Passes = 0; 253 trace = 0; 254 Dump = 0; 255 files = NULL; 256 num_files = 0; 257 trace_name = NULL; 258 259 257 260 } 258 261 void set_invf_level(char level) { … … 278 281 } 279 282 283 void set_path(char * filen) { 284 int len = strlen(filen); 285 if (filename) { 286 Xfree (filename); 287 filename = NULL; 288 } 289 filename = Xstrdup (filen); 290 // put this here for now 291 SkipSGML=0; 292 Dump=1; 293 trace = 512; 294 if (!trace_name) 295 trace_name = make_name (filename, TRACE_SUFFIX, NULL); 296 if (!(Trace = fopen (trace_name, "a"))) 297 Message ("Unable to open \"%s\". No tracing will be done.", trace_name); 298 else 299 setbuf (Trace, NULL); 300 301 } 280 302 void set_paths(char * basep, char* filen) { 281 303 int len = strlen(filen); … … 684 706 685 707 init_driver (); 686 char * doc = "hello there kath"; 687 process_document(doc, 17); 708 /* here we have to do something to process docs from stdin */ 688 709 finalise_driver(); 689 710 if (Trace)
Note:
See TracChangeset
for help on using the changeset viewer.