Rust crate for reconstructing Arabic sentences to be used in applications that don't support Arabic

Overview

Arabic Reshaper Rust

Latest version Build Status unsafe forbidden MIT

Reconstruct Arabic sentences to be used in applications that don't support Arabic script.

Usage:

resahpe a single line of string

use ar_reshaper::{ArabicReshaper, reshape_line};

let reshaper = ArabicReshaper::default();

// You can reshape just a single string using
println!("{}", reshaper.reshape("سلام دنیا"));
// or using `reshape_line` method if you dont want to construct the [ArabicReshaper]
// and you just want to reshape a few strings with default config
println!("{}", reshape_line("سلام دنیا"));
// Both will reconstruct the string and print `ﺳﻼﻡ ﺩﻧﯿﺎ`

reshape a slice of strings

use ar_reshaper::{ArabicReshaper}

let reshaper = ArabicReshaper::default();

let lines = [
    "سلام",
    "سلام، خوبی؟",
];

println!("{:#?}", reshaper.reshape_lines(lines));
// or you can just use reshape method in a loop... the choice is yours.

reshape strings on a iterator

use ar_reshaper::ArabicReshaperExt;

for line in ["یک", "دو"].iter().reshape_default() {
    println!("{line}");
}

You can check example or test directory for more examples.

features:

  • ttf-parser: if you enable this feature the ReshaperConfig method will have another extra method named from_font that can be used to enable ligatures only if they exist in the input font.
  • bitflags: enable the use bitflags for the LigaturesFlags.

Credits:

this project is based on the awesome python-arabic-reshaper. you can check original project in this repository

You might also like...
Talk with your machine in this minimalistic Rust crate!

Speak Speak is a simple, easy to use Natural Language Processor (NLP) written in Rust. Why use Speak? Speak uses a custom engine, and to setup you jus

A gpu accelerated (optional) neural network Rust crate.

Intricate A GPU accelerated library that creates/trains/runs neural networks in pure safe Rust code. Architechture overview Intricate has a layout ver

Linear algebra crate for Rust.

cayley - generic, stack-allocated linear algebra in Rust cayley is a crate that fills a small niche: it provides a generic matrix type that allocates

A neural network crate

RustNN An easy to use neural network library written in Rust. Crate Documentation Description RustNN is a feedforward neural network library. The libr

Awesome deep learning crate
Awesome deep learning crate

NeuroFlow is fast neural networks (deep learning) Rust crate. It relies on three pillars: speed, reliability, and speed again. Hello, everyone! Work o

convolutions-rs is a crate that provides a fast, well-tested convolutions library for machine learning

convolutions-rs convolutions-rs is a crate that provides a fast, well-tested convolutions library for machine learning written entirely in Rust with m

A high level, easy to use gpgpu crate based on wgpu

A high level, easy to use gpgpu crate based on wgpu. It is made for very large computations on powerful gpus

Small crate to work with URL in miniquad/macroquad.

quad-url This is the crate to work with URL and open links in miniquad/macroquad environment. Web demo. Usage Add this to your Cargo.toml dependencies

Msgpack serialization/deserialization library for Python, written in Rust using PyO3, and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

Command line interface for BDSP RNG, primarily used as a reference implementation and as a tool for testing.

BDSP RNG Reference This is a command line interface for BDSP RNG, primarily used as a reference implementation and as a tool for testing. Building Bui

Zak 2 Nov 20, 2022
High-performance runtime for data analytics applications

Weld Documentation Weld is a language and runtime for improving the performance of data-intensive applications. It optimizes across libraries and func

Weld 2.9k Jan 7, 2023
Xaynet represents an agnostic Federated Machine Learning framework to build privacy-preserving AI applications.

xaynet Xaynet: Train on the Edge with Federated Learning Want a framework that supports federated learning on the edge, in desktop browsers, integrate

XayNet 196 Dec 22, 2022
Qdrant - vector similarity search engine with extended filtering support

Vector Similarity Search Engine with extended filtering support Qdrant (read: quadrant ) is a vector similarity search engine. It provides a productio

qdrant 3.5k Dec 30, 2022
FFSVM stands for "Really Fast Support Vector Machine"

In One Sentence You trained a SVM using libSVM, now you want the highest possible performance during (real-time) classification, like games or VR. Hig

Ralf Biedert 53 Nov 24, 2022
Believe in AI democratization. llama for nodejs backed by llama-rs, work locally on your laptop CPU. support llama/alpaca model.

llama-node Large Language Model LLaMA on node.js This project is in an early stage, the API for nodejs may change in the future, use it with caution.

Genkagaku.GPT 145 Apr 10, 2023
Machine learning crate for Rust

rustlearn A machine learning package for Rust. For full usage details, see the API documentation. Introduction This crate contains reasonably effectiv

Maciej Kula 547 Dec 28, 2022
Rust crate to create Anki decks. Based on the python library genanki

genanki-rs: A Rust Crate for Generating Anki Decks With genanki-rs you can easily generate decks for the popular open source flashcard platform Anki.

Yannick Funk 63 Dec 23, 2022
High-level non-blocking Deno bindings to the rust-bert machine learning crate.

bertml High-level non-blocking Deno bindings to the rust-bert machine learning crate. Guide Introduction The ModelManager class manages the FFI bindin

Carter Snook 14 Dec 15, 2022
Machine learning crate in Rust

DeepRust - Machine learning in Rust Vision To create a deeplearning crate in rust aiming to create a great experience for ML researchers & developers

Vigneshwer Dhinakaran 8 Sep 6, 2022