fenxer/macos-summarize-internals — explained in plain English
Analysis updated 2026-07-25
Recreate macOS's Summarize feature in your own app using the Python script.
Learn how Apple's sentence-scoring summarization algorithm works under the hood.
Run the included comparison tests to verify the Python version against the real macOS tool.
Study the reverse-engineering probes to understand how to probe macOS system frameworks.
| fenxer/macos-summarize-internals | 0xallam/my-recipe | 0xhassaan/nn-from-scratch | |
|---|---|---|---|
| Stars | 0 | — | 0 |
| Language | Python | Python | Python |
| Last pushed | — | 2022-11-22 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 2/5 | 4/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a Mac to run the C programs that call the real macOS SearchKit API for ground-truth comparison.
When you select text on a Mac and right-click to choose "Summarize," macOS gives you back a shorter version of that text. This repository figures out exactly how that works under the hood. The author reverse-engineered the system component called SKSummary, which lives inside Apple's SearchKit framework, and then rebuilt the same algorithm in Python. The Python version produces output that matches the real macOS tool almost perfectly across a set of 12 test files, with 9 byte-identical matches and 2 others differing only in tiny floating-point noise. The big finding is that macOS summarization is not a neural network or any modern machine learning model. It is an old-school search engine technique. The system splits your text into sentences, builds a search index over them, then treats the entire document as a search query against that index. Each sentence gets a score based on how similar it is to the whole document, and the top-scoring sentences become the summary. The default summary length is based on a logarithmic formula, and the slider in the UI simply switches to a percentage of total sentences. The README documents many specific quirks the author discovered through probing. There is no stopword removal and no stemming. Numbers like "3.5" get split into "3" and "5" at the decimal point. Email addresses split at the @ symbol but the domain stays intact. Sentence segmentation is particular about periods followed by lowercase letters, and Chinese punctuation marks always trigger a break. When sentences tie in score, the later one ranks higher. The repository includes the Python reimplementation, C programs that call the real macOS system API to dump ground-truth data, a comparison script that checks the Python version against the system, and a folder of probes and experiments from the reverse-engineering process. A full write-up in both English and Chinese tells the story from disassembly through verification. The full README is longer than what was shown.
A Python reimplementation of macOS's built-in text Summarize feature, which uses an old-school search-engine technique, scoring sentences by similarity to the whole document, to pick the top sentences. It matches Apple's output almost perfectly.
Mainly Python. The stack also includes Python, C, macOS SearchKit.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.