First ICU chain integration in relevance ranking of pazpar2.
[pazpar2-moved-to-github.git] / src / charsets.h
1 /* $Id: charsets.h,v 1.2 2007-05-23 14:44:18 marc 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 /** \file charsets.h
23     \brief Pazpar2 Character set facilities
24 */
25
26 #ifndef PAZPAR_CHARSETS_H
27 #define PAZPAR_CHARSETS_H
28
29
30 struct icu_chain;
31
32 typedef struct pp2_charset_s *pp2_charset_t;
33 typedef struct pp2_relevance_token_s *pp2_relevance_token_t;
34
35 pp2_charset_t pp2_charset_create(struct icu_chain * icu_chn);
36 void pp2_charset_destroy(pp2_charset_t pct);
37
38 pp2_relevance_token_t pp2_relevance_tokenize(pp2_charset_t pct,
39                                              const char *buf);
40 void pp2_relevance_token_destroy(pp2_relevance_token_t prt);
41 const char *pp2_relevance_token_next(pp2_relevance_token_t prt);
42
43 #endif
44
45 /*
46  * Local variables:
47  * c-basic-offset: 4
48  * indent-tabs-mode: nil
49  * End:
50  * vim: shiftwidth=4 tabstop=8 expandtab
51  */