Skip to content

S+7

s_plus_7 · word · validated

N+7 generalised to any part of speech, displacing each by a fixed offset.

Provenance

  • Source: Oulipo, La Littérature potentielle (1973)
  • Attribution: reference — attested in a standard reference rather than traced to an origin
  • Checkability: source — decidable against the source text it was made from
  • Attested: codified — formulated as a rule by a tradition rather than declared by an author

Details

  • Kind: both
  • Languages: en, de, fr
  • Requires: tokens, lexicon.nouns
  • Deterministic: yes
  • In other languages: S+7 (de), S+7 (fr)

Notes

This row and n_plus_7 are two named forms of one displacement, and they run one implementation: SPlus7Params adds no field to NPlus7Params, and both _check and _produce delegate to the same displacement_report and displace. That is deliberate rather than an oversight — this catalogue records forms as the literature names them, and the literature names both — but it is said here because a reader comparing the two entries could otherwise only discover it by diffing two modules. The generalisation is reached through parameters both rows already carry: dictionary supplies the word list for the chosen part of speech, offset the step. A generalisation that displaced verbs as verbs would need pos, which denckring-en-pos supplies for English alone while this row declares [en, de, fr]; that is why it is not built on it (issue #23).

Prompt hint

Displace every word of the chosen part of speech by a fixed number of dictionary entries.

Parameters

Name Type Default Description
ambiguous_nouns string free What an unchanged word that the dictionary lists means: leave the position unscored (undecidable), accept it (free), or fail it (strict).
dictionary — None The ordered word list to displace within. Defaults to the pack's nouns. Order is the contract: N+7 walks the seventh entry after a word, so a supplied list's order is the caller's editorial choice.
offset integer 7 How many nouns to count forward.
source string — The text this one was made from.

Examples

displaced-by-three

en — this text satisfies the procedure.

the catacala satanism on the tablefork

Parameters: source='the cat sat on the table', offset=3

Source: constructed example; N+7 with the step left to the writer

wrong-offset

en — this text does not satisfy the procedure.

the catacala satanism on the tablefork

Parameters: source='the cat sat on the table', offset=7

Source: constructed counterexample

german-displaced-by-three

de — this text satisfies the procedure.

Die Katzenauge schläft auf dem Tischblatt.

Parameters: source='Die Katze schläft auf dem Tisch.', offset=3

Source: constructed example; computed by calling s_plus_7.check directly. Katze (noun_index 79197) and Tisch (noun_index 157569) are each displaced 3 entries forward in nouns() to Katzenauge and Tischblatt — verified against the lexicon and the procedure, not hand-written.

german-non-noun-changed

de — this text does not satisfy the procedure.

Eine Katze schläft auf dem Tisch.

Parameters: source='Die Katze schläft auf dem Tisch.', offset=3

Source: constructed counterexample; computed by calling s_plus_7.check directly. "Die" is changed to "Eine", a non-noun substitution the checker flags.

francais-deplace-de-trois

fr — this text satisfies the procedure.

le chatière dort

Parameters: source='le chat dort', offset=3

Source: constructed example; produced by apply("s_plus_7", "le chat dort", lang="fr", offset=3) rather than hand-written. chat (noun_index 7980) is displaced three entries forward in nouns() to chatière.

francais-mauvais-decalage

fr — this text does not satisfy the procedure.

le chatière dort

Parameters: source='le chat dort', offset=7

Source: constructed counterexample; the same text read against an offset of 7, which chatière is not

elided-proclitic-displaced-by-three

fr — this text satisfies the procedure.

l'îlot

Parameters: source="l'île", offset=3

Source: constructed example; produced by apply("s_plus_7", "l'île", lang="fr", offset=3). île (noun_index 44740) is displaced three entries forward in nouns() to îlot; the l' proclitic is not a noun and stays as it is — the seam ADR 0036 closes, where the whole token l'île was previously invisible to the noun index.

elided-source-retyped-unchanged-under-strict

fr — this text does not satisfy the procedure.

l'île

Parameters: source="l'île", offset=3, ambiguous_nouns='strict'

Source: constructed counterexample; île is a listed noun left unchanged, which ambiguous_nouns="strict" exists to flag — the proclitic must not hide that behind an unfolded lookup