Learn R Programming

ankiR (version 0.6.0)

anki_find_similar: Search cards by content similarity

Description

Find cards with similar content to a given card or text.

Usage

anki_find_similar(
  query,
  path = NULL,
  profile = NULL,
  n = 10,
  method = "tfidf",
  within_deck = FALSE
)

Value

A tibble with similar cards and similarity scores

Arguments

query

Either a card ID or text to search for similar cards

path

Path to collection.anki2 (auto-detected if NULL)

profile

Profile name (first profile if NULL)

n

Number of similar cards to return (default 10)

method

Similarity method: "tfidf", "jaccard", or "ngram"

within_deck

Only search within same deck as query card

Examples

Run this code
if (FALSE) {
# Find cards similar to card ID 1234567890
anki_find_similar(1234567890)

# Find cards similar to specific text
anki_find_similar("mitochondria powerhouse")
}

Run the code above in your browser using DataLab