The oneliner Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The oneliner Reference Manual

This is the oneliner Reference Manual, version 0.1.0, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:22:26 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

One-liner

Extracts a one-liner from a piece of text.

How?

  1. Counts word occurences
  2. Given each word, count word occurences immediately after this word
  3. Construct sentence by taking 1 and 2 recursively
  4. Avoids repeating a word to avoid infinite loops
  5. Removes all punctuation marks and convert to lower-case

Why?

Why not. Are you not curious about the results?

Example

(ql:quickload 'cl-oneliner)
(cl-oneliner:oneliner "whatever wall of text you are too lazy too read")

In the functional fashion of recursion, when given this README as an example, it produces the following:

"word occurences given each"

Isn't that just poetic?

Idea sparked by @flockonus


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-oneliner

Author

mck-

License

wtfpl

Description

Given a piece of text, summarize it with a one-liner

Version

0.1.0

Dependencies
Source

cl-oneliner.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cl-oneliner/test

Dependency

cl-oneliner.lisp (file)

Parent

cl-oneliner (system)

Location

test/

Component

utils.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-oneliner.asd

Location

cl-oneliner.asd

Systems

cl-oneliner (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-oneliner/package.lisp

Parent

cl-oneliner (system)

Location

package.lisp

Packages

cl-oneliner


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cl-oneliner/utils.lisp

Dependency

package.lisp (file)

Parent

cl-oneliner (system)

Location

utils.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 cl-oneliner/cl-oneliner.lisp

Dependency

utils.lisp (file)

Parent

cl-oneliner (system)

Location

cl-oneliner.lisp

Exported Definitions

oneliner (function)

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.5 cl-oneliner/test/utils.lisp

Parent

test (module)

Location

test/utils.lisp


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 cl-oneliner

Source

package.lisp (file)

Use List
Exported Definitions

oneliner (function)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Functions

Function: oneliner STRING

Given a string, summarize the piece of text in a oneliner

Package

cl-oneliner

Source

cl-oneliner.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Macros

Macro: val ALIST &rest KEYS

Given an alist, and a list of keys, retrieve value dot-notation style

Package

cl-oneliner

Source

utils.lisp (file)

Macro: val-reversed ALIST &rest KEYS

Given an alist, and a list of keys, retrieve value dot-notation style (reversed)

Package

cl-oneliner

Source

utils.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: alist-count STRING

Given a string, return an Alist counting the words

Package

cl-oneliner

Source

utils.lisp (file)

Function: alist-most-frequent ALIST-COUNT

Given an alist-count, return most frequent item

Package

cl-oneliner

Source

utils.lisp (file)

Function: alist-most-frequent-next MOST-FREQUENT

Given an object (from alist-most-frequent), return the word that occurs most frequently as next word

Package

cl-oneliner

Source

utils.lisp (file)

Function: alist-next-count STRING ALIST

Given the original string and the alist resulting from alist-count, count next words

Package

cl-oneliner

Source

utils.lisp (file)

Function: aval KEY ALIST

Given alist and key, return value

Package

cl-oneliner

Source

utils.lisp (file)

Function: count-words STRING

Given a string, return an alist which counts the words and the next words that come after it

Package

cl-oneliner

Source

utils.lisp (file)

Function: get-count WORD ALIST-COUNT

Given a word and an alist-count, return number of occurence

Package

cl-oneliner

Source

utils.lisp (file)

Function: get-next-word ALIST WORD
Package

cl-oneliner

Source

cl-oneliner.lisp (file)

Function: next-counts WORD STRING

Given a word and the string, return list of (word . count)

Package

cl-oneliner

Source

utils.lisp (file)

Function: remove-word ALIST WORD

Given an alist-count and current word, return alist without word – and make sure they are also removed from all next counts

Package

cl-oneliner

Source

cl-oneliner.lisp (file)

Function: simplify-word WORD

Given a word, put it to lower-case and remove all symbols

Package

cl-oneliner

Source

utils.lisp (file)

Function: split-words SENTENCE
Package

cl-oneliner

Source

utils.lisp (file)

Function: words-sorted SENTENCE
Package

cl-oneliner

Source

utils.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cl-oneliner.asd: The cl-oneliner<dot>asd file
cl-oneliner/cl-oneliner.lisp: The cl-oneliner/cl-oneliner<dot>lisp file
cl-oneliner/package.lisp: The cl-oneliner/package<dot>lisp file
cl-oneliner/test: The cl-oneliner/test module
cl-oneliner/test/utils.lisp: The cl-oneliner/test/utils<dot>lisp file
cl-oneliner/utils.lisp: The cl-oneliner/utils<dot>lisp file

F
File, Lisp, cl-oneliner.asd: The cl-oneliner<dot>asd file
File, Lisp, cl-oneliner/cl-oneliner.lisp: The cl-oneliner/cl-oneliner<dot>lisp file
File, Lisp, cl-oneliner/package.lisp: The cl-oneliner/package<dot>lisp file
File, Lisp, cl-oneliner/test/utils.lisp: The cl-oneliner/test/utils<dot>lisp file
File, Lisp, cl-oneliner/utils.lisp: The cl-oneliner/utils<dot>lisp file

L
Lisp File, cl-oneliner.asd: The cl-oneliner<dot>asd file
Lisp File, cl-oneliner/cl-oneliner.lisp: The cl-oneliner/cl-oneliner<dot>lisp file
Lisp File, cl-oneliner/package.lisp: The cl-oneliner/package<dot>lisp file
Lisp File, cl-oneliner/test/utils.lisp: The cl-oneliner/test/utils<dot>lisp file
Lisp File, cl-oneliner/utils.lisp: The cl-oneliner/utils<dot>lisp file

M
Module, cl-oneliner/test: The cl-oneliner/test module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   C   F   G   M   N   O   R   S   V   W  
Index Entry  Section

A
alist-count: Internal functions
alist-most-frequent: Internal functions
alist-most-frequent-next: Internal functions
alist-next-count: Internal functions
aval: Internal functions

C
count-words: Internal functions

F
Function, alist-count: Internal functions
Function, alist-most-frequent: Internal functions
Function, alist-most-frequent-next: Internal functions
Function, alist-next-count: Internal functions
Function, aval: Internal functions
Function, count-words: Internal functions
Function, get-count: Internal functions
Function, get-next-word: Internal functions
Function, next-counts: Internal functions
Function, oneliner: Exported functions
Function, remove-word: Internal functions
Function, simplify-word: Internal functions
Function, split-words: Internal functions
Function, words-sorted: Internal functions

G
get-count: Internal functions
get-next-word: Internal functions

M
Macro, val: Internal macros
Macro, val-reversed: Internal macros

N
next-counts: Internal functions

O
oneliner: Exported functions

R
remove-word: Internal functions

S
simplify-word: Internal functions
split-words: Internal functions

V
val: Internal macros
val-reversed: Internal macros

W
words-sorted: Internal functions

Jump to:   A   C   F   G   M   N   O   R   S   V   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-oneliner: The cl-oneliner system
cl-oneliner: The cl-oneliner package

P
Package, cl-oneliner: The cl-oneliner package

S
System, cl-oneliner: The cl-oneliner system

Jump to:   C   P   S