Rust Library

Download whatfreewords-rust.tar.gz.

Usage

use whatfreewords::{Coordinates, lat_lon_2_words, lat_lon_2_words_arr, words_2_lat_lon, words_2_lat_lon_arr};

let coord = Coordinates { lat: 37.234332 lon: -115.806663 };
let word = "joyful.nail.harmonica";

let coords = vec![
    Coordinates { lat: -13.133897, lon: 27.849332 },
    Coordinates { lat: -19.015438, lon: 29.154857 };
];

let words = vec![
    "sculptures.diary.unbelieving",
    "joyful.nail.harmonica",
]

// transform single values
let word_result = lat_lon_2_words(coord).unwrap();
let coord_result = words_2_lon_lat(word).unwrap();
// transform multiple values
let words_result = lat_lon_2_words_arr(&coords).unwrap();
let coords_result = words_2_lat_lon_arr(&words).unwrap();

See the README file in the distribution for more details.

Development

Download whatfreewords-rust.tar.gz and extract it.

The algorithm is all in source/WFW-0.6.0/src/lib.rs.

The library is published under the Creative Commons CC0 license.

Acknowledgment

Thanks to an anonymous contributor for providing the Rust library.