Accentuated abjad English (ōcćnt̮ōt̖d ōbj̄d óngḷsh)
GNU sed, 168 158 134 105 98 85 byt̖s
ǒr 75 ch̠rs (b̭th ȯncl̮ḍng +1 f̭r th̖ -r
fl̠g).
s/([bdfhklt])([aeiou])/\1\u\2/g;y/aeiouAEIOU/̠̖̣̭̮̄́̇̌̑/;s/\B[^ ,a-z]/o&/g
óxpl̠n̄ṭǒn
Wó s̄v́ ō ḅt ȏṡng th̖ čnstr̄ȯnt th̠t ȯnp̑t ȯs ōll ḽẃr-c̄ś. Wó ȏpc̄ś ōny v̌ẃl f̭lḽẇng ō čnšn̄nt, b̖f̭ŕ čnv́rṭng ōll v̌ẃls ṱ ōcćnts.
#!/bin/sed -rf
s/([bdfhklt])([aeiou])/\1\u\2/g # upcase vowel following ascender
y/aeiouAEIOU/̠̖̣̭̮̄́̇̌̑/
s/\B[^ ,a-z]/o&/g # precede with 'o' if needed
Th̖ ǒdd-ḽǒḳng ch̠r̄ct̖rs ōŕ //
čnt̠ȯṅng ōll t̖n ōcćnts (/̠̖̣̭̮̄́̇̌̑/
). óxp̄nd̖d ǒȏt ẇth sp̄ćs, th̖y w̌ȏld ḽǒk ḷk̖ / ̄ ́ ̇ ̌ ̑ ̠ ̖ ̣ ̭ ̮ /
.
ǒȏtp̑t
přgr̄mṁng p̑zzl̖s ōnd čd̖ ǧlf th̖ q̑ȯck břwn f̭x j̑mps ǒv́r th̖ l̠zy ḓg b̖ōȏṭf̮l ǒń ṙng ṱ ȓl̖ th̖m ōll, ǒń ṙng ṱ f̣nd th̖m, ǒń ṙng ṱ bṙng th̖m ōll ōnd ȯn th̖ d̠rkńss ḅnd th̖m
CJam, 63 62 bytes
Qq{_"aeiou"#:I){;___eu='o*\"bdfhklt"&"F<IST""*'-27"?I=730+}&}/
Try it online in the CJam interpreter.
How it works
Qq e# Push an empty string and read from STDIN.
{ e# For each character in the input:
e# Push a copy of the character.
"aeiou"# e# Find its index in "aeiou" (-1 for not found).
:I) e# Save in I and add 1.
{ e# If I + 1 != 0:
; e# Discard the character.
___ e# Copy the previous character (or the empty array) three times.
eu= e# Convert the last copy to uppercase and check for equality.
e# This pushes 1 for non-letters and 0 for letters.
'o* e# Push a string of that many o's.
\ e# Swap the last copy with the string of o's.
"bdfhklt"& e# Intersect with that string.
"F<IST" e# Push that string.
"*'-27" e# Push that string.
? e# Select the first iff the intersection is non-empty.
I= e# Retrieve the character at index I.
730+ e# Add 730 to its code point.
}& e#
}/ e#
Julia, 269 bytes
This is really long and can probably be golfed further, but I'm just psyched that I was able to come up with a working solution at all!
s->(u=700+[72,69,75,80,85];l=800+[0,-10,3,13,14];R=replace;r(m)=(i=findin("aeiou",m[2])[1];j=m[1]∈"bdfhklt"?l[i]:u[i];string(m[1],char(j)));t(m)=string("o",char(u[findin("aeiou",m)[1]]));R(R(R(s,r"(?![eiou])[b-z][aeiou]",r),r"(?<=^| )[aeiou]",t),r"(?<=\S)[aeiou]",r))
This creates an unnamed function that accepts a string and returns a string.
Ungolfed + explanation:
function f(s)
# Construct arrays of integers representing the unicode accents
# u is for the upper accents and l is for the lower
u = 700 + [72,69,75,80,85]
l = 800 + [0,-10,3,13,14]
# Define a function to accent consonants followed by vowels
r(m) = begin
# m is the consonant-vowel pair from the regex match
i = findin("aeiou", m[2])[1]
j = m[1] ∈ "bdfhklt" ? l[i] : u[i]
string(m[1], char(j))
end
# Define a function to accent vowels
t(m) = string("o", char(u[findin("aeiou", m)[1]]))
# Accent consonants
rep1 = replace(s, r"(?![eiou])[b-z][aeiou]", r)
# Accent vowels at the start of a string or before a space
rep2 = replace(rep1, r"(?<=^| )[aeiou]", t)
# Accent remaining unaccented vowels
rep3 = replace(rep2, r"(?<=\S)[aeiou]", t)
# Return
rep3
end
Examples:
julia> println(f("beautiful"))
b̖ōȏṭf̮l
julia> println(f("programming puzzles and code golf"))
přgr̄mṁng p̑zzl̖s ōnd čd̖ ǧlf
Note that if you look at the raw text in the post, the "t" in the first example is accented correctly but for some reason it doesn't display that way in the rendered markdown, at least for me.