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
new(token_stream) → token_stream
click to toggle source
Create an LowerCaseFilter which normalizes a token's text to lowercase based on the current locale.
static VALUE
frb_lowercase_filter_init(VALUE self, VALUE rsub_ts)
{
TokenStream *ts = frb_get_cwrapped_rts(rsub_ts);
#ifndef POSH_OS_WIN32
if (!frb_locale) frb_locale = setlocale(LC_CTYPE, "");
#endif
ts = mb_lowercase_filter_new(ts);
object_add(&(TkFilt(ts)->sub_ts), rsub_ts);
Frt_Wrap_Struct(self, &frb_tf_mark, &frb_tf_free, ts);
object_add(ts, self);
return self;
}