conSIM: Similarity in Context

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

Description

Compute Similarity of a word with a set of two other test words, given a third context word

Usage

1
conSIM(x,y,z,c,tvectors=tvectors,breakdown=TRUE)

Arguments

x

The relevant word, given as a character of length(x) = 1

y, z

The two test words, given each as a character of length(y) = 1

c

The context word in respect to which the similarity of x to y and z is to be computed (a character of length(y) = 1)

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

Details

Following the example from Kintsch (2014): If one has to judge the similarity between France one the one hand and the test words Germany and Spain on the other hand, this similarity judgement varies as a function of a fourth context word. If Portugal is given as a context word, France is considered to be more similar to Germany than to Spain, and vice versa for the context word Poland. Kintsch (2014) proposed a context sensitive, asymmetrical similarity measure for cases like this, which is implemented here

Value

A list of two similarity values:
SIM_XY_zc: Similarity of x and y, given the alternative z and the context c
SIM_XZ_yc: Similarity of x and z, given the alternative y and the context c

Author(s)

Fritz Günther

References

Kintsch, W. (2015). Similarity as a Function of Semantic Distance and Amount of Knowledge. Psychological Review, 121, 559-561.

Tversky, A. (1977). Features of similarity. Psychological Review, 84, 327-352.

See Also

Cosine asym

Examples

1
2
3
data(wonderland)

conSIM(x="rabbit",y="alice",z="hatter",c="dormouse",tvectors=wonderland)

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