Computes vectors for complex expressions of type PREDICATE[ARGUMENT] by applying the method of Kintsch (2001) (see Details).
Predication(P,A,m,k,tvectors=tvectors,norm="none")An object of class Pred: This object is a list consisting of:
$PAThe vector for the complex expression as described above
$P.PredThe vector for Predicate plus the k-neighborhoodvectors without the Argument vector
$neighborsThe words in the k-neighborhood.
$PThe Predicate given as input
$AThe Argument given as input
Predicate of the expression, a single word (character vector)
Argument of the expression, a single word (character vector)
number of nearest words to the Predicate that are initially activated
size of the k-neighborhood; k \(\le\) m
the semantic space in which the computation is to be done (a numeric matrix where every row is a word vector)
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.
Fritz Guenther
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).
Kintsch, W. (2001). Predication. Cognitive Science, 25, 173-202.
cosine,
neighbors,
multicos,
compose
data(wonderland)
Predication(P="mad",A="hatter",m=20,k=3,tvectors=wonderland)Run the code above in your browser using DataLab