Class: Ferret::Analysis::LowerCaseFilter
Summary
LowerCaseFilter normalizes a token‘s text to lowercase based on the current locale.
Example
["One", "TWO", "three", "RÉSUMÉ"] => ["one", "two", "three", "résumé"]
Public Class Methods
LowerCaseFilter.new(token_stream) → token_stream
Create an LowerCaseFilter which normalizes a token‘s text to lowercase based on the current locale.
/*
* call-seq:
* LowerCaseFilter.new(token_stream) -> token_stream
*
* Create an LowerCaseFilter which normalizes a token's text to
* lowercase based on the current locale.
*/
static VALUE
frt_lowercase_filter_init(VALUE self, VALUE rsub_ts)
{
TokenStream *ts = frt_get_cwrapped_rts(rsub_ts);
#ifndef POSH_OS_WIN32
if (!frt_locale) frt_locale = setlocale(LC_CTYPE, "");
#endif
ts = mb_lowercase_filter_new(ts);
object_add(&(TkFilt(ts)->sub_ts), rsub_ts);
Frt_Wrap_Struct(self, &frt_tf_mark, &frt_tf_free, ts);
object_add(ts, self);
return self;
}