hi I have a few questions: 1. I wud like to know what exactly happens during query expansion,that is, how are the relevent documents used while coming up with expansion terms. Some explanation that is less mathematical than the one given in "Introduction to IR" wud be preferred. Given below is the syntax for query expansion in c++. Can anyone give the corresponding syntax in php? -------------- Xapian::RSet reldocs; *for* (; optpos < argc; optpos++) { Xapian::docid rdid = atoi(argv[optpos]); *if* (rdid != 0) { reldocs.add_document(rdid); } } --------------- *if* (reldocs.empty()) { Xapian::MSetIterator i; *int* j; *for* (i = matches.begin(), j = 0; (i != matches.end()) && (j < 5); ++i, ++j) { reldocs.add_document(*i); } } // Get the suggested expand terms Xapian::ESet eterms = enquire.get_eset(10, reldocs); // Display the expand terms cout << eterms.size() << " suggested additional terms" << endl; *for* (Xapian::ESetIterator k = eterms.begin(); k != eterms.end(); ++k) { cout << "Term `" << *k << "'\t " << "(weight " << k.get_weight() << ")" << endl; } 2. The syntax fr xapian bindings-php given in bindings.html seems to be insufficient..Is there any way by which i can find out what is the corresponding function in php for a given function in c++? I went thru xapian_wrap.cc. I think thats where the wrapping has been done and hence thats where i can find the syntax fr xapian bindings-php.Am I right? 3. What is the syntax for wildcard(*) search in xapian bindings-php? Thanks. Durga doubtfire40008@gmail.com
On Fri, Mar 31, 2006 at 12:31:54AM +0530, durga bidaye wrote:> 1. I wud like to know what exactly happens during query expansion,that is, > how are the relevent documents used while coming up with expansion terms. > Some explanation that is less mathematical than the one given in > "Introduction to IR" wud be preferred.Sorry, that's the only explanation we currently have to offer. You could try searching in google for an alternative description - what we implement is a standard part of probabilistic information retrieval.> 2. The syntax fr xapian bindings-php given in bindings.html seems to be > insufficient..Is there any way by which i can find out what is the > corresponding function in php for a given function in c++?The section "Object orientation" of bindings.html for PHP tells you *exactly* how to find the PHP name of the wrapper for a given C++ function.> I went thru xapian_wrap.cc. I think thats where the wrapping has been > done and hence thats where i can find the syntax fr xapian > bindings-php.Am I right?That file is automatically generated by SWIG, so it's pretty hard to understand. I'd not recommend it as a source of reference.> 3. What is the syntax for wildcard(*) search in xapian bindings-php?You need to pass QueryParser_FLAG_WILDCARD in the flags bitmap argument to QueryParser_parse_query, much as you would in C++. Cheers, Olly