Skip to content

Commit

Permalink
Merge pull request #189 from neelsmith/dev
Browse files Browse the repository at this point in the history
Fixes a bug in word accenting
  • Loading branch information
neelsmith authored Aug 18, 2023
2 parents b6ff652 + ebabb42 commit 27a8ae3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PolytonicGreek"
uuid = "72b824a7-2b4a-40fa-944c-ac4f345dc63a"
authors = ["Neel Smith <dnsmith.neel@gmail.com>"]
version = "0.21"
version = "0.21.1"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand Down
6 changes: 3 additions & 3 deletions src/litgreek/lgaccentuate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ $(SIGNATURES)
function accentultima(wrd::AbstractString, accent::Symbol, ortho::LiteraryGreekOrthography = literaryGreek())
sylls = syllabify(wrd, ortho)
sylls[end] = accentsyllable(ultima(wrd, ortho), accent)
join(sylls,"")
strcat(ortho, sylls...)
end

"""Place accent on penult.
Expand All @@ -180,7 +180,7 @@ function accentpenult(wrd::AbstractString, accent::Symbol, ortho::LiteraryGreekO
else
sylls[end - 1] = accentsyllable(penult(wrd, ortho), accent)
@debug("This is sylls: $(sylls)")
join(sylls,"")
strcat(ortho, sylls...)
end
end

Expand All @@ -195,7 +195,7 @@ function accentantepenult(wrd::AbstractString, ortho::LiteraryGreekOrthography)
nothing
else
sylls[end - 2] = accentsyllable(antepenult(wrd, ortho), :ACUTE)
join(sylls,"")
strcat(ortho, sylls...)
end
end

Expand Down
6 changes: 6 additions & 0 deletions test/test_accentuation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,10 @@ end
@testset "Test recognizing non-final οι/αι as long" begin
lg = literaryGreek()
@test PolytonicGreek.finallong("οις", lg)
end


@testset "Test word accenting" begin
lg = literaryGreek()
accentword("ἐν#κελευω", :RECESSIVE, lg)
end

0 comments on commit 27a8ae3

Please sign in to comment.