initial commit

parents
/target
**/*.rs.bk
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "csv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "csv-core"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "itoa"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "matter-parser"
version = "0.1.0"
dependencies = [
"csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "memchr"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ryu"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "1.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum csv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9044e25afb0924b5a5fc5511689b0918629e85d68ea591e5e87fbf1e85ea1b3b"
"checksum csv-core 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa5cdef62f37e6ffe7d1f07a381bc0db32b7a3ff1cac0de56cb0d81e71f53d65"
"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
"checksum libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "42914d39aad277d9e176efbdad68acb1d5443ab65afe0e0e4f0d49352a950880"
"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f"
"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd"
[package]
name = "matter-parser"
version = "0.1.0"
authors = ["Phuntsok Drak-pa <phundrak@phundrak.fr>"]
edition = "2018"
[dependencies]
csv = "1"
bern,n
calfér,n
cat,n
cycvénd,n
dur,n
dyr,n
fician,n
fogel,n
gelty,n
hryþ,n
hynd,n
héþir,n
héþtyr,n
orn,n
ulv,n
wyrm,n
ylgar,n
éþƿér,n
ċuðar,n
den,n
freði,n
lyþt,n
þéga,n
ƿen,adj
boccé,n
breif,n
ryn,n
þteinér,n
céveð,n
myþic,n
iurd,n
iurþtiern,n
gymmur,n
mény,n
þtiern,n
þynna,n
gæt,n
urby,n
bér,n
hyþ,n
tere,n
marcéð,n
fri,adj
armér,n
bac,n
fingér,n
hond,n
hérðér,n
lycam,n
néf,n
ræð,adj
lyn,n
meccil,adj
þmoð,adj
þtor,adj
mænd,adj
vend,adj
vinþtri,adj
hégri,adj
eldyr,n
hyr,n
eldyr,n
lycce,adj
ƿille,n
ru,n
ċild,n
þtikyl,n
ċlið,n
hultar,n
cyng,n
cyngyt,n
faðcyng,n
faðcyngyt,n
iéral,n
landyt,n
ðengil,n
annéð,adj
béta,adv
eða,adv
ja,adv
jæ,adv
licca,adv
méllém,adv
na,adv
neiċ,adv
næ,adv
ov,adv
velgi,adv
þiv,conj
þém,inter
a,art.def.sg.n
é,art.def.sg.m
al,art.def.sg.f
en,art.def.sg.nhum
od,art.def.pau.n.m.f
yt,art.def.pau.nhum
eþ,art.def.pl.nhum
ev,art.def.pl.nhum
an,art.dem.sg.near
at,art.dem.pau.near
að,art.dem.pl.near
em,art.dem.sg
ed,art.dem.pau
eð,art.dem.pl
un,art.dem.sg.far
ut,art.dem.pau.far
uð,art.dem.pl.far
fe,pron.q.nom
fent,pron.q.acc
feþ,pron.q.dat
feċ,pron.q.loc
fec,pron.q.abl
fém,pron.q.limit
fon,pron.q.gen
feren,pron.q.goal
ferve,pron.q.motivation
fervid,pron.q.choice
ferden,pron.q.instr
fertið,pron.q.loc.temp
fertiðoċ,pron.q.abl.temp
fertiðac,pron.q.limit.temp
ar,conj
að,conj
ella,conj
men,conj
némmé,conj
og,conj
æn,conj
ér,conj
ðea,conj
tél,prep
þiv,prep
ċeg,pron.1sg.nom
ċent,pron.1sg.acc
ċeið,pron.1sg.dat
ċyn,pron.1sg.gen
þi,pron.1pau.nom
þid,pron.1pau.acc
þið,pron.1pau.dat
þyn,pron.1pau.gen
non,pron.1pl.nom
nound,pron.1pl.acc
nonþ,pron.1pl.dat
nun,pron.1pl.gen
du,pron.2sg.nom
daun,pron.2sg.acc
duð,pron.2sg.dat
dyn,pron.2sg.gen
udy,pron.2sg.voc
im,pron.2pau.nom
eint,pron.2pau.acc
ði,pron.2pau.dat
nim,pron.2pau.gen
eny,pron.2pau.voc
min,pron.2pl.nom
meint,pron.2pl.acc
minþ,pron.2pl.dat
meun,pron.2pl.gen
miny,pron.2pl.voc
hé,pron.3sg.n.nom
hét,pron.3sg.n.acc
heþ,pron.3sg.n.dat
hén,pron.3sg.n.gen
yhé,pron.3sg.n.voc
hae,pron.3sg.m.nom
haed,pron.3sg.m.acc
haeð,pron.3sg.m.dat
haen,pron.3sg.m.gen
yhae,pron.3sg.m.voc
hou,pron.3sg.f.nom
hound,pron.3sg.f.acc
huð,pron.3sg.f.dat
houn,pron.3sg.f.gen
yhou,pron.3sg.f.voc
hit,pron.3sg.n.nom
hint,pron.3sg.n.acc
hiþ,pron.3sg.n.dat
him,pron.3sg.n.gen
yhi,pron.3sg.n.voc
hei,pron.3pau.n.nom
heit,pron.3pau.n.acc
heiþ,pron.3pau.n.dat
hein,pron.3pau.n.gen
yhei,pron.3pau.n.voc
þa,pron.3pau.m.nom
þad,pron.3pau.m.acc
þaið,pron.3pau.m.dat
þan,pron.3pau.m.gen
yþa,pron.3pau.m.voc
þu,pron.3pau.f.nom
þunt,pron.3pau.f.acc
þou,pron.3pau.f.dat
þun,pron.3pau.f.gen
yþu,pron.3pau.f.voc
hou,pron.3pau.n.nom
hot,pron.3pau.n.acc
hoþ,pron.3pau.n.dat
ðo,pron.3pau.n.gen
yðou,pron.3pau.n.voc
hea,pron.3pl.n.nom
hint,pron.3pl.n.acc
heaþ,pron.3pl.n.dat
heam,pron.3pl.n.gen
heaþy,pron.3pl.n.voc
þa,pron.3pl.m.nom
þat,pron.3pl.m.acc
þaið,pron.3pl.m.dat
þan,pron.3pl.m.gen
þaiðy,pron.3pl.m.voc
þu,pron.3pl.f.nom
þunt,pron.3pl.f.acc
þou,pron.3pl.f.dat
þun,pron.3pl.f.gen
yþu,pron.3pl.f.voc
hou,pron.3pl.n.nom
hout,pron.3pl.n.acc
houþ,pron.3pl.n.dat
ðo,pron.3pl.n.gen
houþy,pron.3pl.n.voc
iara,n
retty,n
Hyrfialþær,np
Ðeberget,np
deccar,adj
leiþ,n
leiþér,adj
myrcér,n
frihyt,n
léc,adj
þoc,n
canal,n
þcort,adj
berg,n
ealant,n
fial,n
hyrfial,n
lant,n
logar,n
pyl,n
þær,n
træ,n
þær,n
al,ad
norm,n
nyn,nbr
æn,nbr
tƿéa,nbr
ðe,nbr
fro,nbr
ðeif,nbr
ċcæc,nbr
þean,nbr
aċt,nbr
onnén,nbr
dran,nbr
tieg,nbr
ðiea,nbr
frie,nbr
ðeig,nbr
ċciag,nbr
þieg,nbr
aċteig,nbr
onneg,nbr
anrad,nbr
tanþen,nbr
deten,nbr
mollen,nbr
vrelien,nbr
ƿaċen,n
feioð,n
meþ,n
yld,n
bruðyr,n
dottyr,n
faðmoð,n
faðér,n
fobror,n
foþtyr,n
maþtyr,n
moðér,n
mæbror,n
þon,n
þyþter,n
nam,n
ryd,n
Alfén,n
Deccalfén,n
Leþþalfén,n
éccċi,on
Fréyia,n
Fréyr,n
Odin,n
Valalla,n
bæn,n
Þor,n
guð,n
guþ,n
bevit,adj
bevityt,n
þyn,n
areð,n
dyrc,n
gilðar,n
gilðaryt,n
félag,n
ie,adv
iea,adv
ne,adv
nea,adv
altið,adv
dæg,n
menyþ,n
morg,adv
neþty,adj
nu,adv
tið,n
voc,n
þcyrm,n
galm,adj
gyrneg,n
gærn,n
hauþtér,n
vér,n
vétter,n
þymmér,n
cirþabér,n
eppel,n
bryð,n
bryðdeg,n
ein,adj
gemmel,adj
lyf,n
lyvér,adj
ævi,n
mein,n
meinƿaċ,n
fici,vt
gyi,vi
den,vi
léþ,vt
ritt,vt
gér,vt
mérc,vt
þtein,vt
þong,vi
flytt,vi
þæll,vt
geff,vt
caup,vt
ƿili,vt
ċild,vi
verd,vt
lætt,vi
comm,vi
liegg,vi
rinn,vi
g,vi
et,vt
þpiċ,vt
faðmoð,vi
faðérr,vi
moðérr,vi
þeg,vt
tynn,vt
þett,vt
cyn,vt
vitt,vt
þie,vt
lit,vt
þyn,vt
heill,vt
tebyr,vt
hauþtér,vt
vérr,vt
vétter,vi
þymmér,vt
bƿ,vi
extern crate csv;
use std::collections::HashMap;
use std::error::Error;
use std::fs;
fn import_morphemes() -> Result<HashMap<String, String>, Box<Error>> {
let contents = fs::read_to_string("matter-dict.csv")
.expect("Something went wrong reading the file");
let mut rdr = csv::ReaderBuilder::new()
.delimiter(b',')
.from_reader(contents.as_bytes());
let mut morphemes_collection = HashMap::new();
for result in rdr.records() {
let record = result?;
morphemes_collection.insert(
String::from(record.get(0).unwrap()),
String::from(record.get(1).unwrap()),
);
}
Ok(morphemes_collection)
}
fn main() {
let morphemes = import_morphemes().unwrap();
for morph in morphemes {
println!("{:?}", morph);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment