Regex Autosuggest question
Thread poster: Wojciech_

Wojciech_
Poland
Local time: 00:49
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?


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 00:49
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


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 00:49
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


Direct link Reply with quote
 

Wojciech_
Poland
Local time: 00:49
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?


Direct link Reply with quote
 

FarkasAndras
Local time: 00:49
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?


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 00:49
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


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 00:49
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


Direct link Reply with quote
 

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

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

?


Direct link Reply with quote
 

Emma Goldsmith  Identity Verified
Spain
Local time: 00:49
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.


Direct link Reply with quote
 


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







BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

More info »
memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »



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