Skip to content

Commit

Permalink
Allow quotations before and after sentence separation marker
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Aug 2, 2023
1 parent 5492407 commit 1f0da96
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ object SwordContentFacade {


// Avoid possible bible references when separating sentences.
private val splitMatch = Regex("""((\D\s+|^)[\w'"’”]+[.,!?]\s+)(\D)""")
private val splitMatch = Regex("""((\D\s+|^)\w+['"’”]?[.,!?]['"’”]?\s+)(\D)""")
fun splitSentences(text: String): List<String> {
val matches = splitMatch.findAll(text)
val pieces = mutableListOf<String>()
Expand Down

0 comments on commit 1f0da96

Please sign in to comment.