Displaying 20 results from an estimated 20000 matches similar to: "Porblem with custom analyzer"
2007 Sep 07
5
Custom Analyser .. where to put it ??
Hi,
I m trying to use a custom analyser to add my french stop words... i m
reading the tutorial at :
http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage
My problem is that i ve no idea where to put my custom Analyser class
like :
class GermanStemmingAnalyzer < Ferret::Analysis::Analyzer
include Ferret::Analysis
def initialize(stop_words = FULL_GERMAN_STOP_WORDS)
2007 May 03
2
Custom analyzer weirdness with 0.11.3
Hi-
I was previously using 0.11.4, and I wrote my own analyzer. Everything
worked fine.
When I took the system to production, 0.11.4 starting failing updating
the index, complaining that files were missing. The failure always
happened on the same model document, and was completely reproducible.
This failure looked a lot like the one described at
http://www.ruby-forum.com/topic/104145.
I
2006 Oct 23
2
Trouble with custom Analyzer
Hi!
I wanted to build my own custom Analyzer like so:
class Analyzer < Ferret::Analysis::Analyzer
include Ferret::Analysis
def initialize(stop_words = ENGLISH_STOP_WORDS)
@stop_words = stop_words
end
def token_stream(field, string)
StopFilter.new(LetterTokenizer.new(string, true), @stop_words)
end
end
As one can easily spot, I essentially want
2006 Sep 15
1
Custom analyzer not invoked?
Hello,
I''m trying to define my own analyzer by doing something like:
#-----------------------------------------------------
require ''ferret''
include Ferret
class MyAnalyzer < Analysis::Analyzer
def token_stream(field, str)
# Display results of analysis
puts ''Analyzing: field:%s str:%s'' % [field, str]
t =
2006 Dec 08
4
Using custom stem analyzer giving mongrel errors
I''m using the custom stem analyzer:
require ''rubygems''
require ''ferret''
include Ferret
module Ferret::Analysis
class FerretAnalyzer
def initialize(stop_words = FULL_ENGLISH_STOP_WORDS)
@stop_words = stop_words
end
def token_stream(field, text)
StemFilter.new(StopFilter.new(LowerCaseFilter.new(StandardTokenizer.new(text)),
2006 Oct 14
2
customer analyzer?
I''d like to make my own analyzer for stemming, but where do I put it or
how do I reference it?
--
Posted via http://www.ruby-forum.com/.
2006 Apr 20
1
Creating my own analyzer
I created this analyzer:
class DescriptionAnalyzer < Ferret::Analysis::Analyzer
def token_stream(field, string)
if field == "code"
return CodeTokenStream.new(string)
else
return Ferret::Analysis::Analyzer.new.token_stream(field,string)
end
end
end
and created an IndexWriter with it:
Ferret::Index::IndexWriter.new(get_index_path,
2007 Sep 06
5
Find by contents and missing ferret_score method
Hi,
i m using acts as ferret via the find_by_contents, and then i my trying
to get the score of each results...
But the score of ferret_score method is missing...
I ve got the @total_hits in the array, but not the @score one :/
What s going on ?
Is this method disappear in acts_as_ferret ?
thanks
Guillaume.
--
Posted via http://www.ruby-forum.com/.
2006 Dec 06
1
AAF - Stem Analyzer
I''m not on AAF. Can someone else help Raymond with an example?
On 12/6/06, Raymond O''connor <nappin713 at yahoo.com> wrote:
>
> Matt Schnitz wrote:
> > You also need to stem-analyze the incoming query.
> >
> > I had this same problem. :^>
> >
> >
> > Schnitz
>
> Do you have an example of how to do this? I''m using
2006 Oct 27
1
Regexpr. analyzer
Hi!
I want to index html files, but w/o the tags, so I was thinking either I
remove them before I index it (expensive), or put up an RegExpAnalyzer.
BTW, when using an analyzer, does that mean that everything which it
declines (i.e. the RegExpAnalyzer doesn''t match) won''t be put into the
index files (i.e. blows it up)?
I came up with a simple test, which didn''t
2006 Sep 09
3
Per field analyzer
Is there a way to add per-field analyzer? I can''t seem to find a way to do that.
Thanks
--
Kent
---
http://www.datanoise.com
2007 May 09
3
bug when assigning new analyzer?
require ''rubygems''
require ''ferret''
include Ferret
PATH = ''/tmp/ferret_stopwords_test''
index = Index::IndexWriter.new(:path => PATH, :create => true)
index.analyzer = Analysis::StandardAnalyzer.new([])
index << {:title => ''a few good men'', :language => ''en''}
index.analyzer =
2007 Mar 06
1
case-sensitivity of analyzer
Is there anything about this analyzer that says "case-sensitive" to you?
module Ferret::Analysis
class StemmingAnalyzer
def token_stream(field, text)
StemFilter.new(StandardTokenizer.new(text))
end
end
end
Just wondering how I can force my index to be case-insensitive.
Thanks,
-Adam
--
Posted via http://www.ruby-forum.com/.
2006 Aug 22
3
synonyms
Hi,
Using ferret and acts_as_ferret.
Great work.
Is there a way to define some synonyms (searchable words that would not
appear in the texts ?
Like stop words, but instead of being removed from query and index,
they would be added ;-)
Can some synonyms be regexp ? I''d like for instance to have ? (oelig)
be equivalent to oe in French.
Or maybe an utf8 normalization could achieve
2006 Jan 18
0
different Analyzer defaults
Hi.
While experimenting with the QueryParser to search fields containing
only numbers, I discovered that the default Analyzer for IndexWriter
differs from QueryParser''s (StandardAnalyzer vs. Analyzer). Is there
a reason for this?
(Trac ticket is here:)
http://ferret.davebalmain.com/trac/ticket/27
seth
2006 Jul 07
4
How to add Asia token analyzer to ferret simply?
Hi,David
Can you give me an example of how to add analyzer to ferret to Asian
languages?
My web application will have to support multi language search,which
means,for example,both Chinese and English will be searched through the
form.
Currently,I have decided to use the simple token principles,which means
that every Chinese character will be a token,although this is not so
well in some
2007 Nov 13
8
acts_as_ferret : cannot use a customized Analyzer (as indicated in the AdvancedUsageNotes)
Hi all,
I cannot make aaf (rev. 220) use my custom analyzer, despite following the
indications @
http://projects.jkraemer.net/acts_as_ferret/wiki/AdvancedUsage
To pinpoint the problem, I created a model + a simple analyzer with 2 stop
words : "fax" and "gsm".
test 1 : model.rebuild_index + model.find_by_contents("fax") # fax is a
stop word.
=> I get a
2009 Apr 09
4
Weird analyzer issue with the word ''fly''
Hi all
I''m using a_a_f in rails with a StemmingAnalyzer, in the index and in my
search. I got the idea from this topic:
http://www.ruby-forum.com/topic/80178
I''m having a problem with some search terms - i narrowed one of them
down to the inclusion of the word ''fly''. Can anyone give me any clues
at to what might be happening, or even how i can investigate?
2006 Dec 06
10
Stem Analyzer
Hi all,
I am trying to implement a search that will use the Stem Analyzer. I
added the Stem Anaylzer from the examples shown in another post
http://ruby-forum.com/topic/80178#147014
module Ferret::Analysis
class StemmingAnalyzer
def token_stream(field, text)
StemFilter.new(StandardTokenizer.new(text))
end
end
end
The problem with the Stem analyzer is that when I search for a
2006 Sep 06
9
Which analyzer to use
Lucene''s standard analyzer splits words separater with underscores.
Ferret doesn''t do this. For example, if I create an index with only
document ''test_case'' and search for ''case'' it doesn''t find anything.
Lucene on the other hand finds it. The same story goes for words
separated by colons.
Which analyzer should I use to emulate