|
a/src/rcldb/stemdb.h |
|
b/src/rcldb/stemdb.h |
1 |
#ifndef _STEMDB_H_INCLUDED_
|
1 |
#ifndef _STEMDB_H_INCLUDED_
|
2 |
#define _STEMDB_H_INCLUDED_
|
2 |
#define _STEMDB_H_INCLUDED_
|
3 |
/* @(#$Id: stemdb.h,v 1.2 2006-11-15 14:57:53 dockes Exp $ (C) 2004 J.F.Dockes */
|
3 |
/* @(#$Id: stemdb.h,v 1.3 2006-12-19 12:11:21 dockes Exp $ (C) 2004 J.F.Dockes */
|
4 |
/// Stem database code
|
4 |
/// Stem database code
|
5 |
///
|
5 |
///
|
6 |
/// Stem databases list stems and the set of index terms they expand to. They
|
6 |
/// Stem databases list stems and the set of index terms they expand to. They
|
7 |
/// are computed from index data by stemming each term and regrouping those
|
7 |
/// are computed from index data by stemming each term and regrouping those
|
8 |
/// that stem to the same value.
|
8 |
/// that stem to the same value.
|
|
... |
|
... |
11 |
|
11 |
|
12 |
#include <list>
|
12 |
#include <list>
|
13 |
#include <string>
|
13 |
#include <string>
|
14 |
|
14 |
|
15 |
#include <xapian.h>
|
15 |
#include <xapian.h>
|
|
|
16 |
|
16 |
#ifndef NO_NAMESPACES
|
17 |
#ifndef NO_NAMESPACES
|
17 |
using std::string;
|
18 |
using std::string;
|
18 |
using std::list;
|
19 |
using std::list;
|
19 |
namespace Rcl {
|
20 |
namespace Rcl {
|
20 |
namespace StemDb {
|
21 |
namespace StemDb {
|
|
... |
|
... |
26 |
extern bool deleteDb(const std::string& dbdir, const std::string& lang);
|
27 |
extern bool deleteDb(const std::string& dbdir, const std::string& lang);
|
27 |
/// Create stem database for given language
|
28 |
/// Create stem database for given language
|
28 |
extern bool createDb(Xapian::Database& xdb,
|
29 |
extern bool createDb(Xapian::Database& xdb,
|
29 |
const std::string& dbdir, const std::string& lang);
|
30 |
const std::string& dbdir, const std::string& lang);
|
30 |
/// Expand term to stem siblings
|
31 |
/// Expand term to stem siblings
|
31 |
extern std::list<std::string> stemExpand(const std::string& dbdir,
|
32 |
extern bool stemExpand(const std::string& dbdir,
|
32 |
const std::string& lang,
|
33 |
const std::string& lang,
|
33 |
const std::string& term);
|
34 |
const std::string& term,
|
34 |
|
35 |
list<string>& result);
|
35 |
#ifndef NO_NAMESPACES
|
36 |
#ifndef NO_NAMESPACES
|
36 |
}
|
37 |
}
|
37 |
}
|
38 |
}
|
38 |
#endif // NO_NAMESPACES
|
39 |
#endif // NO_NAMESPACES
|
39 |
|
40 |
|