Rust library for program synthesis of string transformations from input-output examples 🔮

Related tags

Miscellaneous synox
Overview

Synox Build Status Crates.io Documentation

Synox implements program synthesis of string transformations from input-output examples. Perhaps the most well-known use of string program synthesis in end-user programs is the Flash Fill feature in Excel. These string transformations are learned from input-output examples.

Synox currently implements BlinkFill (Singh '16, in Proc. VLDB), an algorithm similar to Flash Fill.

Usage

Add this to your Cargo.toml:

[dependencies]
synox = "0.1"

Example

Consider the following table, with a missing entry in an output column.

Name Graduation Year Output
Alyssa P. Hacker 1985 A. Hacker '85
Ben Bitdiddle 2002 B. Bitdiddle '02
Cy D. Fect 2017 ?

Synox can infer a program that automatically fills in the missing entry with "C. Fect '17".

use synox::StringProgram;
use synox::blinkfill;

let unpaired: &[Vec<&str>] = &[];
let examples = &[(vec!["Alyssa P. Hacker", "1985"], "A. Hacker '85"   ),
                 (vec!["Ben Bitdiddle",    "2002"], "B. Bitdiddle '02")];

let prog = blinkfill::learn(unpaired, examples)?;

let result = prog.run(&["Cy D. Fect", "2017"])?;
assert_eq!(result, "C. Fect '17");

License

Copyright (c) 2021 Anish Athalye. Released under the MIT License. See LICENSE.md for details.

You might also like...
Provides a Suricata Eve output for Kafka with Suricate Eve plugin

Suricata Eve Kafka Output Plugin for Suricata 6.0.x This plugin provides a Suricata Eve output for Kafka. Base on suricata-redis-output: https://githu

CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a "plotable" format.

Lighthouse Groupie CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a "plotable" form

🥅 Dead simple webhook worker for Sentry to output events in a Discord channel
🥅 Dead simple webhook worker for Sentry to output events in a Discord channel

🥅 Sentry Webhook Dead simple webhook worker for Sentry to output events in a Discord channel Why? This is just a simple Rust HTTP service to do so, t

A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles.

shikane A dynamic output configuration tool that automatically detects and configures connected outputs based on a set of profiles. Each profile speci

A variation of the solana helloworld program example with a client written in Rust instead of Typescript

Simple Solana Smart Contract Example This repository demonstrates how to create and invoke a program on the Solana blockchain. In Solana the word prog

kindly is a simple Rust implementation of a set-user-ID-root program, similar to sudo but in a much reduced way.

kindly is a simple Rust implementation of a set-user-ID-root program, similar to sudo but in a much reduced way.

Remedy is a multi-threaded rust-imap-maildir synchronization program

remedy Remedy is a multi-threaded rust-imap-maildir synchronization program. Please note that remedy is under heavy development. Current features: IMA

A rust program to try and detect some types of Hardware Keyloggers.
A rust program to try and detect some types of Hardware Keyloggers.

Hardware Keylogger Detection Warning: Certain Types of Hardware keyloggers can not be detected by this program, Passive Hardware Keyloggers are imposs

rust mappings for Friktion's volt program

Friktion (volt) ABI Overview Provides contexts and instruction functions to interact with Friktion Program via CPI calls Friktion program ID: VoLT1mJz

Owner
Anish Athalye
grad student @mit-pdos
Anish Athalye
Examples from the talk Why you should learn Rust

Why you should learn Rust: Examples This repository contains the examples from the talk "Why you should learn Rust". All examples demonstrate that the

Björn Lange 1 Aug 12, 2022
A repository of examples for esp32s3-box written in Rust

ESP32S3-BOX Examples A repository of examples for esp32s3-box written in Rust Usage hello world cargo espflash --release --monitor esp demo animati

null 8 Dec 19, 2022
PyO3 examples

PyO3 examples This repo accompanies this blog post. The Rust examples, found here, include: calculate the n-th Fibonacci in Python as well as in Rust

null 13 Jun 3, 2022
Community showcase and examples of Actix ecosystem usage.

Actix Examples Curated examples using the Actix ecosystem. Community Showcase Merino: Web service for Firefox Suggest lemmy: A federated alternative t

Actix 2.9k Dec 31, 2022
Easier joystick, mouse and keyboard input handling in Bevy

Easier joystick, mouse and keyboard input handling in Bevy

Pedro Henrique 31 Dec 20, 2022
A stupid macro that compiles and executes Rust and spits the output directly into your Rust code

inline-rust This is a stupid macro inspired by inline-python that compiles and executes Rust and spits the output directly into your Rust code. There

William 19 Nov 29, 2022
Annoyed that Rust has many string types? Well it doesn't have to

generic-str The one true string type in Rust! This project intends to be a proof-of-concept for an idea I had a few months back. There is lots of unsa

Conrad Ludgate 40 Apr 9, 2022
A flexible, simple to use, immutable, clone-efficient String replacement for Rust

flexstr A flexible, simple to use, immutable, clone-efficient String replacement for Rust Overview Rust is great, but it's String type is optimized as

Scott Meeuwsen 119 Dec 12, 2022
Shows only the first page of rustc output

cargo-first-page Shows only the first page of rustc output. Installation cargo install cargo-firstpage Usage Prefix the cargo command by firstpage: T

Cecile Tonglet 11 Dec 19, 2021
use variant nesting information to flter overlapping sites from vg deconstruct output

vcfbub popping bubbles in vg deconstruct VCFs overview The VCF output produced by a command like vg deconstruct -e -a -H '#' ... includes information

null 11 Dec 28, 2022