https://github.com/traut/cl-portmanteau
Common Lisp portmanteau library
https://github.com/traut/cl-portmanteau
common-lisp portmanteau
Last synced: 5 months ago
JSON representation
Common Lisp portmanteau library
- Host: GitHub
- URL: https://github.com/traut/cl-portmanteau
- Owner: traut
- License: bsd-3-clause
- Created: 2017-11-20T12:24:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T12:51:38.000Z (almost 8 years ago)
- Last Synced: 2025-01-26T06:27:08.999Z (over 1 year ago)
- Topics: common-lisp, portmanteau
- Language: Common Lisp
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cl-portmanteau
*cl-portmanteau* is a library that makes a portmanteau of two words.

### Definition
A **portmanteau** ([from Wiki](https://en.wikipedia.org/wiki/Portmanteau)) - (_/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
```lisp
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](https://github.com/roswell/roswell) installed:
```bash
cl-portmanteau $ ros ./run.ros mock documentary
mocumentary
```
### Tests
```lisp
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 [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:
```bash
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-portmanteau $
```