Regex to find "a" where "an" should have been used Autor vlákna: John Fossey
| John Fossey Kanada Local time: 15:10 Člen (2008) francouzština -> angličtina + ...
I'm looking for a regex command that will find instances where the word "a" has been mistakenly used where "an" should have been used. This happens when the word "a" is followed by a word that starts with a vowel, and sometimes with an "h" or with an acronym that starts with a letter that is pronounced like a vowel, such as an F, H, L, M, N, R, S, X. This would really help with proofreading a long technical document. | | | Not all vowels | Aug 31, 2023 |
And not words beginning with a vowel if the beginning is not pronounced like a vowel (Europe, uranium, US …). Complicated. Have you thought of letting Bard or ChatGPT identify such occurrences? They might be good at this type of task if you define it well.
[Edited at 2023-08-31 14:50 GMT] | | | Dan Lucas Velká Británie Local time: 20:10 Člen (2014) japonština -> angličtina What flavour? | Aug 31, 2023 |
John Fossey wrote: I'm looking for a regex command that will find instances where the word "a" has been mistakenly used where "an" should have been used. This happens when the word "a" is followed by a word that starts with a vowel, and sometimes with an "h" or with an acronym that starts with a letter that is pronounced like a vowel, such as an F, H, L, M, N, R, S, X. In what application will you be using this? Regex flavours vary considerably. As a rough first pass, something like: a [a|e|i|o|u] ...should capture "a" followed a vowel. The acronym issue would need a bit more thought. Dan | | | John Fossey Kanada Local time: 15:10 Člen (2008) francouzština -> angličtina + ... AUTOR TÉMATU ChatGPT having a bad day | Aug 31, 2023 |
Thomas T. Frost wrote: Have you thought of letting Bard or ChatGPT identify such occurrences? They might be good at this type of task if you define it well. ChatGPT seems to be having a bad day. When I asked it (is that the right pronoun?) it just responds "something went wrong"...
[Edited at 2023-08-31 14:48 GMT] | |
|
|
John Fossey Kanada Local time: 15:10 Člen (2008) francouzština -> angličtina + ... AUTOR TÉMATU
Dan Lucas wrote: In what application will you be using this? Regex flavours vary considerably. As a rough first pass, something like: a [a|e|i|o|u] ...should capture "a" followed a vowel. The acronym issue would need a bit more thought. Dan | | |
ChatGPT is having a bad day indeed. I tried Bard, but it gets it wrong. I don't think regex is going to be of much use because both vowels and consonants can require 'a' or 'an' depending on pronunciation. Consider testing things like the following when ChatGPT wakes up: 'A European card. A uranium mine. A US citizen. An MS Office application. An evil person. A Microsoft application.' | | | Dan Lucas Velká Británie Local time: 20:10 Člen (2014) japonština -> angličtina Dot NET then | Aug 31, 2023 |
MemoQ is .NET, so should be fine. This for catching "a" followed by a vowel. a [a|e|i|o|u] And this for "a" followed by an acronym containing at least two capital letters a (?:[A-Z][a-z]*){2,} My testing has been minimal! These won't catch all cases, but they should get you fairly close. It's a question of the trade-off between time invested in creating the regex and the time saved by using the regex. The perfect is the enemy of t... See more MemoQ is .NET, so should be fine. This for catching "a" followed by a vowel. a [a|e|i|o|u] And this for "a" followed by an acronym containing at least two capital letters a (?:[A-Z][a-z]*){2,} My testing has been minimal! These won't catch all cases, but they should get you fairly close. It's a question of the trade-off between time invested in creating the regex and the time saved by using the regex. The perfect is the enemy of the good. Dan ▲ Collapse | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Regex to find "a" where "an" should have been used Trados Studio 2022 Freelance | The leading translation software used by over 270,000 translators.
Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop
and cloud solution, empowering you to work in the most efficient and cost-effective way.
More info » |
| TM-Town | Manage your TMs and Terms ... and boost your translation business
Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |