Switch to unified view

a/src/rcldb/stemdb.h b/src/rcldb/stemdb.h
...
...
53
#include <string>
53
#include <string>
54
54
55
#include <xapian.h>
55
#include <xapian.h>
56
56
57
#include "synfamily.h"
57
#include "synfamily.h"
58
#include "unacpp.h"
59
58
60
namespace Rcl {
59
namespace Rcl {
61
60
62
/* A stemming functor for using with XapComputableSynFamMember */
61
/* A stemming functor for using with XapComputableSynFamMember.
62
 * We could perform the change to lowercase in there too, as stemdb keys
63
 * must be lower case, but then the input conversion would be repeated for each
64
 * stemming language, which would be inefficient. So we let our caller make sure
65
 * that the input is lower-case */
63
class SynTermTransStem : public SynTermTrans {
66
class SynTermTransStem : public SynTermTrans {
64
public:
67
public:
65
    SynTermTransStem(const std::string& lang)
68
    SynTermTransStem(const std::string& lang)
66
    : m_stemmer(lang), m_lang(lang)
69
    : m_stemmer(lang), m_lang(lang)
67
    {
70
    {
...
...
85
    StemDb(Xapian::Database& xdb)
88
    StemDb(Xapian::Database& xdb)
86
    : XapSynFamily(xdb, synFamStem)
89
    : XapSynFamily(xdb, synFamStem)
87
    {
90
    {
88
    }
91
    }
89
92
90
    /** Expand for a number of languages */
93
    /** Expand for a number of languages 
94
     *  @param langs space-separated set of languages
95
     *  @param term  term to expand
96
     */
91
    bool stemExpand(const std::string& langs,
97
    bool stemExpand(const std::string& langs,
92
            const std::string& term,
98
            const std::string& term,
93
            std::vector<std::string>& result);
99
            std::vector<std::string>& result);
94
};
100
};
95
101