operator: letter-ngrams

    description:
        letter-ngrams[k1, k2, ..., kn] ket
        create letter ngrams, of specified sizes
        the result is multiplied by the coefficient of the ket

    examples:
        letter-ngrams[1] |fish>
            |f> + |i> + |s> + |h>

        -- same thing again, but this time the ket has coefficient of 3.2:
        letter-ngrams[1] 3.2|fish>
            3.2|f> + 3.2|i> + 3.2|s> + 3.2|h>

        letter-ngrams[1] |happy>
            |h> + |a> + 2|p> + |y>

        letter-ngrams[1,2,3] |happy>
            |h> + |a> + 2|p> + |y> + |ha> + |ap> + |pp> + |py> + |hap> + |app> + |ppy>

    see also:
        word-ngrams

Home