Text transformations.
I converted a pdf to txt in order to feed it to a text-to-speech program in order to generate an audiobook.
# remove - at the end of a line and join lines
-\n
""
# join lines
(\w)\n(\w)
\1 \2
(,)\n(\w)
\1 \2
-\n
""
# join lines
(\w)\n(\w)
\1 \2
(,)\n(\w)
\1 \2
# Note that here I am looking for lowercase on the second letter
(\w)\n\n([a-z])
\1 \2
(\w)\n\n\n([a-z])
\1 \2
", {2,9}\n"
", "
" {2,9}\n"
" "
\1 \2
(\w)\n\n\n([a-z])
\1 \2
", {2,9}\n"
", "
" {2,9}\n"
" "
0 Comments:
Post a Comment
<< Home