The portmanteau Reference Manual

Table of Contents

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

The portmanteau Reference Manual

This is the portmanteau Reference Manual, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:19:23 2018 GMT+0.


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

1 Introduction

cl-portmanteau

cl-portmanteau is a library that makes a portmanteau of two words.

Definition

A portmanteau (from Wiki) - (/pɔːrtˈmæntoʊ/, /ˌpɔːrtmænˈtoʊ/; plural portmanteaus or portmanteaux /-ˈtoʊz/) or portmanteau word is a linguistic blend of words, in which parts of multiple words or their phones (sounds) are combined into a new word, as in smog, coined by blending smoke and fog, or motel, from motor and hotel. In linguistics, a portmanteau is defined as a single morph that represents two or more morphemes.

Installation and usage

CL-USER(1): (asdf:load-system 'portmanteau)

T
CL-USER(2): (portmanteau:portmanteau "mock" "documentary")

"mocumentary"
CL-USER(3):

CLI

To run cl-portmanteau in CLI mode, you will need Roswell installed:

cl-portmanteau $ ros ./run.ros mock documentary
mocumentary

Tests

CL-USER(1): (asdf:load-system 'portmanteau)

T
CL-USER(2): (asdf:load-system 'portmanteau-tests)

T
CL-USER(3): (portmanteau-tests:all-tests)

Running test suite MAIN-SUITE
 Running test TOO-SHORT-TEST  <ERROR> [13:20:37] portmanteau - Both words must be longer than 3
.
 Running test MATCHING-TOO-CLOSE-TO-BEGINNING-TEST .
 Running test MATCHING-TOO-CLOSE-TO-END-TEST .
 Running test NOT-MATCHING-TEST .
 Running test MERGER-TEST ....
 Did 8 checks.
    Pass: 8 (100%)
    Skip: 0 ( 0%)
    Fail: 0 ( 0%)

T
NIL
CL-USER(4):

or via Roswell:

cl-portmanteau $ ros ./run-tests.ros

Running test suite MAIN-SUITE
 Running test TOO-SHORT-TEST .
 Running test MATCHING-TOO-CLOSE-TO-BEGINNING-TEST .
 Running test MATCHING-TOO-CLOSE-TO-END-TEST .
 Running test NOT-MATCHING-TEST .
 Running test MERGER-TEST ....
 Did 8 checks.
    Pass: 8 (100%)
    Skip: 0 ( 0%)
    Fail: 0 ( 0%)

cl-portm

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 portmanteau

Author

Sergey Polzunov <sergey@polzunov.com>

License

OSI approved 3-clause ’New BSD License’

Description

cl-portmanteau

Dependency

vom

Source

portmanteau.asd (file)

Component

portmanteau.lisp (file)


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

3 Files

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


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

3.1 Lisp


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

3.1.1 portmanteau.asd

Location

portmanteau.asd

Systems

portmanteau (system)


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

3.1.2 portmanteau/portmanteau.lisp

Parent

portmanteau (system)

Location

portmanteau.lisp

Packages

portmanteau

Exported Definitions

portmanteau (function)

Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 portmanteau

Source

portmanteau.lisp (file)

Use List

common-lisp

Exported Definitions

portmanteau (function)

Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


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

5.1.1 Functions

Function: portmanteau WORD-A WORD-B &key MAX-WIN-SIZE

Calculate portmanteau of 2 input words

Package

portmanteau

Source

portmanteau.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *margin*
Package

portmanteau

Source

portmanteau.lisp (file)

Special Variable: *min-word-size*
Package

portmanteau

Source

portmanteau.lisp (file)


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

5.2.2 Functions

Function: calculate-max-window-size WORD-A WORD-B

Calulate max matching window size from the size
of input words by dividing length of the longest word by 3. The result must not be less than 3

Package

portmanteau

Source

portmanteau.lisp (file)

Function: contains-vowel WORD
Package

portmanteau

Source

portmanteau.lisp (file)

Function: filter-out-without-vowels SEQ
Package

portmanteau

Source

portmanteau.lisp (file)

Function: find-matches SEQ-A SEQ-B WORD-B-SIZE
Package

portmanteau

Source

portmanteau.lisp (file)

Function: is-far-enough-from-end IDX ELEM WORD-LEN

Check if the beginning of an element is placed no closer than *margin* from the end of the string

Package

portmanteau

Source

portmanteau.lisp (file)

Function: is-far-enough-from-start IDX ELEM

Check if the end of an element is placed no closer than *margin* from the beginning of the string

Package

portmanteau

Source

portmanteau.lisp (file)

Function: is-long-enough WORD &key SIZE
Package

portmanteau

Source

portmanteau.lisp (file)

Function: merge-words WORD-A INDEX-A WORD-B INDEX-B
Package

portmanteau

Source

portmanteau.lisp (file)

Function: run-moving-window WORD SIZE
Package

portmanteau

Source

portmanteau.lisp (file)

Function: valid-result RESULT WORD-A WORD-B

Validate result word.
Criteria:
- result must not be smaller than one of the input words

Package

portmanteau

Source

portmanteau.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   P  
Index Entry  Section

F
File, Lisp, portmanteau.asd: The portmanteau<dot>asd file
File, Lisp, portmanteau/portmanteau.lisp: The portmanteau/portmanteau<dot>lisp file

L
Lisp File, portmanteau.asd: The portmanteau<dot>asd file
Lisp File, portmanteau/portmanteau.lisp: The portmanteau/portmanteau<dot>lisp file

P
portmanteau.asd: The portmanteau<dot>asd file
portmanteau/portmanteau.lisp: The portmanteau/portmanteau<dot>lisp file

Jump to:   F   L   P  

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

A.2 Functions

Jump to:   C   F   I   M   P   R   V  
Index Entry  Section

C
calculate-max-window-size: Internal functions
contains-vowel: Internal functions

F
filter-out-without-vowels: Internal functions
find-matches: Internal functions
Function, calculate-max-window-size: Internal functions
Function, contains-vowel: Internal functions
Function, filter-out-without-vowels: Internal functions
Function, find-matches: Internal functions
Function, is-far-enough-from-end: Internal functions
Function, is-far-enough-from-start: Internal functions
Function, is-long-enough: Internal functions
Function, merge-words: Internal functions
Function, portmanteau: Exported functions
Function, run-moving-window: Internal functions
Function, valid-result: Internal functions

I
is-far-enough-from-end: Internal functions
is-far-enough-from-start: Internal functions
is-long-enough: Internal functions

M
merge-words: Internal functions

P
portmanteau: Exported functions

R
run-moving-window: Internal functions

V
valid-result: Internal functions

Jump to:   C   F   I   M   P   R   V  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*margin*: Internal special variables
*min-word-size*: Internal special variables

S
Special Variable, *margin*: Internal special variables
Special Variable, *min-word-size*: Internal special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   P   S  
Index Entry  Section

P
Package, portmanteau: The portmanteau package
portmanteau: The portmanteau system
portmanteau: The portmanteau package

S
System, portmanteau: The portmanteau system

Jump to:   P   S