Today while compiling ferret I noticed there was a Portuguese stemmer
being compiled. How do I enable it’s use for my index?
Pedro.
Today while compiling ferret I noticed there was a Portuguese stemmer
being compiled. How do I enable it’s use for my index?
Pedro.
Hi Pedro,
You need to build a custom analyzer. Maybe something like this;
class PortugueseAnalyzer
def token_stream(field, string)
StemFilter.new(StopFilter.new(StandardTokenizer.new(string),
FULL_PORTUGUESE_STOP_WORDS),
"pt", "UTF_8")
end
end
index = Index.new(:analyzer => PortugueseAnalyzer.new)
I hope the formatting works in your email reader.
Cheers,
Dave
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs