← Back
Home › Systems › Frontend and UI

mobile-keyboard-ime

on-screen keyboard and input method: gesture-typing decoder, on-device language model, autocorrect, CJK composition and candidate ranking, federated learning, emoji/sticker search

Gboard, iOS keyboard, SwiftKey, Sogou

SystemTechniques · 15Primitives · 40 mobile-keyboard-ime Hit testing and gesturesgraphics · medium: Map pointer events to the UI tree and arbitrate competing gesture recognizersInput method compositiongraphics · medium: Composition buffer for phonetic and stroke input (pinyin, kana) with candidate lookup, segmentation and learningLearning to rankmachine-learning · medium: Train a scorer on query-grouped data so that the order it induces maximizes NDCG; LambdaMART (boosted trees with NDCG-weighted pair gradients) is the production default.›Swipe gesture decodingmachine-learning · medium: Decode a finger path into words by matching against word templates with a language modelTwo-tower retrievalmachine-learning · medium: Two separate encoders map users/queries and items into one vector space; item vectors are precomputed and searched by nearest neighbour, so recall over millions costs one small forward pass.›Beam search decodingml-training · medium: Keep the k best partial sequences by summed log-probability at every step, set finished ones aside, and return the best (n-best) by a length-normalised score.›Federated averagingml-training · medium: FedAvg: clients train locally, server averages weighted updates; handling non-IID data and stragglersEmbeddingsmachine-learning · low: A learned table mapping discrete ids to dense vectors: gather forward, sparse scatter-add backward, row-wise optimizers to keep huge tables cheap.›Radix triedata-structures · low: Compressed prefix tree for path routing, domain matching and prefix lookupsNgram language modelmachine-learning · low: N-gram counts with Kneser-Ney smoothing, compact storage (KenLM-style) and perplexityText normalizationmachine-learning · low: Rewrite messy text into one canonical form for matchers and models, or into spoken words for speech output (and back), keeping a map to the original offsets.›Transformer blockml-training · low: The decoder-only pre-norm block (attention plus MLP on a residual stream) behind every modern LLM, with exact shapes, parameter, FLOP and KV-cache counts.›Weight quantizationml-training · low: Store weights as 8/4-bit integers with per-group scales; decode is memory-bound, so 4-bit weights give about 3-4x tokens/s and fit 4x larger models.›Edit distancesearch-sort · low: Levenshtein/Damerau distance by DP, bit-parallel Myers variantLevenshtein automatasearch-sort · low: Levenshtein automata / edit-distance search over dictionaries for typo toleranceUnicode text tokenization for searchsearch-sort · low: Turn multilingual text into index terms: segment words (UAX 29 style, CJK bigrams), normalize, case-fold and accent-fold, identically at index and query time.›Homogeneous transformsgeometry · low: 4x4 affine and projective matrices, homogeneous coordinates, view and projection, normal matricesR-treegeometry · low: A balanced tree of nested bounding boxes that indexes rectangles and points, answering window and nearest-neighbour queries by pruning whole subtrees.›Statechartsgraphics · low: State machines with nesting, parallel regions, history and entry/exit actions, so UI and animation logic stays linear in size instead of exploding.›Evaluation metricsmachine-learning · low: Precision, recall, ROC AUC, average precision, log loss, NDCG and pass@k computed correctly, plus paired confidence intervals for comparing models.›Loss functionsmachine-learning · low: The scalar a model minimizes: cross-entropy for classes and tokens, MSE or Huber for values, each with a stable form and simple gradient.›Negative samplingmachine-learning · low: Train by contrasting each observed positive with a few sampled negatives instead of normalising over every candidate; the choice of sampler decides bias and quality.›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›+ 8 more techniques+ 24 more primitives

Similar systems

Share the most building blocks with this one.