Package flashcards
Class Deduplicate
- java.lang.Object
-
- flashcards.Deduplicate
-
public class Deduplicate extends Object
Consolidate a set of flashcards by finding redundant cards.
-
-
Method Detail
-
deduplicate
public static Map<Flashcard,Set<Flashcard>> deduplicate(Set<Flashcard> originalCards)
Deduplicate a set of flashcards. This method finds groups of similar cards within the set, and for each group of similar cards, recommends one canonical flashcard that includes the information from all cards in the group. This allows the user to learn more efficiently using the set of canonical cards instead. This set may have fewer cards than the original set, but it contains the same information relevant to learning. Two cards are similar if they have identical fronts and different backs. Cards can be similar for other reasons as well.- Parameters:
originalCards
- a set of flashcards- Returns:
- a map in which each key is a canonical card mapping to a nonempty set of similar cards. The sets of similar cards are disjoint, and their union is originalCards.
-
-