Learn R Programming

wordvector (version 0.5.1)

analogy: Convert formula to named character vector

Description

Convert a formula to a named character vector in analogy tasks.

Usage

analogy(formula)

Value

a named character vector to be passed to similarity().

Arguments

formula

a formula object that defines the relationship between words using + or - operators.

See Also

similarity()

Examples

Run this code
analogy(~ berlin - germany + france)
analogy(~ quick - quickly + slowly)

Run the code above in your browser using DataLab