hedge {lfl}R Documentation

Linguistic hedges

Description

Returns a function that realizes linguistic hedging - i.e. transformation of linguistic horizon (see horizon()) into a linguistic expression.

Usage

hedge(
  type = c("ex", "si", "ve", "ty", "-", "ml", "ro", "qr", "vr"),
  hedgeParams = defaultHedgeParams
)

Arguments

type

The type of the required linguistic hedge

hedgeParams

Parameters that determine the shape of the hedges

Details

hedge() returns a function that realizes the selected linguistic hedge on its parameter:

This function is quite low-level. Perhaps a more convenient way to create linguistic expressions is to use the lingexpr() function.

Value

Returns a function with a single argument, which has to be a numeric vector.

Author(s)

Michal Burda

See Also

horizon(), lingexpr(), fcut(), lcut(), ctx()

Examples

    a <- horizon(ctx3(), 'sm')
    plot(a)
    h <- hedge('ve')
    plot(h)
    verySmall <- function(x) h(a(x))
    plot(verySmall)

    # the last plot should be equal to:
    plot(lingexpr(ctx3(), atomic='sm', hedge='ve'))


[Package lfl version 2.2.0 Index]