[7630] | 1 | /**************************************************************************
|
---|
| 2 | *
|
---|
| 3 | * mg_passes_4jni.h -- modified mg_passes for use from jni
|
---|
| 4 | * Copyright (C) 2004 New Zealand Digital Library, http://www.nzdl.org
|
---|
| 5 | *
|
---|
| 6 | * This program is free software; you can redistribute it and/or modify
|
---|
| 7 | * it under the terms of the GNU General Public License as published by
|
---|
| 8 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 9 | * (at your option) any later version.
|
---|
| 10 | *
|
---|
| 11 | * This program is distributed in the hope that it will be useful,
|
---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 14 | * GNU General Public License for more details.
|
---|
| 15 | *
|
---|
| 16 | * You should have received a copy of the GNU General Public License
|
---|
| 17 | * along with this program; if not, write to the Free Software
|
---|
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 19 | *
|
---|
| 20 | * $Id: mg_passes_4jni.h 25147 2012-02-28 00:59:00Z kjdon $
|
---|
| 21 | *
|
---|
| 22 | **************************************************************************/
|
---|
| 23 | #ifndef H_MG_PASSES_4JNI
|
---|
| 24 | #define H_MG_PASSES_4JNI
|
---|
| 25 |
|
---|
| 26 | /* clear all the settings from one mg_passes run to the next */
|
---|
| 27 | void clear_variables();
|
---|
| 28 |
|
---|
| 29 | /* the following are methods to set all the variables that used to be
|
---|
| 30 | set by command line args */
|
---|
| 31 |
|
---|
| 32 | /* -S, -T1, -T2, -I1, -I2, args to mg_passes */
|
---|
| 33 | void add_pass(char pass_type, char pass_num);
|
---|
| 34 |
|
---|
| 35 | /* -D arg to mg_passes */
|
---|
| 36 | void dump_failed_document(int dump);
|
---|
| 37 |
|
---|
| 38 | /* -G arg to mg_passes */
|
---|
| 39 | void ignore_sgml_tags(int ignore);
|
---|
| 40 |
|
---|
| 41 | /* -b arg to mg_passes */
|
---|
[25147] | 42 | void set_buffer_size(mg_s_long size);
|
---|
[7630] | 43 |
|
---|
| 44 | /* -c arg to mg_passes */
|
---|
[25147] | 45 | void set_chunk_limit(mg_s_long chunk_limit);
|
---|
[7630] | 46 |
|
---|
| 47 | /* -C arg to mg_passes */
|
---|
| 48 | void set_comp_stat_point(int stat_point);
|
---|
| 49 |
|
---|
| 50 | /* -f arg to mg_passes */
|
---|
| 51 | void set_filename(const char * filen);
|
---|
| 52 |
|
---|
| 53 | /* -m arg to mg_passes */
|
---|
| 54 | void set_inversion_limit(int limit);
|
---|
| 55 |
|
---|
| 56 | /* -1, -2, -3 args to mg_passes */
|
---|
| 57 | void set_invf_level(char level);
|
---|
| 58 |
|
---|
| 59 | /* -W arg to mg_passes */
|
---|
| 60 | void set_make_weights(int make_w);
|
---|
| 61 |
|
---|
| 62 | /* -M arg to mg_passes */
|
---|
| 63 | void set_max_numeric(int max_numeric);
|
---|
| 64 |
|
---|
| 65 | /* -a, -s args to mg_passes */
|
---|
| 66 | void set_stem_options(const char * stemmer, int method);
|
---|
| 67 |
|
---|
| 68 | /* -t arg to mg_passes */
|
---|
| 69 | void set_trace_point(int tracepos);
|
---|
| 70 |
|
---|
| 71 | /* -n arg to mg_passes */
|
---|
| 72 | void set_trace_file(const char * filen);
|
---|
| 73 |
|
---|
| 74 | /* The old driver method has been split into 3:
|
---|
| 75 | init_driver, process_document (called numdocs times),
|
---|
| 76 | finalise_driver.
|
---|
| 77 | The above set vars methods should all be called before init_driver.
|
---|
| 78 | */
|
---|
| 79 |
|
---|
| 80 | void init_driver ();
|
---|
| 81 |
|
---|
| 82 | void process_document(const u_char *buffer, int len);
|
---|
| 83 |
|
---|
| 84 | void finalise_driver();
|
---|
| 85 |
|
---|
| 86 | #endif
|
---|