|
a/src/rcldb/rclterms.cpp |
|
b/src/rcldb/rclterms.cpp |
|
... |
|
... |
268 |
sdb.stemExpand(lang, *it, exp1);
|
268 |
sdb.stemExpand(lang, *it, exp1);
|
269 |
}
|
269 |
}
|
270 |
exp1.swap(lexp);
|
270 |
exp1.swap(lexp);
|
271 |
sort(lexp.begin(), lexp.end());
|
271 |
sort(lexp.begin(), lexp.end());
|
272 |
lexp.erase(unique(lexp.begin(), lexp.end()), lexp.end());
|
272 |
lexp.erase(unique(lexp.begin(), lexp.end()), lexp.end());
|
273 |
LOGDEB(("ExpTerm: stemexp: %s\n",
|
273 |
LOGDEB(("ExpTerm: stemexp: %s\n",
|
274 |
stringsToString(lexp).c_str()));
|
274 |
stringsToString(lexp).c_str()));
|
275 |
}
|
275 |
}
|
276 |
|
276 |
|
277 |
// Expand the result for synonyms. Note that doing it here
|
|
|
278 |
// means that multi-term synonyms will not work
|
|
|
279 |
// (e.g. stakhanovist -> "hard at work". We would have to
|
|
|
280 |
// separate the multi-word expansions for our caller to
|
|
|
281 |
// add them as phrases to the query. Not impossible, but
|
|
|
282 |
// let's keep it at single words for now.
|
|
|
283 |
if (m_syngroups.ok() && (typ_sens & ET_SYNEXP)) {
|
277 |
if (m_syngroups.ok() && (typ_sens & ET_SYNEXP)) {
|
284 |
LOGDEB(("ExpTerm: got syngroups\n"));
|
278 |
LOGDEB(("ExpTerm: got syngroups\n"));
|
285 |
vector<string> exp1(lexp);
|
279 |
vector<string> exp1(lexp);
|
286 |
for (vector<string>::const_iterator it = lexp.begin();
|
280 |
for (vector<string>::const_iterator it = lexp.begin();
|
287 |
it != lexp.end(); it++) {
|
281 |
it != lexp.end(); it++) {
|