I wrote a python script for finding frequency of terms in database. Thought of sharing since it could would come handy for introspecting database. Possibly it could be included as an example to python bindings.. regards supreet -- Supreet Sethi http://findmeajob.wordpress.com -------------- next part -------------- A non-text attachment was scrubbed... Name: simplefreq.py Type: text/x-python Size: 414 bytes Desc: not available Url : http://lists.xapian.org/pipermail/xapian-discuss/attachments/20080313/a49e1cbb/attachment.py
On Thu, Mar 13, 2008 at 09:24:47AM +0530, s|s wrote:> I wrote a python script for finding frequency of terms in database. > Thought of sharing since it could would come handy for introspecting > database. Possibly it could be included as an example to python > bindings..There's a wiki page for contributing examples: http://wiki.xapian.org/SampleCode FWIW, I think it would be more natural to write the loop as: for t in database.allterms(): print t.termfreq, t.term Cheers, Olly