88398da4a8bc2116e672b9f0f58a102b683d031f
[pazpar2-moved-to-github.git] / src / termlists.h
1 /* $Id: termlists.h,v 1.2 2007-04-10 08:48:56 adam Exp $
2    Copyright (c) 2006-2007, Index Data.
3
4 This file is part of Pazpar2.
5
6 Pazpar2 is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
10
11 Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Pazpar2; see the file LICENSE.  If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19 02111-1307, USA.
20  */
21
22 #ifndef TERMLISTS_H
23 #define TERMLISTS_H
24
25 #include <yaz/nmem.h>
26
27 struct termlist_score
28 {
29     char *term;
30     int frequency;
31 };
32
33 struct termlist;
34
35 struct termlist *termlist_create(NMEM nmem, int numterms, int highscore_size);
36 void termlist_insert(struct termlist *tl, const char *term);
37 struct termlist_score **termlist_highscore(struct termlist *tl, int *len);
38
39 #endif
40
41 /*
42  * Local variables:
43  * c-basic-offset: 4
44  * indent-tabs-mode: nil
45  * End:
46  * vim: shiftwidth=4 tabstop=8 expandtab
47  */