Predication {LSAfun}R Documentation

Compute Vector for Predicate-Argument-Expressions

Description

Computes vectors for complex expressions of type PREDICATE[ARGUMENT] by applying the method of Kintsch (2001) (see Details).

Usage

Predication(P,A,m,k,tvectors=tvectors,norm="none")

Arguments

P

Predicate of the expression, a single word (character vector)

A

Argument of the expression, a single word (character vector)

m

number of nearest words to the Predicate that are initially activated

k

size of the k-neighborhood; k \le m

tvectors

the semantic space in which the computation is to be done (a numeric matrix where every row is a word vector)

norm

whether to normalize the single word vectors before applying a composition function. Setting norm = "none" will not perform any normalizations, setting norm = "all" will normalize every involved word vector (Predicate, Argument, and every single activated neighbor). Setting norm = "block" will normalize the Argument vector and will normalize the [Predicate + neighbors] vector, to weight the Argument and the "Predicate in context" equally.

Details

The vector for the expression is computed following the Predication Process by Kintsch (2001):

The m nearest neighbors to the Predicate are computed. Of those, the k nearest neighbors to the Argument are selected. The vector for the expression is then computed as the sum of Predicate vector, Argument vector, and the vectors of those k neighbors (the k-neighborhood).

Value

An object of class Pred: This object is a list consisting of:

$PA

The vector for the complex expression as described above

$P.Pred

The vector for Predicate plus the k-neighborhoodvectors without the Argument vector

$neighbors

The words in the k-neighborhood.

$P

The Predicate given as input

$A

The Argument given as input

Author(s)

Fritz Guenther

References

Kintsch, W. (2001). Predication. Cognitive Science, 25, 173-202.

See Also

cosine, neighbors, multicos, compose

Examples

data(wonderland)

Predication(P="mad",A="hatter",m=20,k=3,tvectors=wonderland)

[Package LSAfun version 0.7.1 Index]