.\" Portability macros (not validated). .\" FIXME: For some reason in man2html the registers are always null-strings. .\" Also, in man2html the code doesn't display the HTML code even .\" if the conditionals are changed to always be true. . .\" Check whether we are using grohtml. .nr mH 0 .if \n(.g \ . if '\*(.T'html' \ . nr mH 1 . .\" Start URL. .de UR . ds m1 \\$1\" . nh . if \\n(mH \{\ . \" Start diversion in a new environment. . do ev URL-div . do di URL-div . \} .. . . .\" End URL. .de UE . ie \\n(mH \{\ . br . di . ev . . \" Has there been one or more input lines for the link text? . ie \\n(dn \{\ . do HTML-NS "" . \" Yes, strip off final newline of diversion and emit it. . do chop URL-div . do URL-div \c . do HTML-NS . \} . el \ . do HTML-NS "\\*(m1" \&\\$*\" . \} . el \ \\*(la\\*(m1\\*(ra\\$*\" . . hy \\n(HY .. .\" define .EX/.EE (for multiline user-command examples; normal Courier font) .de EX .Vb .nf .ft CW .. .de EE .Ve .ft P .fi .. .\" ========================================================================= .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH LINK-GENERATOR 1 "2021-03-30" "Version 5.9.0" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME link\-generator \- generate natural language sentences using Link Grammar .SH SYNOPSIS .B link\-generator .RB \-\-help .br .B link\-generator .RB \-\-version .br .SH DESCRIPTION .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invoke bold face and italics, .\" respectively. \fBlink\-generator\fP is a command-line tool for generating random sentences whose syntax is determined by the specified \%link\-grammar dictionary. .PP .SH EXAMPLE .EX .B link\-generator .EE .PP .SH BACKGROUND The theory of Link Grammar is explained in many academic papers. In the first of these, Daniel Sleator and Davy Temperley, "Parsing English with a Link Grammar" (1991), the authors defined a new formal grammatical system called a "link grammar". A sequence of words is in the language of a link grammar if there is a way to draw "links" between words in such a way 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 \%\fBlink\-parser\fP command-line tool to parse English using this grammar. .PP 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. .SH OVERVIEW .PP \fBlink\-generator\fP generates sentences. .SH OPTIONS .TP .B \-\-help Print usage and exit. .TP .B \-\-version Print program version and configuration details, and exit. .TP .B \-\-usage Print a short synopsis of the option flags. .TP .B \-l\fR language|dict_location, \fB\-\-language\fR=language|dict_location Specify the language to use, or the directory file-path to the dictionary to use. .TP .B \-s\fR length, \fB\-\-length\fR=length If \fBlength\fR is 0, read a sentence template. It may consist of fully spelled-out words as well as wild-cards. The wild-card \fB\\*\fR represents any dictionary word. Wild-card specifications like \fIprefix\fR\fB\\*\fR and \fB\\*.n\fR are also recognized. Otherwise, it specifies the length of the sentences to generate. All generated sentences will have exactly this length. .TP .B \-c\fR count, \fB\-\-count\fR=count Specify the number of sentences to generate. 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 the representative sentence are randomly chosen from the set of words associated with each disjunct in that linkage. If the 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 if the 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! .TP .B \-x\fR, \fB\-\-explode\fR If set, and is 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. .TP .B \-d\fR, \fB\-\-disjuncts\fR Display linkage disjuncts. .TP .B \-\-no\-walls\fR Don't attach to walls in wildcard words. .TP .B \-r\fR, \fB\-\-random\fR Use unrepeatable random numbers. .TP .B \-u\fR, \fB\-\-unused\fR Display unused disjuncts. .SH SEE ALSO .nh The \%link\-parser is a command-line tool for parsing sentences. It provides some additional information about the \%link\-grammar implementation. .PP Information on the \%link\-grammar shared-library API and the link types used in the parse is available at the .UR http://www.abisource.com/projects/link-grammar/ AbiWord website .UE . .PP Peer-reviewed papers explaining Link Grammar can be found at .UR http://www.link.cs.cmu.edu/link/papers original CMU site .UE . .PP The source code of \%\fBlink\-generator\fP and the \%link\-grammar library is located at .UR https://github.com/opencog/link-grammar GitHub .UE . .PP The mailing list for Link Grammar discussion is at .UR http://groups.google.com/group/link-grammar?hl=en link-grammar Google group .UE . .SH AUTHOR .nh The \%link\-grammar library were written by Daniel Sleator , Davy Temperley , and John Lafferty . The \%link\-generator tool was created by Amir Plivatsky . .PP This manual page was written by Ken Bloom , for the Debian project, and updated Linas Vepstas .