cleasby_vigfusson_dictionary

Crates.iocleasby_vigfusson_dictionary
lib.rscleasby_vigfusson_dictionary
version1.1.0
sourcesrc
created_at2021-09-26 14:39:26.137706
updated_at2022-11-05 14:27:25.421381
descriptionThe Cleasby/Vigfusson Old Norse to English Dictionary for Rust
homepage
repositoryhttps://github.com/stscoundrel/cleasby-vigfusson-dictionary-rs
max_upload_size
id456561
size23,298,282
Sampo Silvennoinen (stscoundrel)

documentation

README

Cleasby & Vigfusson Dictionary

The Cleasby & Vigfusson Old Norse to English Dictionary for Rust. The dictionary consists of 35 000+ Old Norse words with English translations.

Based on the classic dictionary by Richard Cleasby and Gudbrand Vigfusson. Also available for Node.js

Install

cargo add cleasby_vigfusson_dictionary

Or add this to your Cargo.toml:

[dependencies]
cleasby-vigfusson-dictionary = "1.1.0"

Usage

Dictionary comes in two variants: one with html markup, and one without.

// Ships two variants, plus DictionaryEntry.
use cleasby_vigfusson_dictionary::{get_dictionary, get_no_markup_dictionary, DictionaryEntry};

// Standard dictionary. Contains "strong" and "i" tags to match the printed book.
let dictionary = get_dictionary();

// No-markup version. Contains no tags or additional markup.
let no_markup_dictionary = get_no_markup_dictionary();

// Both methods return Result, which should always be safe to unwrap.
// Up to you if you wish to just unwrap, or use other error handling method.
let dictionary_content: Vec<DictionaryEntry> = dictionary.unwrap();
let no_markup_dictionary_content: Vec<DictionaryEntry> = no_markup_dictionary.unwrap();

println!("A word from dictionary: {}. First definition for it is: {}", &dictionary_content[0].word, &dictionary_content[0].definitions[0])

About Cleasby & Vigfusson Dictionary

"Icelandic-English" dictionary was started by Richard Cleasby and finished by Gudbrand Vigfusson. It was published in 1874, which leads to there being many public domain versions of the book available.

Commit count: 35

cargo fmt