Skip to main content

Korean cat-sound lorem ipsum generator: 냥, 냐옹, 냐앙, 냐아앙.

Project description

Nyangsum

English | 한국어

Korean cat-sound lorem ipsum generator. Produces text composed of “냥/냐옹/나앙/냐아앙 …” variants.

Key properties:

  • Tokens: 냥, 냐옹, 나앙(요청 반영), 늘임형 “냐” + “아”*k + (“앙”|“옹”)
  • Default distribution: 냥 0.45, 냐옹 0.30, 나앙 0.15, 늘임형 0.10
  • Punctuation: sentences can include commas, inner !/?/..., end with [., !, ?, ...], quotes occasionally
  • Deterministic mode via seed()

Install (local dev)

python -m pip install -e .

Quickstart

Python:

from nyangsum import nyang

print(nyang.words(5)) # e.g., "냥 냐옹 냥 냥 냐옹" print(nyang.sentence(words=8)) # one phrase with exactly 8 words print("\n\n".join(nyang.paragraphs(2))) # two paragraphs

CLI:

Exactly N phrases of M words

python3 -m nyangsum --phrases 2 --words 6

N sentences (word count sampled in [min, max])

python3 -m nyangsum --sentences 3 --min-words 5 --max-words 10

N paragraphs, optionally HTML-wrapped

python3 -m nyangsum --paragraphs 2 --html

Deterministic output with seed

python3 -m nyangsum --phrases 1 --words 10 --seed 42

Examples

$ python3 -m nyangsum --phrases 1 --words 6 냥 냐옹 냥, 냐옹 나앙 냥.

$ python3 -m nyangsum --paragraphs 1 --html

냐옹 냥 냥 냥? 냥 냐옹 냐옹 냥 냥 냥. 냥 냥 냥...

API

The public API mirrors common lorem-ipsum ergonomics but outputs Korean cat sounds.

  • nyang.seed(value: int | None) -> None Seed the internal RNG for reproducible output.

  • nyang.word(max_len=6, capitalize=False, weights: dict | None = None, elong_min_a=1, elong_max_a=4, tail_weights=None) -> str Generate one token:

    • Base tokens favored: "냥", "냐옹", "나앙"
    • Elongated variants: "냐" + "아"*k + ("앙" | "옹") with k in [elong_min_a, elong_max_a]
    • weights override example: {"냥":0.5, "냐옹":0.3, "나앙":0.15, "elongated":0.05}
  • nyang.words(n=1, as_list=False, sep=" ") -> str | list[str] Generate n words (joined by sep unless as_list=True).

  • nyang.phrase(words_count: int, punctuation=True) -> str Exactly words_count tokens, internal punctuation possible, ends with [., !, ?, ...], may wrap in quotes.

  • nyang.phrases(n: int, words_count: int, as_list=False, punctuation=True) -> str | list[str] Generate n phrases, each with words_count words. Joined by newline unless as_list=True.

  • nyang.sentence(words: int | None = None, word_range=(4, 12), punctuation=True) -> str Convenience alias for a single phrase. If words is None, samples uniformly from word_range.

  • nyang.sentences(n=1, words: int | None = None, word_range=(4, 12), as_list=False, punctuation=True) -> str | list[str] Multiple sentences. Joined by space unless as_list=True.

  • nyang.paragraph(sentence_range=(3, 7)) -> str Paragraph with a sampled number of sentences.

  • nyang.paragraphs(n=1, sentence_range=(3, 7), as_list=False) -> str | list[str] Multiple paragraphs (double-newline separated unless as_list=True).

  • nyang.text(paragraphs_count=3, sentence_range=(3, 7), html=False) -> str Produce multiple paragraphs; html=True wraps each as

    ...

    .

CLI

Console module: python3 -m nyangsum

  • Selection

    • --phrases N --words M Generate N phrases, each with exactly M words
    • --sentences N Generate N sentences (pair with --words or use --min-words/--max-words)
    • --paragraphs N Generate N paragraphs (pair with --html optionally)
    • --words M Generate exactly M words (standalone)
  • Ranges

    • --min-words X --max-words Y
    • --min-sentences A --max-sentences B
  • Formatting

    • --html Wrap paragraphs in

      ...

      (only with --paragraphs)
    • --no-punct Disable punctuation for phrases/sentences
  • Reproducibility / tuning

    • --seed INT
    • --weights JSON Override base/elongated weights e.g., --weights '{"냥":0.5,"냐옹":0.3,"나앙":0.15,"elongated":0.05}'

Notes:

  • Default behavior: prints a single paragraph of 500 words (one long phrase).
  • Base tokens “냥/냐옹/나앙” are most frequent by default; elongated variants appear occasionally.
  • Length caps (max_len) keep visual width reasonable.

Rationale

  • Follows the reference “meowsum” structure and UX in Python.
  • Korean-specific tokens with adjustable weights to favor 냥/냐옹/나앙.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nyangsum-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nyangsum-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file nyangsum-0.1.0.tar.gz.

File metadata

  • Download URL: nyangsum-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for nyangsum-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89f2b59aa23f3b431b88892debaeefb2fe994391bb4ab8cb27fe2515f73aeeea
MD5 f6206b2bd696eb7e86fddababce83e6b
BLAKE2b-256 9e98b3498503c0bc3d929a649ab956ee5079d608105da62833e446916d30b470

See more details on using hashes here.

File details

Details for the file nyangsum-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nyangsum-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for nyangsum-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14509cebdec9a256912c2f69d0435028049c858c0e12eb3dfb97ae1eff5aa1f7
MD5 a38735d55c364d282c83ff910daf2bc8
BLAKE2b-256 111501b3b30e55a64603b063b2611ab8af19df253073c10feaca6eb0ec853fa4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page