This is the gute Reference Manual, version 1.0.5, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 18:17:34 2024 GMT+0.
gute/gute.asd
gute/package.lisp
gute/general.lisp
gute/list.lisp
gute/io.lisp
gute/string.lisp
gute/sexpr.lisp
gute/symbol.lisp
gute/lore-util.lisp
gute/regex.lisp
gute/lang.lisp
gute/reachability-indexing.lisp
gute/hashtable.lisp
gute/function.lisp
gute/stats.lisp
gute/memo.lisp
gute/queue.lisp
gute/time.lisp
gute/random.lisp
gute/clos.lisp
The main system appears first, followed by any subsystem dependency.
gute
Gene’s personal kitchen sink library.
Gene Louis Kim <gkim21@cs.rochester.edu>
MIT
1.0.5
alexandria
(system).
bordeaux-threads
(system).
cl-ppcre
(system)., at least version "2.0.4"
cl-mathstats
(system).
cl-strings
(system).
conium
(system).
package.lisp
(file).
general.lisp
(file).
list.lisp
(file).
io.lisp
(file).
string.lisp
(file).
sexpr.lisp
(file).
symbol.lisp
(file).
lore-util.lisp
(file).
regex.lisp
(file).
lang.lisp
(file).
reachability-indexing.lisp
(file).
hashtable.lisp
(file).
function.lisp
(file).
stats.lisp
(file).
memo.lisp
(file).
queue.lisp
(file).
time.lisp
(file).
random.lisp
(file).
clos.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
gute/gute.asd
gute/package.lisp
gute/general.lisp
gute/list.lisp
gute/io.lisp
gute/string.lisp
gute/sexpr.lisp
gute/symbol.lisp
gute/lore-util.lisp
gute/regex.lisp
gute/lang.lisp
gute/reachability-indexing.lisp
gute/hashtable.lisp
gute/function.lisp
gute/stats.lisp
gute/memo.lisp
gute/queue.lisp
gute/time.lisp
gute/random.lisp
gute/clos.lisp
gute/general.lisp
package.lisp
(file).
gute
(system).
acl-impl?
(function).
add-nickname
(function).
argv
(function).
cmucl-impl?
(function).
define-constant
(macro).
lisp-impl
(function).
safe-intern
(function).
safe-symbol-eval
(function).
sbcl-impl?
(function).
*lisp-implementation-to-shorthand*
(special variable).
gute/list.lisp
general.lisp
(file).
gute
(system).
alist-keys
(function).
insert
(function).
interleave
(function).
label-with-num
(function).
num-leaves
(function).
pair-up-list
(function).
permute
(function).
powerset
(function).
remove-nth
(function).
slice
(function).
split-by-cond
(function).
insert-end
(function).
gute/io.lisp
list.lisp
(file).
gute
(system).
princln
(function).
read-all-from-file
(function).
read-all-from-stream
(function).
read-all-from-string
(function).
read-file-lines
(function).
read-file-lines2
(function).
write-list-to-file
(macro).
write-to-file
(macro).
gute/string.lisp
io.lisp
(file).
gute
(system).
atom2str
(function).
left-trim
(function).
levenshtein
(function).
list-to-string
(function).
right-trim
(function).
sym2str
(function).
trim
(function).
*trim-whitespace-chars*
(special variable).
gute/sexpr.lisp
string.lisp
(file).
gute
(system).
extract-category
(function).
get-subtrees
(function).
tree-depth
(function).
tree-find
(function).
tree-find-if
(function).
gute/symbol.lisp
sexpr.lisp
(file).
gute
(system).
*intern-caller-pkg*
(special variable).
fuse-into-atom
(function).
in-intern
(macro).
inout-intern
(macro).
split-into-atoms
(function).
preslash-unsafe-chars
(function).
gute/lore-util.lisp
symbol.lisp
(file).
gute
(system).
bind
(macro).
contains-underscore
(function).
do-lines
(macro).
do-lines-slurp
(macro).
extract-sentence
(function).
get-line
(function).
in-case-error
(macro).
intern-symbols-recursive
(function).
memberp
(function).
mintersection
(function).
mkstr
(function).
prune
(function).
safe-car
(function).
safe-cdddr
(function).
safe-cddr
(function).
safe-cdr
(function).
safe-fifth
(function).
safe-first
(function).
safe-fourth
(function).
safe-second
(function).
safe-third
(function).
slurp
(function).
split-at-char
(function).
split-at-underscore
(function).
sub
(function).
subst-in-symb
(function).
symb
(function).
tree-from-string
(function).
with-infile
(macro).
with-outfile
(macro).
escape-all-symbols
(function).
replace-lemma-parens
(function).
symbolize-lemmas
(function).
symbolize-node-tags
(function).
gute/regex.lisp
lore-util.lisp
(file).
gute
(system).
overlap-regex-matches
(function).
overlap-regex-matches-as-strings
(function).
regex-alist-to-scanner-alist
(function).
gute/lang.lisp
regex.lisp
(file).
gute
(system).
add-contractions
(function).
add-indefinite
(function).
apply-ing
(function).
capitalize-words
(function).
consonant?
(function).
contraction-possibilities
(function).
indefinite-article
(function).
past-participle
(function).
plural-of
(function).
plural?
(function).
present-singular
(function).
punctuation-p
(function).
remove-punctuation
(function).
simple-past
(function).
singular-of
(function).
singular?
(function).
transform-number
(function).
vowel?
(function).
*contraction-regex-alist*
(special variable).
*contraction-regex-scanner-alist*
(special variable).
*past-participles*
(special variable).
*simple-pasts*
(special variable).
+consonant-exceptions+
(constant).
+number-regexps+
(constant).
+vowel-exceptions+
(constant).
apply-ed
(function).
contraction-possibilities-eager
(function).
contraction-possibilities-overlap
(function).
gute/reachability-indexing.lisp
lang.lisp
(file).
gute
(system).
depth-label-graph
(function).
reachable
(function).
add-to-indices
(function).
add-to-intervals
(function).
depth-label-root
(function).
overlay-intervals
(function).
subsumes-intervals
(function).
gute/hashtable.lisp
reachability-indexing.lisp
(file).
gute
(system).
print-hash-table-readably
(function).
print-ht
(function).
gute/function.lisp
hashtable.lisp
(file).
gute
(system).
argnum
(function).
compose
(function).
grouped-arglist
(function).
key-argnum
(function).
nilfn
(function).
optional-argnum
(function).
required-argnum
(function).
tfn
(function).
gute/stats.lisp
function.lisp
(file).
gute
(system).
cartesian-product
(function).
group-precisions
(function).
macro-precision
(function).
micro-precision
(function).
precision
(function).
gute/memo.lisp
stats.lisp
(file).
gute
(system).
clear-memoize
(function).
defun-memo
(macro).
memo
(function).
memoize
(function).
*global-memo-lock*
(special variable).
gute/queue.lisp
memo.lisp
(file).
gute
(system).
dequeue
(function).
enqueue
(function).
make-queue
(function).
queue
(structure).
queue-empty-p
(function).
queue-peek
(function).
%make-queue
(function).
copy-queue
(function).
queue-items
(reader).
(setf queue-items)
(writer).
queue-p
(function).
queue-tail
(reader).
(setf queue-tail)
(writer).
gute/time.lisp
queue.lisp
(file).
gute
(system).
timing
(function).
gute/random.lisp
time.lisp
(file).
gute
(system).
categorical-sample
(function).
set-seed
(function).
uniform-sample
(function).
gute/clos.lisp
random.lisp
(file).
gute
(system).
clos-equality-constructor
(function).
Packages are listed by definition order.
gene-utilities
gute
common-lisp
.
common-lisp-user
.
*intern-caller-pkg*
(special variable).
acl-impl?
(function).
add-contractions
(function).
add-indefinite
(function).
add-nickname
(function).
alist-keys
(function).
apply-ing
(function).
argnum
(function).
argv
(function).
atom2str
(function).
bind
(macro).
capitalize-words
(function).
cartesian-product
(function).
categorical-sample
(function).
clear-memoize
(function).
clos-equality-constructor
(function).
cmucl-impl?
(function).
compose
(function).
consonant?
(function).
contains-underscore
(function).
contraction-possibilities
(function).
define-constant
(macro).
defun-memo
(macro).
depth-label-graph
(function).
dequeue
(function).
do-lines
(macro).
do-lines-slurp
(macro).
enqueue
(function).
extract-category
(function).
extract-sentence
(function).
fuse-into-atom
(function).
get-line
(function).
get-subtrees
(function).
group-precisions
(function).
grouped-arglist
(function).
in-case-error
(macro).
in-intern
(macro).
indefinite-article
(function).
inout-intern
(macro).
insert
(function).
interleave
(function).
intern-symbols-recursive
(function).
key-argnum
(function).
label-with-num
(function).
left-trim
(function).
levenshtein
(function).
lisp-impl
(function).
list-to-string
(function).
macro-precision
(function).
make-queue
(function).
memberp
(function).
memo
(function).
memoize
(function).
micro-precision
(function).
mintersection
(function).
mkstr
(function).
nilfn
(function).
num-leaves
(function).
optional-argnum
(function).
overlap-regex-matches
(function).
overlap-regex-matches-as-strings
(function).
pair-up-list
(function).
past-participle
(function).
permute
(function).
plural-of
(function).
plural?
(function).
powerset
(function).
precision
(function).
present-singular
(function).
princln
(function).
print-hash-table-readably
(function).
print-ht
(function).
prune
(function).
punctuation-p
(function).
queue
(structure).
queue-empty-p
(function).
queue-peek
(function).
reachable
(function).
read-all-from-file
(function).
read-all-from-stream
(function).
read-all-from-string
(function).
read-file-lines
(function).
read-file-lines2
(function).
regex-alist-to-scanner-alist
(function).
remove-nth
(function).
remove-punctuation
(function).
required-argnum
(function).
right-trim
(function).
safe-car
(function).
safe-cdddr
(function).
safe-cddr
(function).
safe-cdr
(function).
safe-fifth
(function).
safe-first
(function).
safe-fourth
(function).
safe-intern
(function).
safe-second
(function).
safe-symbol-eval
(function).
safe-third
(function).
sbcl-impl?
(function).
set-seed
(function).
simple-past
(function).
singular-of
(function).
singular?
(function).
slice
(function).
slurp
(function).
split-at-char
(function).
split-at-underscore
(function).
split-by-cond
(function).
split-into-atoms
(function).
sub
(function).
subst-in-symb
(function).
sym2str
(function).
symb
(function).
tfn
(function).
timing
(function).
transform-number
(function).
tree-depth
(function).
tree-find
(function).
tree-find-if
(function).
tree-from-string
(function).
trim
(function).
uniform-sample
(function).
vowel?
(function).
with-infile
(macro).
with-outfile
(macro).
write-list-to-file
(macro).
write-to-file
(macro).
%make-queue
(function).
*contraction-regex-alist*
(special variable).
*contraction-regex-scanner-alist*
(special variable).
*global-memo-lock*
(special variable).
*lisp-implementation-to-shorthand*
(special variable).
*past-participles*
(special variable).
*simple-pasts*
(special variable).
*trim-whitespace-chars*
(special variable).
+consonant-exceptions+
(constant).
+number-regexps+
(constant).
+vowel-exceptions+
(constant).
add-to-indices
(function).
add-to-intervals
(function).
apply-ed
(function).
contraction-possibilities-eager
(function).
contraction-possibilities-overlap
(function).
copy-queue
(function).
depth-label-root
(function).
escape-all-symbols
(function).
insert-end
(function).
overlay-intervals
(function).
preslash-unsafe-chars
(function).
queue-items
(reader).
(setf queue-items)
(writer).
queue-p
(function).
queue-tail
(reader).
(setf queue-tail)
(writer).
replace-lemma-parens
(function).
subsumes-intervals
(function).
symbolize-lemmas
(function).
symbolize-node-tags
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
ANSI compliant, robust version of defconstant.
Define a memoized function.
Writes a list to a file. Depends on write-to-file.
Writes a string to a file.
Concatenation of the common-noun with the proper indefinite article.
Adds a package nickname.
Takes a verb, as a string or symbol, and applies -ING morphology.
Returns the number of required arguments in the given function. Required arguments don’t include &key &optional or &rest arguments.
Gives the argv depending on the distribution.
Samples from a categorical distribution.
NB: The results will be sorted in the reverse order of cats.
Arguments
———
cats : a association list from categories to weights to sample from
n : the number of samples desired
Clear the hash table from a memo function.
Constructs a CLOS equality function with the given association list from
slot to equality function. The generated function is equal if for every slot
the equality function holds for that slot between two CLOS objects.
Returns a lambda object of the constructed function.
Composes any number of one argument functions.
Non-nil if a given character is a consonant.
The graph G is given as a list of vertices, where vertices are
atoms with properties named by IN and OUT. The values corresponding
to these properties are lists of vertices from which edges are
incident, and to which they are directed, respectively. IN and OUT
are pre-existing properties, while INDS, INTS, and VIS are created
in this program. VIS IN, OUT, INDS, INTS, VIS are all *names* of
atoms to be used as indicators, not the indicator atoms themselves.
The result is that all vertices have properties named INDS and INTS
(indices and intervals), such that vertex m is a proper ancestor of
n iff some index in the INDS list of n is contained in some interval
in the INTS list of m. Intervals are represented as dotted pairs of
positive integers, e.g., an INTS list might be ((1 . 3) (5 . 5) (8 . 9)).
VIS (’visited’) is used as a temporary flag. The VIS flags are reset
to NIL at the end.
Dequeues an item from queue. Signals an error if queue is empty.
Enqueue item in queue. Returns the queue.
Returns a list of all subtrees of the tree, including the tree itself.
Returns an alist of the function argument list grouped by argument type.
e.g. (grouped-arglist #’reduce)
-> ((&required . (function sequence))
(&key . (key from-end start end initial-value))
(&optional . nil)
(&rest . nil))
(grouped-arglist #’mapcar)
-> ((&required . (function list))
(&key . nil)
(&optional . nil)
(&rest . (more-lists)))
Returns ’a or ’an as appropriate.
Inserts X to LST at position I. Destructive.
Returns a list where the items alternate between the items of LST1 and LST2.
Labels LST with numbers.
Similar to ’enumerate’ in Python.
(label-with-num ’(a b c)) -> ’((0 a) (1 b) (2 c))
Returns a symbol of the lisp implementation.
This uses the implementation shorthands rather than the idiosyncratic names
returned from #’CL:LISP-IMPLEMENTATION-TYPE.
Returns an empty queue.
Return a memo-function of fn.
Replace fn-name’s global definition with a memoized version.
Returns an intersection, as a vector.
By default assumes x and y are lists or vectors of ints sorted least to greatest.
Function that just returns nil.
Count the number of leaves in a tree.
Returns a list where every two consecutive items in LST are paired together.
i.e. (a b c d) -> ((a b) (c d))
Assumes that the list is of even length and doesn’t contain nil elements.
Returns a list of all permutations of LIST.
From https://rosettacode.org/wiki/Permutations#Common_Lisp
Returns plural of common-noun as a string. If already plural then returns as-is.
Returns multiple values:
t iff common-noun is plural,
the entry from +number-regexps+ that tipped us off
Computes a powerset of set S.
From https://rosettacode.org/wiki/Power_set#Common_Lisp
CL version of ’println’ in Java.
The name PRINCLN is meant to reflect the CL naming conventions for prints.
Prints a hash table readably using ALEXANDRIA:ALIST-HASH-TABLE.
Prints a hash table readably to look like Python hash tables.
Returns true if the queue is empty.
Peeks into the first item of the queue.
Returns T if NODE1 is reachable via a downward path from NODE2;
INDS must evaluate to the name of the indicator used to store
the list of indices of a node in the graph to which NODE1
and NODE2 belong;
INTS must evaluate to the name of the indicator used to store
the list of intervals of a node in the graph to which NODE1
and NODE2 belong.
Reads all s-expressions from the given file until exhausted.
It will raise an error if the file does not contain a sequence of valid
s-expresssions.
Reads all s-expressions from a character stream until exhausted. It will
raise an eof-error if the stream does not represent a sequence of
s-expresssions. Comments are ignored.
The handling of file-ending block comments are done by redefining the block
comment dispatch function to return the concatenation of a generated symbol
and a specific base symbol. This is only checked when we come across a ##
macro dispatch, so the method will fail if some other ## dispatch macro
returns this symbol. This is extremely unlikely, but not impossible.
The optional argument placeholder-base allows the caller to specify a placeholder that is known to not conflict with any read result.
Reads all s-expressions from the given string.
Raises an error if the string does not represent a series of valid
s-expressions. Same as READ-ALL-FROM-FILE, but for strings.
Reads a file line by line and return a list of strings.
Reads a file line by line and return a list of strings.
Done in a loop so you won’t get a stack overflow even with bad compiler
parameters.
Returns LST without the N-th element.
Replace punctuation with spaces in string.
Safe intern.
strsym can be a string or a symbol and it interns it.
Evaluate symbol w.r.t. a package safely.
Evaluates a symbol with respect to the given package iff the package is
available and the symbol is found in that package.
Set randomness seed with a number for replicability, using SBCL functionality. This functionality doesn’t exist for general CL.
Returns singular form of common-noun as a string. If already singular then returns as-is.
Returns multiple values:
t iff common-noun is singular,
the entry from +number-regexps+ that tipped us off
Returns a slice of LST with given indices.
START and END are inclusive and exclusive, respectively.
Split the given literal atom into a part ending in an underscore and a part after the underscore; If there is no underscore, return nil; o/w return a list (metavar test) consisting of two atoms corresponding to the respective parts above; if there was nothing after the underscore, use test = nil.
Returns LST with CNDN filtered out followed by LST with only CNDN.
Function that just returns t.
Transforms the given common-noun from singular to plural or vice-versa
depending on the value of number (’singular or ’plural).
number-entry refers to the entry in +number-regexps+ that we will be using
to do the transformation.
Takes a string representing a tree, returns a lisp object.
Assumes tree is represented as embedded parenthesis.
Disallowed symbols such as ’,’ will be escaped.
No matter input, output will be uppercase.
Sample uniformly from a list WITH replacement
Non-nil if a given character is a vowel.
Add index I to the INDS list of vertex R, keeping the list in ascending order.
Add integer I to the INTS list of vertex R, maintaining maximal, ascending, disjoint intervals.
Takes a verb, as a string, applies -ED morphology, returns string.
R is the start vertex for the depth-first labelling; it is assumed
not to have been visited yet (its vis value is nil); I is the depth-
first edge index that is to be assigned to the first unlabelled edge
encountered that leads to a terminal or already visited vertex.
The result is that all vertices which are reachable from R and, to begin
with, are not flagged as visited, are marked as visited, and all edges
that are reachable from r and, to begin with, are not indexed become
indexed with depth-first numbers.
The value returned is a pair (CYCLIC J) where CYCLIC = T if a cycle was encountered in the depth-first search, and J is the next index that can be assigned to an edge, i.e., it is the highest index that was assigned, plus 1.
Inserts X to LST at the rightmost position. Destructive.
X is a child of Y; the intervals of X are merged into the intervals of Y, maintaining maximal, ascending, disjoint integer intervals; Besides changing the INTS property of Y, the function also returns the merged intervals.
Prefix ” to unsafe characters # ‘ ’ : ; , . | in ’aString’.
tail
.
Return T iff the INTS-intervals of X contain all the INTS-intervals of Y.
Jump to: | %
(
A B C D E F G I K L M N O P Q R S T U V W |
---|
Jump to: | %
(
A B C D E F G I K L M N O P Q R S T U V W |
---|
Jump to: | *
+
C I S T |
---|
Jump to: | *
+
C I S T |
---|
Jump to: | C F G H I L M P Q R S T |
---|
Jump to: | C F G H I L M P Q R S T |
---|