-
Notifications
You must be signed in to change notification settings - Fork 0
/
generatepronoun.jl
47 lines (36 loc) · 1.06 KB
/
generatepronoun.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""Generate a form for a given pronoun stem and rule by combining
stem and ending, then adding appropriate accent for this lexical
item in this form, and finally stripping off metadata characters
marking vowel quantity and morpheme boundaries.
$(SIGNATURES)
"""
function generate(
stem::PronounStem,
rule::PronounRule;
ortho::GreekOrthography = literaryGreek())
raw = stemstring(stem) * ending(rule)
stripmetachars(raw) |> knormal
end
"""Generate list of codes for all pronoun forms.
$(SIGNATURES)
"""
function pronounformcodes()
genderints = keys(genderlabeldict) |> collect |> sort
caseints = keys(caselabeldict) |> collect |> sort
numints = keys(numberlabeldict) |> collect |> sort
formlist = []
for n in numints
for g in genderints
for c in caseints
push!(formlist, "$(PRONOUN)0$(n)000$(g)$(c)00")
end
end
end
formlist
end
"""Generate list of all possible prnoun forms.
$(SIGNATURES)
"""
function pronounforms()
pronounformcodes() .|> gmfPronoun
end