    /*
     *  call-seq:
     *     analyzer.token_stream(field_name, input) -> token_stream
     *
     *  Create a new TokenStream to tokenize +input+. The TokenStream created will
     *  also depend on the +field_name+ in the case of the PerFieldAnalyzer.
     *
     *  field_name:: name of the field to be tokenized
     *  input::      data from the field to be tokenized
     */
    static VALUE
    frb_pfa_analyzer_token_stream(VALUE self, VALUE rfield, VALUE rstring)
    {
        Analyzer *pfa, *a;
        Symbol field = frb_field(rfield);
        GET_A(pfa, self);

        StringValue(rstring);
        a = (Analyzer *)h_get(PFA(pfa)->dict, field);
        if (a == NULL) {
            a = PFA(pfa)->default_a;
        }
        if (a->get_ts == cwa_get_ts) {
            return rb_funcall(CWA(a)->ranalyzer, id_token_stream, 2,
                              FSYM2SYM(field), rb_str_new2(rs2s(rstring)));
        }
        else {
            return get_rb_ts_from_a(a, rfield, rstring);
        }
    }