Switch to unified view

a/src/rcldb/stemdb.cpp b/src/rcldb/stemdb.cpp
...
...
41
namespace Rcl {
41
namespace Rcl {
42
42
43
/**
43
/**
44
 * Expand for one or several languages
44
 * Expand for one or several languages
45
 */
45
 */
46
bool StemDb::stemExpand(const std::string& langs, const std::string& term,
46
bool StemDb::stemExpand(const std::string& langs, const std::string& _term,
47
            vector<string>& result)
47
            vector<string>& result)
48
{
48
{
49
    vector<string> llangs;
49
    vector<string> llangs;
50
    stringToStrings(langs, llangs);
50
    stringToStrings(langs, llangs);
51
    
52
    // The stemdb keys may have kept their diacritics or not but they
53
    // are always lower-case. It would be more logical for the term
54
    // transformers to perform before doing the stemming, but this
55
    // would be inefficient when there are several stemming languages
56
    string term;
57
    unacmaybefold(_term, term, "UTF-8", UNACOP_FOLD);
51
58
52
    for (vector<string>::const_iterator it = llangs.begin();
59
    for (vector<string>::const_iterator it = llangs.begin();
53
     it != llangs.end(); it++) {
60
     it != llangs.end(); it++) {
54
    SynTermTransStem stemmer(*it);
61
    SynTermTransStem stemmer(*it);
55
    XapComputableSynFamMember expander(getdb(), synFamStem, *it, &stemmer);
62
    XapComputableSynFamMember expander(getdb(), synFamStem, *it, &stemmer);