Crates.io | portmanteau |
lib.rs | portmanteau |
version | 0.2.2 |
source | src |
created_at | 2021-07-10 18:41:43.620203 |
updated_at | 2024-09-22 15:01:29.269486 |
description | A library to create portmanteaux |
homepage | https://codeberg.org/alpha-tango-kilo/portmanteau-rs |
repository | https://codeberg.org/alpha-tango-kilo/portmanteau-rs |
max_upload_size | |
id | 421174 |
size | 30,857 |
A portmanteau is a made up word derived as a combination of two other words, e.g. "liquid" + "slinky" = "liquinky"
It isn't always possible to produce a portmanteau from the input words (there are some quality checks in place), so the exposed portmanteau
function returns an Option<String>
The general guidelines to get a result are as follows:
This library's initial implementation was largely inspired by the work of jamcowl's portmanteau bot. The full implementation is not available in their repository and over time my implementation may differ from theirs in terms of approach and output (it already does in some cases)
Please do not hold myself (or any contributer to this repository) accountable for any derogatory words or slurs you are able to have this algorithm produce. There are no checks for bad language in place, and there are no plans to add any. It is not my (or any contributer's) job to determine what is or isn't offensive
At a high level, this is how the algorithm works:
*: The start of the first word and the end of the last word is cut off for these operations to avoid low quality output
To install and use portmanteau
as a binary application on your system, you can simply run:
cargo install portmanteau
You will need the --force
flag if you are updating
For usage instructions, please refer to portmanteau --help
portmanteau-bin
)Much the same as Rust is, this library is dual-licensed under MIT or Apache 2.0 at your choosing