Switch to unified view

a/src/rcldb/stemdb.cpp b/src/rcldb/stemdb.cpp
...
...
57
    }
57
    }
58
58
59
#ifndef RCL_INDEX_STRIPCHARS
59
#ifndef RCL_INDEX_STRIPCHARS
60
    // Expand the unaccented stem
60
    // Expand the unaccented stem
61
    if (!o_index_stripchars) {
61
    if (!o_index_stripchars) {
62
  string unac;
63
  unacmaybefold(term, unac, "UTF-8", UNACOP_UNAC);
64
  if (term != unac) {
62
    for (vector<string>::const_iterator it = llangs.begin();
65
        for (vector<string>::const_iterator it = llangs.begin();
63
         it != llangs.end(); it++) {
66
       it != llangs.end(); it++) {
64
        SynTermTransStem stemmer(*it);
67
      SynTermTransStem stemmer(*it);
65
        XapComputableSynFamMember expander(getdb(), synFamStemUnac, 
68
      XapComputableSynFamMember expander(getdb(), synFamStemUnac, 
66
                           *it, &stemmer);
69
                         *it, &stemmer);
67
      string unac;
68
      unacmaybefold(term, unac, "UTF-8", UNACOP_UNAC);
69
        (void)expander.synExpand(unac, result);
70
      (void)expander.synExpand(unac, result);
71
      }
70
    }
72
    }
71
    }
73
    }
72
#endif 
74
#endif 
73
75
74
    if (result.empty())
76
    if (result.empty())
75
    result.push_back(term);
77
    result.push_back(term);
76
78
77
    sort(result.begin(), result.end());
79
    sort(result.begin(), result.end());
78
    vector<string>::iterator uit = unique(result.begin(), result.end());
80
    vector<string>::iterator uit = unique(result.begin(), result.end());
79
    result.resize(uit - result.begin());
81
    result.resize(uit - result.begin());
80
    LOGDEB0(("stemExpand:%s: %s ->  %s\n", langs.c_str(), term.c_str(),
82
    LOGDEB1(("stemExpand:%s: %s ->  %s\n", langs.c_str(), term.c_str(),
81
         stringsToString(result).c_str()));
83
         stringsToString(result).c_str()));
82
    return true;
84
    return true;
83
}
85
}
84
86
85
87