source: trunk/gsdl/packages/mg/src/text/build.h@ 1014

Last change on this file since 1014 was 439, checked in by sjboddie, 25 years ago

renamed mg-1.3d directory mg

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/**************************************************************************
2 *
3 * build.h -- Global information for the passes of mg_passes
4 * Copyright (C) 1994 Neil Sharman, Alistair Moffat and Lachlan Andrew
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: build.h 439 1999-08-10 21:23:37Z sjboddie $
21 *
22 **************************************************************************/
23
24
25#ifndef H_BUILD
26#define H_BUILD
27
28
29#define TERMPARAGRAPH '\003'
30
31
32int init_special (char *file_name);
33int init_text_1 (char *file_name);
34int init_text_2 (char *file_name);
35int init_invf_1 (char *file_name);
36int init_invf_2 (char *file_name);
37int init_ivf_1 (char *file_name);
38int init_ivf_2 (char *file_name);
39/*
40 * file_name IN The name of the dictionary file
41 *
42 * returns COMPALLOK for all ok,
43 * COMPERROR for any error. e.g. cannot read file
44 */
45
46
47
48
49
50int process_special (u_char * s_in, int l_in);
51int process_text_1 (u_char * s_in, int l_in);
52int process_text_2 (u_char * s_in, int l_in);
53int process_invf_1 (u_char * s_in, int l_in);
54int process_invf_2 (u_char * s_in, int l_in);
55int process_ivf_1 (u_char * s_in, int l_in);
56int process_ivf_2 (u_char * s_in, int l_in);
57/*
58 * s_in IN The binary string to be compressed
59 * l_in IN The number of characters in s_in
60 *
61 * returns COMPALLOK for all ok,
62 * COMPERROR for any error. e.g. cannot read file
63 *
64 * The calling routine is responsible for ensuring that s_out is long
65 * enough.
66 */
67
68
69
70
71
72int done_special (char *filename);
73int done_text_1 (char *filename);
74int done_text_2 (char *filename);
75int done_invf_1 (char *filename);
76int done_invf_2 (char *filename);
77int done_ivf_1 (char *filename);
78int done_ivf_2 (char *filename);
79/*
80 * returns COMPALLOK for all ok,
81 * COMPERROR for any error. e.g. cannot write file
82 */
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97extern char InvfLevel;
98/*
99 * This will determine the level of the inverted file it can take on the
100 * values 1, 2, or 3.
101 *
102 * Level 1: The inverted file contains only document numbers making it possible
103 * to do only boolean queries.
104 *
105 * Level 2: The inverted file also contains word counts per document making it
106 * possible to do cosine ranked queries.
107 *
108 * Level 3: The inverted file contains word positions.
109 */
110
111
112extern unsigned long buf_size;
113/*
114 * The size of the document input buffer.
115 */
116
117extern unsigned long ChunkLimit;
118/*
119 * The maximum number of chunks that can be written to disk.
120 */
121
122extern unsigned long invf_buffer_size;
123/*
124 * The amount of memory to allocate to the invertion buffer.
125 */
126
127extern char SkipSGML;
128/*
129 * 1 if SGML tags are to be considered non-words when building the
130 * inverted file.
131 */
132
133extern char MakeWeights;
134/*
135 * 1 if the weights file should be generated.
136 */
137
138extern FILE *Comp_Stats;
139/*
140 * Contains a file pointer to the file where compression stats should be sent
141 */
142
143extern int comp_stat_point;
144/*
145 * Generate a compression stat entry every comp_stat_point bytes
146 */
147
148extern double bytes_processed; /* [RJM 07/97: 4G limit] */
149/*
150 * The number of bytes processed. NOTE: This excludes document separators.
151 */
152
153extern double bytes_received; /* [RJM 07/97: 4G limit] */
154/*
155 * The number of bytes processed. NOTE: This includes document separators.
156 */
157
158
159extern int stemmer_num;
160/*
161 * The stemmer to use for stemming words for the inverted file.
162 * see stemmer.h
163 */
164
165extern int stem_method;
166/*
167 * The method to use for stemming words for the inverted file.
168 * see stemmer.h
169 */
170#endif
Note: See TracBrowser for help on using the repository browser.