LINK-GENERATOR(1)

πŸ“¦
version 5.13.0 Β· 3 versions
, in arch rolling, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

okay so. you found the link-generator page. this is the general commands manual, section 1, and honestly? it's giving sentence factory. let's go. πŸ¦‹


✨ NAME ✨

link-generator β€” generate natural language sentences using Link Grammar 🌸


✨ SYNOPSIS ✨

link-generator --help
link-generator --version

that's it, that's the whole vibe. short, sweet, iconic. πŸ’–


✨ DESCRIPTION ✨

so link-generator is a command-line tool that makes random sentences, and the syntax of those sentences is decided by whichever link-grammar dictionary you point it at. no cap. πŸŽ€


✨ EXAMPLE ✨

link-generator

just run it. that's the whole example. periodt. ✨


🌈 BACKGROUND 🌈

the theory of Link Grammar is explained in so many academic papers, bestie. in the very first one β€” Daniel Sleator and Davy Temperley, "Parsing English with a Link Grammar" (1991) β€” the authors defined a whole new formal grammatical system called a "link grammar".

here's the tea: a sequence of words is in the language of a link grammar if there's a way to draw "links" between the words such that:

  • the local requirements of each word are satisfied,
  • the links do not cross,
  • and the words form a consistent connected graph.

the authors encoded English grammar into such a system, and wrote the link-parser command-line tool to parse English using this grammar. πŸ”₯

the engine that performs the parsing is separate from the dictionaries describing a language. currently, the most fully developed, complete dictionaries are for the English and Russian languages, although experimental, incomplete dictionaries exist for German and eight other languages. (yes, eight. they ate. πŸ’…)


🌸 OVERVIEW 🌸

link-generator generates sentences.

that's the whole overview. it said what it said. 😭


✨ OPTIONS ✨

  • --help β€” print usage and dip out. πŸ‘‹
  • --version β€” print the program version and the configuration details, then exit. the full receipts. 🧾
  • --usage β€” print a short synopsis of the option flags. the lil sneak peek. πŸ™ˆ
  • *-l *language|dict_location, --language=language|dict_location β€” tell it which language to use, or give it the directory file-path to the dictionary you want. your call, main character. 🫢
  • *-s *length, --length=length β€” okay this one has two moods:
    • if length is 0, it reads a sentence template. that template can have fully spelled-out words and wild-cards. the wild-card \* represents any dictionary word. wild-card specifications like prefix\* and \*.n are also recognized. ⭐
    • otherwise, it specifies the length of the sentences to generate, and all generated sentences will have exactly this length. exact. no rounding, no vibes-based estimation. πŸ’―
  • *-c *count, --count=count β€” specify how many sentences to generate. and here's where it gets detailed, so stay with me bestie:
    • if this number is less than the number of possible linkages, then a random subset of possible linkages will be generated, and one representative sentence for each linkage will be printed. the words in that representative sentence are randomly chosen from the set of words associated with each disjunct in that linkage.
    • if count is greater than the number of possible linkages, then one representative sentence for each linkage will be printed.
    • if the -x option is set, and count is greater than the number of possible linkages, then more than one representative sentence will be printed for each linkage. each sentence will consist of word choices drawn randomly from the set of words associated with each disjunct. an approximately equal number of sentences will be printed for each linkage; if the count is high enough, then all possible word-choices will be printed.
⚠️ note that this typically results in a combinatorial explosion! πŸ’€ like, genuinely. it goes boom.
  • -x, --explode β€” if set, and if the count is greater than the number of possible linkages, then more than one sentence will be printed for each linkage. each sentence will have a distinct random word-choice for that linkage. yes, the flag is literally called explode. πŸ”₯
  • -d, --disjuncts β€” display linkage disjuncts. show me the disjuncts. πŸ‘€
  • --no-walls β€” don't attach to walls in wildcard words. no walls, no problem. 🧱❌
  • -r, --random β€” use unrepeatable random numbers. chaotic on purpose. 🎲
  • -u, --unused β€” display unused disjuncts. the forgotten ones get their moment. πŸ₯Ή

🌈 SEE ALSO 🌈

link-parser is a command-line tool for parsing sentences β€” it provides some additional information about the link-grammar implementation. πŸ”

information on the link-grammar shared-library API and the link types used in the parse is available at the Link Grammar website. 🌐

peer-reviewed papers explaining Link Grammar can be found at the original CMU site. πŸ“š

the source code of link-generator and the link-grammar library is located at GitHub. πŸ’»

the mailing list for Link Grammar discussion is at the link-grammar Google group. πŸ’¬


πŸ’œ AUTHOR πŸ’œ

the link-grammar library was written by Daniel Sleator <sleator@cs.cmu.edu>, Davy Temperley <dtemp@theory.esm.rochester.edu>, and John Lafferty <lafferty@cs.cmu.edu>. the link-generator tool was created by Amir Plivatsky <amirpli_at_gmail.com>.

this manual page was written by Ken Bloom <kbloom@gmail.com>, for the Debian project, and updated by Linas Vepstas <linasvepstas@gmail.com>. absolute legends, all of them. πŸ‘‘


okay that's the whole page!! this is Version 5.9.0, dated 2021-03-30, and it lives in LINK-GENERATOR(1). go generate some sentences bestie, you got this πŸ’–βœ¨πŸŽ€πŸ¦‹