Regex Autosuggest question
Thread poster: Wojciech_

Wojciech_
Poland
Local time: 20:14
English to Polish
+ ...
Aug 21, 2015

Does anybody here know what regex code will be able to produce autosuggestion for proper nouns not only for single words (e.g. first names), but also longer proper nouns that consist of 2-5 capitalized words?
For example I would like the Regex Autosuggest to provide me with "International Air Transport Association" in one suggestion instead of proposing four single ones.
Is it possible?


 

SDL Community  Identity Verified
United Kingdom
Local time: 20:14
English
Why not use AutoCorrect? Aug 21, 2015

Then you can set, for example "IATA" to expand to the whole thing as you wish? Using a regex for this would be tricky for many reasons associated with it probably suggesting many incorrect phrases. I suppose you could use look for the full phrase in the source and have it provide what you want, but then you'd need to create expressions for everything... AutoCorrect would be easier I think.

Maybe worth a go anyway...

Regards

Paul
SDL Community Support


 

SDL Community  Identity Verified
United Kingdom
Local time: 20:14
English
But if you really want to... Aug 21, 2015

... you could try something like this as a generic expression:

([A-Z][a-z]*\s?){1,4}

I'm not sure how well this will work in practice, but maybe worth a shot as a starter for tenicon_wink.gif

Regards

Paul
SDL Community Support


 

Wojciech_
Poland
Local time: 20:14
English to Polish
+ ...
TOPIC STARTER
Thanks! Aug 21, 2015

It works as a charm!
And is it possible to copy with regex such numbers as e.g. 1,845 or decimals e.g. 1.8?
Or perhaps use regex to replace 1,845 into 1845 and 1.8 into 1,8 and vice versa?


 

FarkasAndras
Local time: 20:14
English to Hungarian
+ ...
Hold on Aug 21, 2015

Wait, there is regex capability in autosuggest? I have often wished for that but thought it was not available.
Now, having seen this thread, I googled it, and it appears that there is a plugin for Studio 2014 that has this capability: http://www.translationzone.com/openexchange/app/regexmatchautosuggestprovider-689.html
I have 2011, so it's of no use to me right now, but it's good to know.

However, neither of you mention versions or the plugin so... is there any Studio version with built-in regex autosuggest?


 

SDL Community  Identity Verified
United Kingdom
Local time: 20:14
English
Of course... Aug 22, 2015

pro-lingua wrote:

It works as a charm!
And is it possible to copy with regex such numbers as e.g. 1,845 or decimals e.g. 1.8?
Or perhaps use regex to replace 1,845 into 1845 and 1.8 into 1,8 and vice versa?


... it's just a question of knowing exactly the extent of your requirement. For example to achieve these:

to replace 1,845 into 1845 and 1.8 into 1,8

You could search for these two separate expressions:

(\d),(\d{3})
(\d)\.(\d)

and replace with these accordingly:

$1$2
$1,$2

You could create single complex expressions to catch them all, but the beauty of this app is that you can quite easily create many and deselect/select as needed to suit the document and text you're working on.

Regards

Paul
SDL Community Support


 

SDL Community  Identity Verified
United Kingdom
Local time: 20:14
English
Only an app... Aug 22, 2015

FarkasAndras wrote:

Wait, there is regex capability in autosuggest? I have often wished for that but thought it was not available.
Now, having seen this thread, I googled it, and it appears that there is a plugin for Studio 2014 that has this capability: http://www.translationzone.com/openexchange/app/regexmatchautosuggestprovider-689.html
I have 2011, so it's of no use to me right now, but it's good to know.

However, neither of you mention versions or the plugin so... is there any Studio version with built-in regex autosuggest?


... and this is for Studio 2014 onwards. It uses the integration api which is only available from 2014 onwards. I wrote an article at the beginning of the year on the capabilities of autosuggest:

http://multifarious.filkin.com/2015/01/01/autosuggest/

But I think it could use an update since 2015 as this introduces some very powerful capability using your live TM.

Regards

Paul
SDL Community Support


 

Henning Holthusen  Identity Verified
Philippines
Local time: 02:14
English to German
+ ...
EUR 15 million > 15 Mio. Euro Aug 28, 2015

How would you do a replacement: EUR XX million > XX Mio. Euro

?


 

Emma Goldsmith  Identity Verified
Spain
Local time: 20:14
Member (2010)
Spanish to English
Matching EUR XX million with Regex Aug 28, 2015

Henning Holthusen wrote:

How would you do a replacement: EUR XX million > XX Mio. Euro

?


Try:
EUR\s(\d+)\smillion

and for the replace pattern:
$1 Mio. Euro

Of course, you'd have to start typing the number itself to get the suggestion with Regex Autosuggest.


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Regex Autosuggest question

Advanced search







SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running, helps experienced users make the most of the powerful features, ensures new

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search