~ubuntu-branches/ubuntu/hoary/malaga/hoary

« back to all changes in this revision

Viewing changes to source/cache.h

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2004-08-20 12:58:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040820125850-rx9s8bn0ep8jgist
Tags: 6.13-4
This should have been urgency=high, because it is an important and
long-delayed accomodation to new upstream with a bajillion bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of Malaga, a system for Natural Language Analysis.
2
 
 * Copyright (C) 1995-1999 Bjoern Beutel
3
 
 *
4
 
 * Bjoern Beutel
5
 
 * Universitaet Erlangen-Nuernberg
6
 
 * Abteilung fuer Computerlinguistik
7
 
 * Bismarckstrasse 12
8
 
 * D-91054 Erlangen
9
 
 * e-mail: malaga@linguistik.uni-erlangen.de 
10
 
 *
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.
15
 
 *
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.
20
 
 *
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 */
24
 
 
25
 
/* description ==============================================================*/
26
 
 
27
 
/* Manages the storage of analysis results for faster access. */
28
 
 
29
 
/* variables ================================================================*/
30
 
 
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". */
33
 
 
34
 
/* functions ================================================================*/
35
 
 
36
 
extern bool_t word_in_cache (string_t surf_start, 
37
 
                             string_t surf_end);
38
 
/* Return whether the word form <surf_start>..<surf_end> is in the cache. */
39
 
 
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". */
43
 
 
44
 
extern void enter_in_cache (string_t surf_start,
45
 
                            string_t surf_end,
46
 
                            int_t num_cats,
47
 
                            value_t cats[]);
48
 
/* Enter the word form <surf_start>..<surf_end> in the cache 
49
 
 * with <num_cats> categories <cats[]>. */
50
 
 
51
 
extern void clear_cache (void);
52
 
/* Delete all cache entries. */
53
 
 
54
 
extern void set_cache_size (int_t size);
55
 
/* Set max. number of cache entries to <size>. */
56
 
 
57
 
extern int_t get_cache_size (bool_t maximum);
58
 
/* Get number of cache entries. */
59
 
 
60
 
/* end of file ==============================================================*/