2 个稳定版本
1.1.0 | 2022 年 11 月 5 日 |
---|---|
1.0.0 | 2021 年 9 月 28 日 |
#1375 in 文本处理
2MB
70 行
古冰岛语 Zoega
为 Rust 编写的古冰岛语词典。来自 Geir Zoëga 的《古冰岛语简明词典》。
词典包含 29,000 多个古冰岛语单词及其英文翻译。也适用于 Node.js
安装
cargo添加 old_icelandic_zoega
或将其添加到您的 Cargo.toml
[dependencies]
old_icelandic_zoega = "1.1.0"
用法
词典有两种版本:一种包含 HTML 标记,另一种不包含。
// Ships two variants, plus DictionaryEntry.
use old_icelandic_zoega::{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])
关于“古冰岛语简明词典”
“古冰岛语简明词典”由 Geir Zoëga 于 1910 年出版,导致该书的公共领域版本很多。Zoëga 的目的是创建一个更易于接近的版本,即 Cleasby - Vigfusson 词典的更完整版本,特别适合初学者和对古冰岛语散文写作感兴趣的人。