Reply to post

Sentence boundaries

Author
gauss256
User
  • Total Posts : 0
  • Reward points: 0
  • Joined: 2016/08/03 01:04:14
  • Status: offline
2016/08/03 14:28:39 (permalink)

Sentence boundaries

I just discovered the wonderful RegEx feature in Edit Speech. However I am not able to make it do exactly what I want because of the way sentences are parsed. I would like references to be skipped, as in this example:
Original: "... including translation (Luong et al. 2015b), sentiment analysis ..."
Replacement: "... including translation, sentiment analysis ..."
It is straightforward to write a RegEx to do this, but it doesn't work because the period at the end of "et al." is treated as the end of a sentence. So the example above gets broken into two sentences, and the RegEx fails:
Sentence 1: "... including translation (Luong et al."
Sentence 2: "2015b), sentiment analysis ..."
Is there any way to control the way sentences are detected (e.g. a list of known abbreviations)? Or is there a way to have a RegEx span two sentences? Other suggestions?

2 Replies Related Threads

    Admin
    Administrator
    • Total Posts : 275
    • Reward points: 0
    • Joined: 2010/11/22 00:00:00
    • Location: USA
    • Status: offline
    Re: Sentence boundaries 2016/08/03 14:53:33 (permalink)
    You could add:
     
    al.
     
    to the list of abbreviations @Voice knows about. Then the sentence will not end at "al." and your replacement should work. Here is how to do this:
     
    Use e.g. the ES File Explorer app, set it to show also hidden files and folders. With this app, navigate to the Hyperionics/atVoice/.config folder on your main storage (or if you changed the default location of @Voice files, navigate appropriately. Then create a text file named abbrev-eng.txt in .config directory, and enter there a single line:
     
    al.
     
    Remember the dot. You may also add there more abbreviations, one per line, although @Voice already knows a lot of them.
     
    Greg
    gauss256
    User
    • Total Posts : 0
    • Reward points: 0
    • Joined: 2016/08/03 01:04:14
    • Status: offline
    Re: Sentence boundaries 2016/08/03 15:14:28 (permalink)
    Works perfectly, thanks!
    Jump to:
    © 2024 APG vNext Commercial Version 5.1