hedge: Linguistic hedges

View source: R/hedge.R

hedgeR 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:

  • ex: extremely,

  • si: significantly,

  • ve: very,

  • ty: typically,

  • -: empty hedge (no hedging),

  • ml: more or less,

  • ro: roughly,

  • qr: quite roughly,

  • vr: very roughly.

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'))


beerda/lfl documentation built on Feb. 15, 2023, 8:15 a.m.