Learn R Programming

lfl (version 2.1.0)

horizon: Create a function that computes linguistic horizons

Description

Based on given context and atomic expression, this function returns a function that computes a linguistic horizon, i.e. a triangular function representing basic limits of what humans treat as "small", "medium", "big" etc. within given context. Linguistic horizon stands as a base for creation of linguistic expressions. A linguistic expression is created by applying a hedge() on horizon. (Atomic linguistic expression is created from horizon by applying an empty (-) hedge).

Usage

horizon(
  context,
  atomic = c("sm", "me", "bi", "lm", "um", "ze", "neg.sm", "neg.me", "neg.bi",
    "neg.lm", "neg.um")
)

Arguments

context

A context of linguistic expressions (see ctx3(), ctx5(), ctx3bilat() or ctx5bilat())

atomic

An atomic expression whose horizon we would like to obtain

Value

A function of single argument that must be a numeric vector

Details

The values of the atomic parameter have the following meaning (in ascending order):

  • neg.bi: big negative (far from zero)

  • neg.um: upper medium negative (between medium negative and big negative)

  • neg.me: medium negative

  • neg.lm: lower medium negative (between medium negative and small negative)

  • neg.sm: small negative (close to zero)

  • ze: zero

  • sm: small

  • lm: lower medium

  • me: medium

  • um: upper medium

  • bi: big

Based on the context type, the following atomic expressions are allowed:

  • ctx3() (trichotomy): small, medium, big;

  • ctx5() (pentachotomy): small, lower medium, medium, upper medium, big;

  • ctx3bilat() (bilateral trichotomy): negative big, negative medium, negative small, zero, small, medium, big;

  • ctx5bilat() (bilateral pentachotomy): negative big, negative medium, negative small, zero, small, medium, big.

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

See Also

ctx3(), ctx5(), ctx3bilat(), ctx5bilat(), hedge(), fcut(), lcut()

Examples

Run this code
# NOT RUN {
    plot(horizon(ctx3(), 'sm'), from=-1, to=2)
    plot(horizon(ctx3(), 'me'), from=-1, to=2)
    plot(horizon(ctx3(), 'bi'), from=-1, to=2)

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

Run the code above in your browser using DataLab