1
/* This file is part of Malaga, a system for Natural Language Analysis.
2
* Copyright (C) 1995-1999 Bjoern Beutel
5
* Universitaet Erlangen-Nuernberg
6
* Abteilung fuer Computerlinguistik
9
* e-mail: malaga@linguistik.uni-erlangen.de
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
25
/* description ==============================================================*/
27
/* Manages the storage of analysis results for faster access. */
29
/* variables ================================================================*/
31
GLOBAL int_t cache_accesses; /* Number of calls of "word_in_cache". */
32
GLOBAL int_t cache_hits; /* Number of successful calls of "word_in_cache". */
34
/* functions ================================================================*/
36
extern bool_t word_in_cache (string_t surf_start,
38
/* Return whether the word form <surf_start>..<surf_end> is in the cache. */
40
extern value_t next_result_in_cache (void);
41
/* Return the next result category for a word form.
42
* Use this function after calling "word_in_cache". */
44
extern void enter_in_cache (string_t surf_start,
48
/* Enter the word form <surf_start>..<surf_end> in the cache
49
* with <num_cats> categories <cats[]>. */
51
extern void clear_cache (void);
52
/* Delete all cache entries. */
54
extern void set_cache_size (int_t size);
55
/* Set max. number of cache entries to <size>. */
57
extern int_t get_cache_size (bool_t maximum);
58
/* Get number of cache entries. */
60
/* end of file ==============================================================*/