Coder Social home page Coder Social logo

vlazba's Introduction

vlazba / gimyzba / jvozba

A Rust-based tool for generating Lojban gismu (root words) and lujvo (compound words).

Features

  • Generates gismu based on input from transliterations of words in multiple languages
  • Creates lujvo using the jvozba algorithm
  • Customizable language weighting
  • Efficient Rust implementation

Installation

  1. Ensure you have Rust installed and up to date:

    rustup default stable
    rustup update
  2. Clone the repository and build the project:

    git clone https://github.com/your-username/vlazba.git
    cd vlazba
    cargo build --release
  3. The executable will be available at target/release/vlazba

Usage

Gismu Generation

Basic usage:

./vlazba "<Mandarin> <Hindi> <English> <Spanish> <Russian> <Arabic>"

Example:

./vlazba "uan rakan ekspekt esper predpologa mulud"

Custom weights:

./vlazba -w 0.271,0.170,0.130,0.125,0.104,0.076,0.064,0.060 mandarin english spanish hindi arabic bengali russian portuguese

Lujvo Creation (jvozba)

To create lujvo using the jvozba algorithm:

./vlazba --jvozba "<word1> <word2> <word3>"
./vlazba --jvozba --exp-rafsi "<word1> <word2> <word3>"

Examples:

./vlazba --jvozba "klama klama gasnu"
./vlazba --jvozba --exp-rafsi "corci klama gasnu"

Lujvo Decomposition (jvokaha)

To split lujvo using the jvokaha algorithm:

./vlazba --jvokaha "<lujvo>"
./vlazba --jvokajha --exp-rafsi "<lujvo>"

Examples:

./vlazba --jvozba "klaklagau"
./vlazba --jvozba --exp-rafsi "cocklagau"

Options

  • -w, --weights: Specify custom language weights (default: 0.347,0.196,0.160,0.123,0.089,0.085)
  • -s, --shapes: Define gismu candidate shapes (default: "ccvcv,cvccv")
  • -a, --all-letters: Use all available letters instead of only those in input words
  • -d, --deduplicate: Path to existing gismu list for deduplication
  • --jvozba: Use jvozba function to create lujvo instead of gismu generation
  • --forbid-la-lai-doi: Forbid 'la', 'lai', 'doi' in lujvo when using jvozba
  • --jvokaha: Use jvokaha function to split lujvo into components
  • --exp-rafsi: Include experimental rafsi when generating lujvo

Debug

RUST_BACKTRACE=full cargo run -- "uan rakan ekspekt esper predpologa mulud"

Background

This project is a Rust rewrite of the original gimyzba and its Python port. It aims to provide a more efficient and maintainable implementation of the gismu generation algorithm. Additionally it ports jvozba algorithm for getting lujvo creation functionality.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE.

vlazba's People

Contributors

lagleki avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mattfbacon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.