Skip to content

S+7

s_plus_7 · word · validated

Replace every noun with the seventh noun following it in a chosen dictionary.

Provenance

  • Source: Oulipo, S+7 (Jean Lescure, 1961), https://oulipo.net/contraintes/s7
  • 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

S+7 is the French name of the noun displacement also catalogued here as n_plus_7. Oulipo's account defines the base procedure in terms of nouns and seven places; it separately describes Queneau's extensions to other parts of speech in La Littérature potentielle (1973). Both public IDs are retained for compatibility and share one implementation. SPlus7Params inherits offset, dictionary, ambiguous_nouns, allow_identity and require_displacement from NPlus7Params. These parameters support variations on both rows: a supplied word list controls membership, not grammatical role in context. The default list contains nouns, and neither row uses part-of-speech tagging. Consequently a supplied verb list can also displace a homograph used as a noun. The language support remains English, German and French (issue #23).

Prompt hint

Replace each noun the dictionary lists with the noun 7 places after it there; past the list's end, continue from its start. Keep everything else.

Parameters

Name Type Default Description
allow_identity boolean False Accept the source itself, unchanged, as an answer. Off, a text whose letters are the source's, in the same order, fails as unchanged, unless the source admits no other answer.
ambiguous_nouns — None What an unchanged word that the dictionary lists means: leave the position unscored (undecidable), accept it (free), or fail it (strict). Unset: strict with a supplied dictionary, free with the pack's nouns.
dictionary — None The ordered word list to displace within. Defaults to the pack's nouns, which a reader is not shown: denckring.nouns(lang) lists them, and nouns(lang, max_band=...) the everyday ones, for a prompt to print. 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.
require_displacement boolean False Fail a text in which no word the dictionary lists was displaced, as no_displacement, whatever ambiguous_nouns makes of each one.
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', allow_identity=True

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. allow_identity is set so the copy is not also refused as unchanged (the 0.4.0 default, ADR 0055), which would fail this text whatever the strict reading did