subslay 0.1.8

SubSlay: Text โ†’ emoji ๐Ÿ’…๐Ÿป Powered by Rust.
Documentation

๐Ÿงพ What is SubSlay?

SubSlay is a text-to-emoji transformer that turns plain text into expressive emoji sequences โ€” powered by semantic similarity (via GloVe vectors), direct keyword mappings, and fuzzy Levenshtein fallback.

โœจ "Hello, world!" โ†’ "๐Ÿ‘‹ ๐ŸŒ"

This crate is built entirely in Rust and is compatible with native binaries and WebAssembly, with no external files or setup required.


๐ŸŒ Try It Live

๐Ÿ”— SubSlay.app โ€” Web demo powered by this crate


๐Ÿ›  Features

  • ๐Ÿฆ€ Pure Rust (no WASM bindings inside)
  • ๐Ÿ“ฆ No setup โ€” GloVe + emoji mappings are embedded
  • ๐Ÿ’ก Keyword match, cosine similarity, and Levenshtein fallback
  • ๐Ÿงช Fully tested
  • ๐ŸŒ Easily used in WASM apps (via your own wrapper)

โœจ Usage

Add it to your project:

[dependencies]

subslay = "0.1.8"

Use it in Rust:

use subslay::EmojiStylist;

fn main() {
    let stylist = EmojiStylist::new().unwrap();
    let emojis = stylist.slay("Hello, world!");
    println!("{:?}", emojis); // ["๐Ÿ‘‹", "๐ŸŒ"]
}

๐Ÿง  How It Works

SubSlay internally loads:

  • emoji.json โ€” maps emojis to keyword lists
  • glove.txt โ€” GloVe-style word embeddings

Then it:

  1. Matches input words to emoji keywords
  2. Uses cosine similarity to suggest close matches
  3. Falls back to Levenshtein distance if all else fails

All logic is pure Rust and runs without filesystem access โ€” ideal for embedded and WASM environments.


๐Ÿ“ Project Layout

subslay/

โ”œโ”€โ”€ src/

โ”‚   โ””โ”€โ”€ lib.rs            # Emoji transformer engine

โ”œโ”€โ”€ static/

โ”‚   โ”œโ”€โ”€ emoji.json        # Emoji โ†’ keywords (embedded)

โ”‚   โ””โ”€โ”€ glove.txt         # GloVe embeddings (embedded)

โ”œโ”€โ”€ Cargo.toml

โ””โ”€โ”€ README.md


โœ… Test

Run tests with:

cargo test

All embeddings and mappings are embedded, so no setup is needed.


๐Ÿค Contribute

Feel free to open issues or pull requests for:

  • New emoji suggestions
  • Better embedding support
  • Fallback improvements
  • WASM wrappers or examples

๐Ÿ“„ License

MIT ยฉ AndriaK GitHub: github.com/8ria/subslay


"Built to slay, not obey." ๐Ÿ’…๐Ÿป