search for: stem_som

Displaying 17 results from an estimated 17 matches for "stem_som".

Did you mean: stem_some
2011 May 27
1
Does OP_NEAR works with stemming?
...(pos=1) NEAR 11 Zstore:(pos=2)" but retrieved nothing. However, if I type in "Apple Store", the query is parsed as Xapian::Query((apple:(pos=1) NEAR 11 store:(pos=2))) and some results are showed. I'm not sure whether this has something to do with the stemming, and what I used is stem_some. Any clue is helpful, thank you! Best, Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20110528/beb4e752/attachment.html>
2010 Oct 28
1
hypens in words + NEAR + 3 terms + AND_MAYBE => crash
...anything with a hyphen in it but word characters at the beginning and end ("3--3" will do). The other 2 terms can be anything. "test NEAR x-y NEAR test" will not cause a crash, but "test NEAR test NEAR x-y" will. Stemming language was "english", strategy STEM_SOME. Default op was OP_AND_MAYBE. This is the offending Perl code: [...] my $qp = Search::Xapian::QueryParser->new(); my $stemmer = Search::Xapian::Stem->new("english"); $qp->set_stemmer($stemmer); $qp->set_database($database); $qp->set_stemming_stra...
2011 Sep 23
2
understanding stemming and synonyms
I am working with version 1.2.7 and want to use stemming and synonyms. I use the perl-bindings and get some problems. First of all: the perl-bindings dont allow the QueryParser a third argument when calling parse_query! So i cannot set a default prefix (which perhaps is the solution to my problem, but later more) i have a simple testcase: 3 documents, every document only has one word:
2018 Nov 30
1
Xapian Benchmark results
...WritableDatabase *db ) { int i =0; char line[2048]; string line_string; Xapian::TermGenerator indexer; Xapian::Stem stemmer("english"); indexer.set_stemmer(stemmer); // doc.set_data("content"); indexer.set_stemming_strategy(Xapian::TermGenerator::STEM_SOME); Xapian::WritableDatabase database = *db; try{ for(i=0;i<documents.size();++i) { ifstream file; file.open(documents[i]); line_string = ""; while(file.good()) { file.getline(line, sizeof(line...
2008 Mar 27
2
Proper noun stemming
...my documents before adding them to a database. During the stemming process I would like to find a way of keeping proper nouns that span two or more words together as a phrase. For example "New York" or "Gordon Brown" or "Prime Minister" get spilt up. I see the STEM_SOME allows some operators, but I can't see how these might help in this situation. Any ideas would be appreciated as always. Many thanks Colin
2009 Mar 02
0
Xapian, PHP bindings and
...et(); $qp = new XapianQueryParser(); $stemmer = new XapianStem( 'french' ); $qp->set_stemmer($stemmer); $qp->set_database($database); $qp->set_stemming_strategy(XapianQueryParser::STEM_SOME); $query = $qp->parse_query( $query_string ); //, XapianQueryParser::FLAG_SPELLING_CORRECTION); print 'Parsed query is: '. $query->get_description() .'<br />'."\n"; // Find the top 10 results for the query....
2009 Aug 17
1
Xapian DatabaseError
...database = new XapianDatabase($path); $enquire = new XapianEnquire($database); $qp = new XapianQueryParser(); $stemmer = new XapianStem("italian"); $qp->set_stemmer($stemmer); $qp->set_database($database); $qp->set_stemming_strategy(XapianQueryParser::STEM_SOME); $query = $qp->parse_query($query); echo "<br>Parsed query is: {$query->get_description()}\n"; $enquire->set_query($query); $matches = $enquire->get_mset(0, 10); ...... ?> 3) To test the code as php script --&gt...
2010 Mar 31
1
Hyphen search with parse_query()
...;) and find it. To start with I'm trying to use a basic python script to get to grips with it. When I do this:: qp = xapian.QueryParser() stemmer = xapian.Stem("english") qp.set_stemmer(stemmer) qp.set_database(database) qp.set_stemming_strategy(xapian.QueryParser.STEM_SOME) print "Query string is:", repr(query_string) query = qp.parse_query(query_string) print "Parsed query is: %s" % str(query) I get the following output:: Query string is: 'peter-bengtsson' Parsed query is: Xapian::Query((ssh:(pos=1) PHRASE 2 bengtsson:...
2012 Jun 04
1
Search not finding queries with stop words.
I have a search in perl that looks a bit like: my $qp = new Search::Xapian::QueryParser(); $qp->set_stemmer(new Search::Xapian::Stem("english")); $qp->set_stemming_strategy(STEM_SOME); $qp->set_default_op($defaultop); ... my $par = $qp->parse_query($query); my $enq = $xDatabase->enquire( $par ); and in the db create script: my $stopper = Search::Xapian::SimpleStopper->new(); foreach my $word (@ar) { $stopper->add($word); } ......
2013 Aug 21
2
Perl interface isn't working in 1.2.x
...isn't working the way it used to. Code: $db = Search::Xapian::Database->new( $dx ); my $qp = Search::Xapian::QueryParser->new(); my $dbSize=$db->get_doccount(); # $qp->set_stemmer(new Search::Xapian::Stem("english")); # $qp->set_stemming_strategy(STEM_SOME); # $qp->set_default_op($defaultop); my $par = $qp->parse_query($query); my $enq = $db->enquire( $par ); my @matches = $enq->matches($nstart,$nrecords); my $mset = $enq->get_mset($nstart,$nrecords); my $est = $mset->get_matches_estimated(); my $t...
2007 May 30
1
QueryParser prefixing terms when stemming?
...rsion 0.9.9.1 of Search::Xapian, the following code results in this output "Xapian::Query(pet:(pos=1))". my $qp = new Search::Xapian::QueryParser; $qp->set_stemmer(new Search::Xapian::Stem('english')); $qp->set_default_op(OP_AND); $qp->set_stemming_strategy(STEM_SOME); warn $qp->parse_query($search_term); In version 1.0.0.0, the same code results in "Xapian::Query(Zpet: (pos=1))". The result is no matches, even though the term pet exists. If I use STEM_NONE, the output is the same as the output from 0.9.9.1 and there are matches. It s...
2012 Jan 20
2
Perl version of sortable_serialize missing?
I attempted to use the sortable_serialize function from perl, however doesn't seem to exist. The only occurrence of the string "sortable" in the /usr/local/perl/5.10.1/Search/ tree is in the pod in Xapian.pm. What am I doing wrong? use Search::Xapian; ... $doc->add_value(4,sortable_serialize($recdate)); Undefined subroutine &main::sortable_serialize called
2018 Jul 19
1
choosing between probabilistic and boolean prefixes for terms
...w($LANG) } sub qp { my ($self) = @_; my $qp = $self->{query_parser}; return $qp if $qp; # new parser $qp = Search::Xapian::QueryParser->new; $qp->set_default_op(OP_AND); $qp->set_database($self->{xdb}); $qp->set_stemmer($self->stemmer); $qp->set_stemming_strategy(STEM_SOME); $qp->set_max_wildcard_expansion(100); $qp->add_valuerangeprocessor( Search::Xapian::NumberValueRangeProcessor->new(YYYYMMDD, 'd:')); $qp->add_valuerangeprocessor( Search::Xapian::NumberValueRangeProcessor->new(DT, 'dt:')); In any case, all the code is avail...
2013 Sep 22
2
How to filter search result with query with has white space.
...R); qp.set_stemmer(stemmer); qp.add_prefix("","title"); qp.add_prefix("","content"); qp.add_boolean_prefix("title","title"); qp.set_database(db); qp.set_stemming_strategy(Xapian::QueryParser::STEM_SOME); Xapian::Query query = qp.parse_query(query_string); std::cout << "Parsed query is: " << query.get_description() << std::endl; enquire.set_query(query); Xapian::MSet matches = enquire.get_mset(0, 10); std::cout << matches.g...
2013 Sep 22
2
How to filter search result with query with has white space.
...R); qp.set_stemmer(stemmer); qp.add_prefix("","title"); qp.add_prefix("","content"); qp.add_boolean_prefix("title","title"); qp.set_database(db); qp.set_stemming_strategy(Xapian::QueryParser::STEM_SOME); Xapian::Query query = qp.parse_query(query_string); std::cout << "Parsed query is: " << query.get_description() << std::endl; enquire.set_query(query); Xapian::MSet matches = enquire.get_mset(0, 10); std::cout << matches.g...
2014 Jan 21
2
seg fault on search
...db); try { Xapian::QueryParser qp; Xapian::Stem stemmer("english"); qp.set_database(db); qp.set_default_op(Query::OP_OR); qp.set_stemmer(stemmer); qp.set_stemming_strategy(QueryParser::STEM_SOME); Xapian::Query q=qp.parse_query(queryString); ... As soon as it hits the q=qp.parse_query line it gets the seg fault. The function is called like so: int main (int argc, char* const argv[]) { int i; char results[100000]; if (argc<2) {...
2013 Aug 26
2
Perl interface isn't working in 1.2.x
On 08/25/2013 05:02 PM, Olly Betts wrote: > So the simple fix is > probably just to install the perl-Search-Xapian RPM instead. Thanks, the Centos 6 repos don't have that rpm and the http://xapian.org/download page seems to only cover the XS bindings, if I am reading this correctly: But I was able to remove the rpm packages and compile and install the core and swig from source.