qwerty_distance: QWERTY Distance for Same Length Words

View source: R/qwerty_distance.R

qwerty.distR Documentation

QWERTY Distance for Same Length Words

Description

Computes QWERTY distance for words that have the same number of characters. Distance is computed based on the number of keys a character is away from another character on a QWERTY keyboard

Usage

qwerty.dist(wordA, wordB)

qwerty_distance(word_a, word_b)

Arguments

wordA

Legacy name for 'word_a'.

wordB

Legacy name for 'word_b'.

word_a

Character. Word to be compared

word_b

Character. Word to be compared

Value

Numeric value for distance between word_a and word_b

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

Examples

# Identical values for Damerau-Levenshtein
stringdist::stringdist("big", "pig", method = "dl")

stringdist::stringdist("big", "bug", method = "dl")

# Different distances for QWERTY
qwerty_distance("big", "pig")

qwerty_distance("big", "bug") # Probably meant to type "bug"


SemNetCleaner documentation built on Oct. 16, 2026, 5:07 p.m.