From Mikolov paper Based on related move of a vector regarding a basis. King is to Quenn what a man is to ??? w1 - w2 + w3

get_analogies(model, w1, w2, w3, k = 1)

Arguments

model

trained fastText model. Null if train a new model.

w1

1st word, basis

w2

2nd word, move

w3

3d word, new basis

k

number of words to return

Value

a numeric with distances and names are words

Examples

library(fastrtext) model_test_path <- system.file("extdata", "model_unsupervised_test.bin", package = "fastrtext") model <- load_model(model_test_path) get_analogies(model, "experience", "experiences", "result")
#> results #> 0.726607