Skip to content

Commit

Permalink
documentation changes word2vec_similarity (use of itemize)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwijffels committed Feb 19, 2024
1 parent cafe13f commit c955af5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## CHANGES IN word2vec VERSION 0.4.1

- documentation changes in word2vec_similarity regarding the use of braces

## CHANGES IN word2vec VERSION 0.4.0

- Drop C++11 specification in Makevars
Expand Down
4 changes: 2 additions & 2 deletions R/word2vec.R
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ predict.word2vec_trained <- function(object, newdata, type = c("nearest", "embed
#' @title Similarity between word vectors as used in word2vec
#' @description The similarity between word vectors is defined
#' \itemize{
#' \item{for type 'dot': }{as the square root of the average inner product of the vector elements (sqrt(sum(x . y) / ncol(x))) capped to zero}
#' \item{for type 'cosine': }{as the the cosine similarity, namely sum(x . y) / (sum(x^2)*sum(y^2)) }
#' \item{for type 'dot': as the square root of the average inner product of the vector elements (sqrt(sum(x . y) / ncol(x))) capped to zero}
#' \item{for type 'cosine': as the the cosine similarity, namely sum(x . y) / (sum(x^2)*sum(y^2)) }
#' }
#' @param x a matrix with embeddings where the rownames of the matrix provide the label of the term
#' @param y a matrix with embeddings where the rownames of the matrix provide the label of the term
Expand Down
4 changes: 2 additions & 2 deletions man/word2vec_similarity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c955af5

Please sign in to comment.