Start a new topic

Correct auto-assembling of brand names, reg trademarks, chemical formulas

Correct auto-assembling of brand names, reg trademarks, product names, chemical formulas with super- or subscript additions, like:

  • Bauer^TM
  • PressureVair
  • COV2
(where ^ and V represent super- and subscript) can be achieved by using hidden non-translatables!!!

For instance, when you have ImageAnalyser^CA^ in your text, you can add these two entries to your non-translatables glossary to have product name auto-assembled correctly:

 

!|ImageAnalyser^
!|\bCA\b^

 (Note that ^ here represent the ^ character!)


This is truly amazing and a great time saver.


Demo:

image


Becomes:

image


Advantages:

  • Less tags
  • Correct automatic assembling
Disadvantage:
  • Reduced readability
The non-translatables glossary contains these entries:

 

!|\bCA\b^
!|\bNO\b^
!|\bx\b^
!|\b2\b^

 Note that you can omit the vertical bar if you set the glossary to regular expressions only.

>Reduced readability


This can be solved by instructing CafeTran Espresso to display the long forms of hidden non-translatables.

Or:

image

Becomes:

image


I have found that \b2\b is not optimal. I'll try to find a class that represents a word boundary here exactly as  I want it to be. E.g. now a value as '1,2 bar' is represented as '1,tag bar'.

I think that this is a nice (partial) solution:

 

!|(\b2\b)(?!\s)^

 Meaning: a '2', that must be a word (= between tags), but is not followed by a space.


So, in the sentence:

 

This must be done within 2 seconds after ignition.

 The '2' is not matched, whereas it is matched in the examples above :).



These expressions:

 

!|\bNO\b^
!|\bSO\b^
!|(\bO\b)(?!(\s|\-))^
!|\bx\b^
!|(\b2\b)(?!\s)^

 Match: NOx, NO2, SO2 - with all subscript representing tags - but not O-ring or the standalone number '2'.


Well, isn't that nice?

Login to post a comment