Algorithm Search⌘K

Algorithmintro

Luhn summarization

Also called Luhn auto-abstract.

Luhn's 1958 extractive method: words of medium frequency are significant, and a sentence scores the best (significant words)^2 / length over its clusters of close significant words.

Time
O(N + n log n) expected
Space
O(N) extra
Where
N = the number of words in the document; n = the number of sentences
Properties
deterministicexactofflineiterative
Origin
Hans Peter Luhn, 1958

Luhn summarization picks the sentences of a document that contain dense groups of its important words. A word is important (significant) when it is not a common word and its frequency in the document is neither too high nor too low. In each sentence, the significant words that stand close together form clusters, and a cluster with mm significant words over a span of ℓ\ell words scores m2/ℓm^2 / \ell. A sentence scores its best cluster, and the sentences with the highest scores form the extract. Hans Peter Luhn described the method in 1958. It is a heuristic: no objective is optimized, and its quality is only measured.

In plain words

An author repeats the words of the topic. "Solar" and "cell" come back many times in an article on solar cells, while "the" is everywhere and "weather" appears once. So Luhn counts the words of the document, drops a list of common words, and keeps the words with a medium count. These are the significant words.

A sentence where several significant words stand close together is likely to state a main point. Luhn looks for runs of significant words with at most four other words between two neighbours. A run with many significant words in a short span gets a high score. The sentence takes the score of its best run.

Then the program prints the sentences with the highest scores, in the order of the document. This is the abstract.

The problem

The input is a document DD split into sentences s1,…,sns_1, \ldots, s_n, each a list of words, together with a list of stop words, two frequency cut offs lo≤hilo \le hi, a gap limit gg (Luhn used 4) and a number kk of sentences to extract. A word ww is mapped to a key κ(w)\kappa(w), for example its lower-case form or its stem. Let f(v)f(v) be the number of words of DD with key vv that are not stop words. The set of significant keys is

Sig={v:lo≤f(v)≤hi}.\mathrm{Sig} = \{ v : lo \le f(v) \le hi \}.

In a sentence, let p1<⋯<prp_1 < \cdots < p_r be the positions of the words with a key in Sig\mathrm{Sig}. A cluster is a maximal run pa,…,pbp_a, \ldots, p_b such that pt+1−pt−1≤gp_{t+1} - p_t - 1 \le g for every tt from aa to b−1b - 1, so that two neighbours in it have at most gg non-significant words between them. Its score is (b−a+1)2/(pb−pa+1)(b - a + 1)^2 / (p_b - p_a + 1), and the score of the sentence is the largest score of its clusters, or 0 if it has no significant word. The task is to output the kk sentences with the highest scores, in document order. Luhn's own rule outputs every sentence whose score is above a fixed cut off instead.

The algorithm

  1. LUHN(D, stop, lo, hi, g, k) ▷ D: a list of sentences, each a list of words
  2. 1f ← an empty table of counts
  3. 2for each word w of D with κ(w) not in stop do f(κ(w)) ← f(κ(w)) + 1
  4. 3Sig ← the keys v with lo ≤ f(v) ≤ hi
  5. 4for each sentence s of D do
  6. 5p_1 < ... < p_r ← the positions of s whose key is in Sig
  7. 6score(s) ← 0; a ← 1
  8. 7for b ← 1 to r do
  9. 8if b = r or p_(b+1) - p_b - 1 > g then ▷ the cluster p_a .. p_b ends here
  10. 9m ← b - a + 1; len ← p_b - p_a + 1
  11. 10score(s) ← max(score(s), m² / len)
  12. 11a ← b + 1
  13. 12return the k sentences with the highest score, in document order

Lines L1 to L3 find the significant words. Luhn's program deleted the common words by a table lookup and then the words of low frequency. His Figure 1 also draws an upper cut off C, because the most frequent words carry little information about the topic, but he left the place of both cut offs to experience. Lines L5 to L11 scan one sentence from left to right. Line L8 closes a cluster when the next significant word is too far away or when there is no next word. Line L12 breaks ties by the earlier sentence and never picks a sentence with score 0.

Merging words. Luhn sorted the words alphabetically and compared neighbours letter by letter. From the first letter where two words differed, he counted the remaining letters of both words, and if there were six or fewer he treated them as one notion, as with "similar" and "similarity". The key function κ\kappa plays this role here; a stemmer such as the Porter stemmer is the usual modern choice.

Example

The document has five sentences. The stop words are the, a, into, from, to, was, that, is and less. With lo=2lo = 2, hi=3hi = 3 and g=4g = 4, the counts are solar 3, cell 3, light 2, power 2, thin 2 and silicon 2, and every other word occurs once. So these six words are significant.

# sentence (significant words in bold) cluster span mm score
1 The new solar cell turns light into power words 3 to 8 4 16/6=2.66716/6 = 2.667
2 Engineers built the solar cell from thin silicon words 4 to 8 4 16/5=3.216/5 = 3.2
3 The weather was cold that week none 0 0
4 A thin silicon solar cell costs less to build words 2 to 5 4 16/4=416/4 = 4
5 Power from light is clean words 1 to 3 2 4/3=1.3334/3 = 1.333

For k=2k = 2 the extract is sentences 2 and 4, printed in that order. With Luhn's rule and a cut off of 2, sentences 1, 2 and 4 are printed.

Luhn's Figure 2 has a cluster of seven words with four significant words, for example S x S S x x S, with score 42/7=2.34^2 / 7 = 2.3. The gap limit matters: in S a b c d S the two significant words have four words between them and form one cluster with score 22/6=0.6672^2 / 6 = 0.667, while in S a b c d e S they are five words apart and form two clusters, each with score 12/1=11^2 / 1 = 1.

Correctness

The algorithm computes the scores of the definition exactly. Lines L1 to L3 count each key once for each of its occurrences, so Sig\mathrm{Sig} is the set of the definition. In a sentence, the loop of lines L7 to L11 keeps the invariant that pa,…,pbp_a, \ldots, p_b is the current run with all inner gaps at most gg, and that pap_a starts a cluster (it is p1p_1, or the gap before it is larger than gg). Line L8 ends the run exactly where the gap to the next position is larger than gg, or at the last position, so every cluster is scored once and nothing else is scored. Line L12 then sorts by score. This is a theorem; the full proof is in the proofs file.

Whether the chosen sentences make a good abstract is a different matter. The significance factor is a heuristic: it does not maximize a stated objective, and its value was judged only by reading the output. Luhn reported encouraging results on about 50 articles of 300 to 4,500 words and planned a test with 100 readers.

Proof: The Luhn procedure computes the significant words, the cluster scores and the top sentences of the definitionfull

Fix a document D=(s1,…,sn)D = (s_1, \ldots, s_n), a key function κ\kappa, a set of stop keys, cut offs lo≤hilo \le hi, a gap limit g≥0g \ge 0 and k≥0k \ge 0. The definitions are those of the page: f(v)f(v) is the number of words ww of DD with κ(w)=v\kappa(w) = v and vv not a stop key, Sig={v:lo≤f(v)≤hi}\mathrm{Sig} = \{v : lo \le f(v) \le hi\}, and in a sentence with significant positions p1<⋯<prp_1 < \cdots < p_r a cluster is a maximal index interval [a,b][a, b] with pt+1−pt−1≤gp_{t+1} - p_t - 1 \le g for all a≤t<ba \le t < b. Its score is (b−a+1)2/(pb−pa+1)(b - a + 1)^2 / (p_b - p_a + 1), and the sentence score is the maximum over the clusters, or 0 when r=0r = 0.

Lemma 1 (counts). After line L2, f(v)f(v) equals the definition for every key vv, and line L3 returns Sig\mathrm{Sig}.

Proof. Line L1 starts every count at 0. Line L2 visits each word occurrence of DD once and adds 1 to f(κ(w))f(\kappa(w)) exactly when κ(w)\kappa(w) is not a stop key. So f(v)f(v) is the number of such occurrences with key vv. Line L3 keeps a key exactly when its count lies in [lo,hi][lo, hi]. □\square

Lemma 2 (clusters). The clusters of a sentence partition {1,…,r}\{1, \ldots, r\} into consecutive intervals, and the cut points are exactly the indices tt with pt+1−pt−1>gp_{t+1} - p_t - 1 > g.

Proof. Call tt a cut if pt+1−pt−1>gp_{t+1} - p_t - 1 > g. An interval with no cut inside satisfies the gap condition, and an interval that contains a cut tt with a≤t<ba \le t < b does not. So the intervals with the gap condition are the intervals that lie between two consecutive cuts, and the maximal ones are exactly the intervals from one cut (or the start) to the next cut (or the end). These intervals are disjoint and cover {1,…,r}\{1, \ldots, r\}. □\square

Lemma 3 (the loop). For one sentence, lines L6 to L11 set score(s)\mathrm{score}(s) to the sentence score of the definition.

Proof. Invariant at the start of the iteration for bb: (i) aa is the first index of the cluster that contains bb, and (ii) score(s)\mathrm{score}(s) is the maximum of 0 and the scores of all clusters that end before aa. Before the first iteration a=1a = 1 and the score is 0, and index 1 starts a cluster by Lemma 2, so both hold. In the iteration for bb, line L8 tests whether bb is the last index or a cut. By Lemma 2 this holds exactly when bb ends the cluster that starts at aa. If it holds, lines L9 and L10 compute the score of the cluster [a,b][a, b] and take the maximum, and line L11 sets a=b+1a = b + 1, which starts the next cluster by Lemma 2; so (i) and (ii) hold for b+1b + 1. If it does not hold, b+1b + 1 is in the same cluster as bb, and nothing changes, so both still hold. After the last iteration every cluster has ended and been scored once, so by (ii) the score is the maximum over all clusters. If r=0r = 0, the loop does not run and the score is 0, as defined. □\square

Theorem. The procedure returns the indices of kk sentences with the highest scores, with ties broken by the earlier index and sentences with score 0 left out, in increasing order.

Proof. By Lemmas 1 and 3 every sentence gets its score of the definition. Line L12 sorts the indices by the key (score descending, index ascending), which is a total order, takes the first kk, drops those with score 0 and sorts the rest by index. Every kept index ii and every index jj not kept with a positive score satisfy (−scorei,i)<(−scorej,j)(-\mathrm{score}_i, i) < (-\mathrm{score}_j, j), which is the claim. ■\blacksquare

Remark (bounds). A cluster with mm significant words spans ℓ\ell words with m≤ℓ≤m+(m−1)gm \le \ell \le m + (m - 1) g, because each of the m−1m - 1 gaps holds at most gg words. So its score m2/ℓm^2 / \ell satisfies m/(g+1)<m2/ℓ≤mm / (g + 1) < m^2 / \ell \le m when m≥2m \ge 2, and equals 1 when m=1m = 1. The tests check that a sentence score is 0 or at least 1/(g+1)1/(g + 1), and at most the number of significant words of the sentence.

Remark (complexity). Lines L1 to L3 touch each word once with an expected O(1)O(1) hash operation, and the loop of lines L5 to L11 touches each position of each sentence a constant number of times. Line L12 sorts nn keys. The total is O(N+nlog⁡n)O(N + n \log n) expected time for NN words, with O(N)O(N) space for the counts and the positions.

Complexity

With a hash table, lines L1 to L3 take O(N)O(N) expected time and O(V)⊆O(N)O(V) \subseteq O(N) space for the VV distinct keys. Lines L5 to L11 visit each word of a sentence a constant number of times, so all sentences take O(N)O(N) time. Line L12 sorts the nn scores in O(nlog⁡n)O(n \log n) time, or selects the top kk in O(n)O(n) time. In total this is O(N+nlog⁡n)O(N + n \log n) expected time and O(N)O(N) space for the document and the counts. Luhn's program sorted the words alphabetically to count them, which costs O(Nlog⁡N)O(N \log N) comparisons.

Properties

  • Range. A cluster with mm significant words has length ℓ\ell with m≤ℓ≤m+(m−1)gm \le \ell \le m + (m - 1) g, so its score is in (m/(g+1),m](m / (g + 1), m]. A sentence score is 0 or at least 1/(g+1)1/(g + 1), and at most the number of significant words in the sentence.
  • Maximal clusters, not the best span. The score uses whole clusters. In S a b c d S S S the cluster has score 42/8=24^2 / 8 = 2, although its last three words alone would give 32/3=33^2 / 3 = 3.
  • Long sentences. The score grows with mm, so long sentences with many significant words tend to win. Luhn did not normalize by the sentence length.
  • Document only. The counts come from the document itself, with no corpus statistics. A word that is frequent in every document of a collection still counts as significant if it passes the cut offs. tf-idf weights fix this with a document frequency from a corpus.
  • Deterministic and fast. One pass over the words and one sort.

Variants and improvements

  • Fixed length. Luhn noted that the program could print a fixed number of the best sentences instead of all sentences above the cut off. The code offers both.
  • Emphasis. Luhn proposed a premium weight for a given class of words, to bias the abstract to the interests of a reader. Later systems use a query in the same way.
  • Sections. For a long article, Luhn proposed to run the method on overlapping parts of the text, so that each part gets its own significant words.
  • Frequency weights. Later extractive systems replaced the binary test of significance with weights such as tf-idf or word probabilities, and added a step against redundancy such as maximal marginal relevance.
  • Graph centrality. TextRank and LexRank score a sentence by its similarity to the other sentences instead of by its own words.

When to use it

Use Luhn's method as a baseline for extractive summarization, or when you need a summarizer with no training data, no corpus and no model. It works best on technical text with a clear topic vocabulary. For news, the first sentences of the article are a hard baseline to beat: on CNN/Daily Mail the first three sentences scored higher on ROUGE than the neural models of See et al. (2017), a measurement. Compare Luhn's method with that baseline and with graph methods on your own data before you use it.

Pitfalls

  • No stop list. Without a stop list, or with hihi too high, line L2 makes "the" and "of" significant, and every long sentence wins. Set hihi or a stop list.
  • Low cut off of 1. With lo=1lo = 1 every content word is significant, and the score mostly measures sentence length. Luhn deleted the words of low frequency.
  • Gap counted wrong. Line L8 tests the number of words between two significant words, pb+1−pb−1p_{b+1} - p_b - 1, not the distance pb+1−pbp_{b+1} - p_b. With the distance, the limit is one word smaller than intended.
  • Length counted wrong. Line L9 counts the cluster from its first to its last significant word. Counting the whole sentence gives another method.
  • Best span instead of clusters. Taking the maximum of m2/ℓm^2 / \ell over all spans of a cluster gives higher scores than Luhn's method; see the example under Properties.
  • Tokens and keys. Counting "Cell" and "cell" or "cell" and "cells" as different words splits the counts. Fix the key function before you compare results.

Implementations

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

luhn_summarization.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/luhn-summarization/. The authors are listed in prov/JX112C.jsonl.

"""Luhn's significance factor and sentence extraction (Luhn 1958).

The input is a document as a list of sentences, each a list of str tokens.
The module does no sentence splitting and no tokenization.

A word is significant when its key (by default the lower-cased word) is not a
stop word and its frequency in the document is between the two cut offs low
and high, both inclusive. In a sentence, a cluster is a maximal run of
significant words in which two neighbours have at most `gap` non-significant
words between them. The score of a cluster is (significant words)^2 divided by
the length of the cluster from its first to its last significant word, and the
score of a sentence is the largest score of its clusters (0 with none).

Luhn's own rule to merge words with the same beginning is replaced by the
`key` function; pass a stemmer there to get a similar effect. Scores are exact
Fractions.
"""

from collections import Counter
from fractions import Fraction
from typing import Callable, Iterable, List, Sequence, Set, Tuple

Sentence = Sequence[str]


def word_frequencies(
    doc: Sequence[Sentence],
    stop: Iterable[str] = (),
    key: Callable[[str], str] = str.lower,
) -> Counter:
    """Count the keys of all words of the document that are not stop words."""
    stop_keys = {key(w) for w in stop}
    f: Counter = Counter()  # @line L1
    for s in doc:
        for w in s:
            k = key(w)
            if k not in stop_keys:
                f[k] += 1  # @line L2
    return f


def significant_words(
    doc: Sequence[Sentence],
    low: int,
    high: int,
    stop: Iterable[str] = (),
    key: Callable[[str], str] = str.lower,
) -> Set[str]:
    """Return the keys whose frequency is between low and high, inclusive."""
    f = word_frequencies(doc, stop, key)
    return {v for v, c in f.items() if low <= c <= high}  # @line L3


def clusters(
    sentence: Sentence,
    sig: Set[str],
    gap: int = 4,
    key: Callable[[str], str] = str.lower,
) -> List[Tuple[int, int, int]]:
    """Return the clusters of a sentence as (first position, last position, count)."""
    pos = [i for i, w in enumerate(sentence) if key(w) in sig]  # @line L5
    out: List[Tuple[int, int, int]] = []
    a = 0  # @line L6
    for b in range(len(pos)):  # @line L7
        if b == len(pos) - 1 or pos[b + 1] - pos[b] - 1 > gap:  # @line L8
            out.append((pos[a], pos[b], b - a + 1))
            a = b + 1  # @line L11
    return out


def sentence_score(
    sentence: Sentence,
    sig: Set[str],
    gap: int = 4,
    key: Callable[[str], str] = str.lower,
) -> Fraction:
    """Return the significance factor of one sentence: the best cluster score."""
    best = Fraction(0)  # @line L6
    for first, last, m in clusters(sentence, sig, gap, key):
        length = last - first + 1  # @line L9
        best = max(best, Fraction(m * m, length))  # @line L10
    return best


def luhn_scores(
    doc: Sequence[Sentence],
    low: int,
    high: int,
    stop: Iterable[str] = (),
    gap: int = 4,
    key: Callable[[str], str] = str.lower,
) -> List[Fraction]:
    """Return the significance factor of every sentence of the document."""
    sig = significant_words(doc, low, high, stop, key)
    return [sentence_score(s, sig, gap, key) for s in doc]  # @line L4


def luhn_summarize(
    doc: Sequence[Sentence],
    k: int,
    low: int,
    high: int,
    stop: Iterable[str] = (),
    gap: int = 4,
    key: Callable[[str], str] = str.lower,
) -> List[int]:
    """Return the indices of the k sentences with the highest scores, in document order.

    Ties go to the earlier sentence. Sentences with score 0 are never chosen, so
    the result can have fewer than k indices.
    """
    scores = luhn_scores(doc, low, high, stop, gap, key)
    order = sorted(range(len(doc)), key=lambda i: (-scores[i], i))
    chosen = [i for i in order[:k] if scores[i] > 0]
    return sorted(chosen)  # @line L12


def luhn_above(
    doc: Sequence[Sentence],
    cutoff: Fraction,
    low: int,
    high: int,
    stop: Iterable[str] = (),
    gap: int = 4,
    key: Callable[[str], str] = str.lower,
) -> List[int]:
    """Return the indices of the sentences whose score is at least cutoff (Luhn's rule)."""
    scores = luhn_scores(doc, low, high, stop, gap, key)
    return [i for i, x in enumerate(scores) if x >= cutoff]
test_luhn_summarization.py 129 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/luhn-summarization/. The authors are listed in prov/JX112C.jsonl.

import random
from fractions import Fraction

from luhn_summarization import (
    clusters,
    luhn_above,
    luhn_scores,
    luhn_summarize,
    sentence_score,
    significant_words,
    word_frequencies,
)


def brute_score(sentence, sig, gap):
    """Best score over all maximal clusters, found by testing every pair of positions."""
    pos = [i for i, w in enumerate(sentence) if w.lower() in sig]
    best = Fraction(0)
    for i in range(len(pos)):
        for j in range(i, len(pos)):
            inner = all(pos[t + 1] - pos[t] - 1 <= gap for t in range(i, j))
            left = i == 0 or pos[i] - pos[i - 1] - 1 > gap
            right = j == len(pos) - 1 or pos[j + 1] - pos[j] - 1 > gap
            if inner and left and right:
                m = j - i + 1
                best = max(best, Fraction(m * m, pos[j] - pos[i] + 1))
    return best


def brute_significant(doc, low, high, stop):
    words = [w.lower() for s in doc for w in s]
    stop = {w.lower() for w in stop}
    out = set()
    for w in set(words):
        if w in stop:
            continue
        c = sum(1 for x in words if x == w)
        if low <= c <= high:
            out.add(w)
    return out


def test_luhn_figure_two_shape():
    # Four significant words in a bracket of seven words: 4^2 / 7.
    s = "S x S S x x S".split()
    assert sentence_score(s, {"s"}) == Fraction(16, 7)
    assert clusters(s, {"s"}) == [(0, 6, 4)]


def test_gap_limit():
    # Four non-significant words keep one cluster, five split it.
    s4 = "S a b c d S".split()
    s5 = "S a b c d e S".split()
    assert clusters(s4, {"s"}) == [(0, 5, 2)]
    assert sentence_score(s4, {"s"}) == Fraction(4, 6)
    assert clusters(s5, {"s"}) == [(0, 0, 1), (6, 6, 1)]
    assert sentence_score(s5, {"s"}) == 1


def test_not_the_best_subspan():
    # The score uses maximal clusters; a dense part of a cluster does not count alone.
    s = "S a b c d S S S".split()
    assert sentence_score(s, {"s"}) == Fraction(16, 8)
    assert Fraction(9, 3) > sentence_score(s, {"s"})


def test_no_significant_word():
    assert sentence_score("a b c".split(), {"z"}) == 0
    assert sentence_score([], {"z"}) == 0


def test_page_example():
    doc = [
        "The new solar cell turns light into power".split(),
        "Engineers built the solar cell from thin silicon".split(),
        "The weather was cold that week".split(),
        "A thin silicon solar cell costs less to build".split(),
        "Power from light is clean".split(),
    ]
    stop = {"the", "a", "into", "from", "to", "was", "that", "is", "less"}
    f = word_frequencies(doc, stop)
    assert f["solar"] == 3 and f["cell"] == 3 and f["thin"] == 2
    sig = significant_words(doc, 2, 3, stop)
    assert sig == {"solar", "cell", "light", "power", "thin", "silicon"}
    scores = luhn_scores(doc, 2, 3, stop)
    assert scores == [Fraction(8, 3), Fraction(16, 5), 0, Fraction(4), Fraction(4, 3)]
    assert clusters(doc[1], sig) == [(3, 7, 4)]
    assert luhn_summarize(doc, 2, 2, 3, stop) == [1, 3]
    assert luhn_above(doc, Fraction(2), 2, 3, stop) == [0, 1, 3]


def test_ties_go_to_the_earlier_sentence():
    doc = [["x", "y"], ["x", "y"], ["q"]]
    assert luhn_summarize(doc, 1, 2, 2) == [0]
    assert luhn_summarize(doc, 5, 2, 2) == [0, 1]


def test_random_against_brute_force():
    rng = random.Random(1958)
    vocab = ["w%d" % i for i in range(7)]
    for _ in range(600):
        doc = [[rng.choice(vocab) for _ in range(rng.randint(0, 12))]
               for _ in range(rng.randint(1, 5))]
        stop = set(rng.sample(vocab, rng.randint(0, 2)))
        low = rng.randint(1, 3)
        high = low + rng.randint(0, 6)
        gap = rng.randint(0, 4)
        sig = significant_words(doc, low, high, stop)
        assert sig == brute_significant(doc, low, high, stop)
        got = luhn_scores(doc, low, high, stop, gap)
        want = [brute_score(s, sig, gap) for s in doc]
        assert got == want
        for s, x in zip(doc, got):
            # A cluster has len >= m and len <= m + (m - 1) gap, so m / (gap + 1) < m^2 / len <= m.
            r = sum(1 for w in s if w.lower() in sig)
            assert 0 <= x <= r
            if r > 0:
                assert x >= Fraction(1, gap + 1)
        k = rng.randint(0, 4)
        chosen = luhn_summarize(doc, k, low, high, stop, gap)
        assert chosen == sorted(chosen) and len(chosen) <= k
        rest = [i for i in range(len(doc)) if i not in chosen]
        for i in chosen:
            assert got[i] > 0
            for j in rest:
                assert got[i] > got[j] or (got[i] == got[j] and i < j)

History

Hans Peter Luhn worked on information retrieval at IBM. In "The automatic creation of literature abstracts" (April 1958) he described a program for the IBM 704 that read an article from punched cards, deleted the common words, merged words with the same beginning, counted the rest and printed the sentences with the highest significance factor. He argued from the shape of the word frequency curve, the subject of Zipf's law, that words of medium frequency mark the topic, while the most frequent words are too common and the rarest are too few to matter. He tested the program on about 50 articles and found the results good enough to plan a test with readers. Edmundson (1969) later added cue words, title words and the position of the sentence to Luhn's frequency feature. Word frequency is still a feature of most extractive methods.

References

  1. H. P. Luhn, The automatic creation of literature abstracts, IBM Journal of Research and Development 2(2), 1958, pages 159 to 165, pages 160 and 161 with Figure 1 (the frequency cut offs C and D), page 161 (the limit of four or five non-significant words), page 162 with Figure 2 (the score 4^2 / 7 = 2.3, the machine procedure, the merging of words and the cut off on the sentence scores), page 165 (the premium weight for a class of words)
  2. Ani Nenkova and Kathleen McKeown, Automatic Summarization, Foundations and Trends in Information Retrieval 5(2-3), 2011, pages 103 to 233, the survey of extractive methods based on word frequency

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH1 sketch
  • a full proof of time.expected
  • a full proof of space.extra
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • at least three sources
  • a scene preset for the example