Regex Autosuggest question
Thread poster: Wojciech_

Wojciech_
Poland
Local time: 11:03
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: 11:03
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: 11:03
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 ten

Regards

Paul
SDL Community Support


Direct link Reply with quote
 

Wojciech_
Poland
Local time: 11:03
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: 11:03
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: 11:03
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: 11:03
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: 18:03
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: 11:03
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







SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



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