Word transposition apps Thread poster: Dr Sarai Pahla, MBChB
|
I received a rather interesting request from a non-linguist, asking me whether there are any apps available that will change the word order of English sentences (I assume that it should introduce minimal grammatical errors, if that is at all possible). Does such a thing exist? Could anyone point me in the right direction? | | | neilmac Spain Local time: 18:21 Spanish to English + ... Don't know, but | Sep 11, 2013 |
I assume it would be relatively easy to write a program to do this, at least on a basic level. For example, "Internet Anagram Server" (http://www.wordsmith.org/anagram/) rearranges names into several different orders, and I suppose a similar program could be extended to whole sentences. However, what I'd find more intesting would be to know what prompted the query in the first place. | | |
neilmac wrote: However, what I'd find more intesting would be to know what prompted the query in the first place. Thanks for your suggestion! I will pass it on. I will ask about that in more detail tomorrow - the person was in a bit of a hurry today, so I couldn't ask, but I'm also rather curious... | | | Jessica Noyes United States Local time: 12:21 Member Spanish to English + ...
Maybe she is an ESL teacher trying to generate some scrambled sentences for her students to reassemble. | |
|
|
Regular Expressions | Sep 12, 2013 |
[Jessica, you could very well be right] You should be able to do that with regular expressions. I'm an absolute regex beginner (started to study it yesterday), but minutes after reading Sarai's post, I came across the following: Rearranging Name Lists You can use grep patterns to transform a list of names in first name first form to last name first order (for a later sorting, for instance). Assume that the names are in the form: Junior X. Potter ... See more [Jessica, you could very well be right] You should be able to do that with regular expressions. I'm an absolute regex beginner (started to study it yesterday), but minutes after reading Sarai's post, I came across the following: Rearranging Name Lists You can use grep patterns to transform a list of names in first name first form to last name first order (for a later sorting, for instance). Assume that the names are in the form: Junior X. Potter Jill Safai Dylan Schuyler Goode Walter Wang If you use this search pattern: ^(.*) ([^ ]+)$ And this replacement string: \2, \1 The transformed list becomes: Potter, Junior X. Safai, Jill Goode, Dylan Schuyler Wang, Walter* I suppose this could be the starting point of rearranging whole sentences. *Taken from the TextWrangler User Manual. I can upload it if you want. I can't write the regex yet, though. Cheers, Hans ▲ Collapse | | |
- select the sentence - replace all spaces by returns - convert text to table - sort alphabetically - convert table to text - replace all returns by spaces You now have the sentence with the words in alphabetical order (so not a random order, but that doesn't really matter, does it?). I think I can automate that, but only for Mac. Shouldn't be difficult for Windows (a bunch of macros, I suppose?). Cheers, Hans (still thin... See more - select the sentence - replace all spaces by returns - convert text to table - sort alphabetically - convert table to text - replace all returns by spaces You now have the sentence with the words in alphabetical order (so not a random order, but that doesn't really matter, does it?). I think I can automate that, but only for Mac. Shouldn't be difficult for Windows (a bunch of macros, I suppose?). Cheers, Hans (still thinking…) ▲ Collapse | | |
Hi all, Thanks for your responses - I have shared the link to this thread to allow the person who asked me the question to see it, but I haven't yet got a response to the question why they wanted the app in the first place. The person is not an ESL teacher though, but works for a consulting firm... so I really have no idea! RegEx sounds like a pretty good idea in my opinion - thanks Meta Arkadia for that... See more Hi all, Thanks for your responses - I have shared the link to this thread to allow the person who asked me the question to see it, but I haven't yet got a response to the question why they wanted the app in the first place. The person is not an ESL teacher though, but works for a consulting firm... so I really have no idea! RegEx sounds like a pretty good idea in my opinion - thanks Meta Arkadia for that. It's a bit hard to determine how it would work without knowing the source data sets, but hey, I'll wait to hear what they say and keep you guys posted if necessary. ▲ Collapse | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Word transposition apps Protemos translation business management system | Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!
The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.
More info » |
| CafeTran Espresso | You've never met a CAT tool this clever!
Translate faster & easier, using a sophisticated CAT tool built by a translator / developer.
Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools.
Download and start using CafeTran Espresso -- for free
Buy now! » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |