Predication: Compute Vector for Predicate-Argument-Expressions

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
Predication(P,A,m,k,tvectors=tvectors,breakdown=TRUE,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 m

tvectors

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

breakdown

if TRUE, the function breakdown is applied to the input

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 Günther

References

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

See Also

cosine, neighbors, multicos, compose

Examples

1
2
3
data(wonderland)

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

codymarquart/LSAfun documentation built on May 13, 2019, 8:47 p.m.