Factor relevance charset normalization out to a separate implementation
[pazpar2-moved-to-github.git] / src / relevance.h
1 /* $Id: relevance.h,v 1.6 2007-05-10 11:46:09 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 RELEVANCE_H
23 #define RELEVANCE_H
24
25 #include <yaz/yaz-util.h>
26 #include "charsets.h"
27
28 struct relevance;
29 struct record_cluster;
30 struct reclist;
31
32 struct relevance *relevance_create(pp2_charset_t pct,
33                                    NMEM nmem, const char **terms, int numrecs);
34 void relevance_newrec(struct relevance *r, struct record_cluster *cluster);
35 void relevance_countwords(struct relevance *r, struct record_cluster *cluster,
36         const char *words, int multiplier);
37 void relevance_donerecord(struct relevance *r, struct record_cluster *cluster);
38
39 void relevance_prepare_read(struct relevance *rel, struct reclist *rec);
40
41 #endif
42
43 /*
44  * Local variables:
45  * c-basic-offset: 4
46  * indent-tabs-mode: nil
47  * End:
48  * vim: shiftwidth=4 tabstop=8 expandtab
49  */