Menu

#1755 More Powerful Search and Replace Filters

future
open
nobody
None
5
2024-07-31
2024-07-28
No

Dear OmegaT-Team,

I highly appreciate your Application and wish to add a Feature-Request, since I am not figuring out, how to do this job without an implemtation:

My job requires to have the same translation of a word over the whole document. If I am working on it for several days, sometime I forgot to keep a (new) vocabulary at a constant level. For that I have to do a review anyway and often it appears that:

SourceWord1
is translated into
TargetWord1 (which is the preferred one) or TargetWord2 or TargetWord 3

Method 1:
I have to figure out, how many TargetWord[i] I got in my document,
-> search for them and
-> replace them.

Method 2:
Search for the the SourceWord1,
-> set a Search-Filter and
-> go through each filtered segment
-> replace the TargetWord2 and TargetWord3 with preferred TargetWord1

I would suggest to either or both:

Add more Filters:
Search-Replace inside a Filter
a) Filter the SourceWord1 in the source segments
b) Do a negative Search (Regex) for the preferred TargetWord1 in the target segments inside the filtered segments, so that just segments stay left over, which DO NOT contain the right translation
c) go through the segments and replace TargetWord2 and TargetWord3 with preferred TargetWord1

Powerful Replace Functionality:
Couple the replacement of a word onto a occurence of a SourceWord1 in the corresponding source segment, to make sure I just get matches, where the word I would like to change is really this specific one, and not misleading from another SourceWord2, which hast nearly the same meaning.
-> Do a Replacement of TargetWord2 or TargetWord3 with TargetWord1 in case there is a SourceWord1 in the corresponding source segment. If not, skip this segment.

I hope my thoughts about that are somehow clear.

Related

Feature Requests: #1755

Discussion

  • Martin Engelke

    Martin Engelke - 2024-07-31

    Edit:
    I tried out a few RegEx:

    This one was the closest I found to be practical:

    (?i)\b(?:srcword).*\b(?:trgtword)[^\s]+

    which is just showing me the the preferred translated segments, if I search for source and target simultaneously.

    If I could just do a negotiation of this Regex, to find all segments, which does not include the right target in case of a certain source, I would be happy for now.

    Maybe you could reach this by a script and RegEx lookarounds (which I will proof next), but that leads me again to a native feature for OmegaT, so that everybody can participate.

     
  • Jean-Christophe Helary

    You could check the issues for your document and include glossary items, based on a glossary list that you make sure contains only specific items.

     
    • Martin Engelke

      Martin Engelke - 2024-07-31

      Hi,

      Thank you for your reply.

      I did so, but especially for new words/wordcreations (patents) it happens regularly, that I am not 100 % sure about which proper word I am going to use in that case.
      In the very end of the document I often have to do a replacement loop, since one of the last paragraphs may reminds me of better rethinking about my decision ^^

      Am 31.07.2024 um 05:13 schrieb Jean-Christophe Helary brandelune@users.sourceforge.net:

      You could check the issues for your document and include glossary items, based on a glossary list that you make sure contains only specific items.

      [feature-requests:#1755] https://sourceforge.net/p/omegat/feature-requests/1755/ More Powerful Search and Replace Filters

      Status: open
      Group: future
      Created: Sun Jul 28, 2024 10:43 AM UTC by Martin Engelke
      Last Updated: Wed Jul 31, 2024 03:24 AM UTC
      Owner: nobody

      Dear OmegaT-Team,

      I highly appreciate your Application and wish to add a Feature-Request, since I am not figuring out, how to do this job without an implemtation:

      My job requires to have the same translation of a word over the whole document. If I am working on it for several days, sometime I forgot to keep a (new) vocabulary at a constant level. For that I have to do a review anyway and often it appears that:

      SourceWord1
      is translated into
      TargetWord1 (which is the preferred one) or TargetWord2 or TargetWord 3

      Method 1:
      I have to figure out, how many TargetWord[i] I got in my document,
      -> search for them and
      -> replace them.

      Method 2:
      Search for the the SourceWord1,
      -> set a Search-Filter and
      -> go through each filtered segment
      -> replace the TargetWord2 and TargetWord3 with preferred TargetWord1

      I would suggest to either or both:

      Add more Filters:
      Search-Replace inside a Filter
      a) Filter the SourceWord1 in the source segments
      b) Do a negative Search (Regex) for the preferred TargetWord1 in the target segments inside the filtered segments, so that just segments stay left over, which DO NOT contain the right translation
      c) go through the segments and replace TargetWord2 and TargetWord3 with preferred TargetWord1

      Powerful Replace Functionality:
      Couple the replacement of a word onto a occurence of a SourceWord1 in the corresponding source segment, to make sure I just get matches, where the word I would like to change is really this specific one, and not misleading from another SourceWord2, which hast nearly the same meaning.
      -> Do a Replacement of TargetWord2 or TargetWord3 with TargetWord1 in case there is a SourceWord1 in the corresponding source segment. If not, skip this segment.

      I hope my thoughts about that are somehow clear.

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/omegat/feature-requests/1755/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #1755

      • Jean-Christophe Helary

        It seems to me that in the current state of affaire, a search/replace within a filter and a negative search are 2 functions that would help a lot and stay in line with the current OmegaT search/filter paradigm.

         
        • Martin Engelke

          Martin Engelke - 2024-07-31

          That sounds fantastic.

          OmegaT made my job as a translator a lot easier.

          Am 31.07.2024 um 05:41 schrieb Jean-Christophe Helary brandelune@users.sourceforge.net:

          It seems to me that in the current state of affaire, a search/replace within a filter and a negative search are 2 functions that would help a lot and stay in line with the current OmegaT search/filter paradigm.

          [feature-requests:#1755] https://sourceforge.net/p/omegat/feature-requests/1755/ More Powerful Search and Replace Filters

          Status: open
          Group: future
          Created: Sun Jul 28, 2024 10:43 AM UTC by Martin Engelke
          Last Updated: Wed Jul 31, 2024 04:13 AM UTC
          Owner: nobody

          Dear OmegaT-Team,

          I highly appreciate your Application and wish to add a Feature-Request, since I am not figuring out, how to do this job without an implemtation:

          My job requires to have the same translation of a word over the whole document. If I am working on it for several days, sometime I forgot to keep a (new) vocabulary at a constant level. For that I have to do a review anyway and often it appears that:

          SourceWord1
          is translated into
          TargetWord1 (which is the preferred one) or TargetWord2 or TargetWord 3

          Method 1:
          I have to figure out, how many TargetWord[i] I got in my document,
          -> search for them and
          -> replace them.

          Method 2:
          Search for the the SourceWord1,
          -> set a Search-Filter and
          -> go through each filtered segment
          -> replace the TargetWord2 and TargetWord3 with preferred TargetWord1

          I would suggest to either or both:

          Add more Filters:
          Search-Replace inside a Filter
          a) Filter the SourceWord1 in the source segments
          b) Do a negative Search (Regex) for the preferred TargetWord1 in the target segments inside the filtered segments, so that just segments stay left over, which DO NOT contain the right translation
          c) go through the segments and replace TargetWord2 and TargetWord3 with preferred TargetWord1

          Powerful Replace Functionality:
          Couple the replacement of a word onto a occurence of a SourceWord1 in the corresponding source segment, to make sure I just get matches, where the word I would like to change is really this specific one, and not misleading from another SourceWord2, which hast nearly the same meaning.
          -> Do a Replacement of TargetWord2 or TargetWord3 with TargetWord1 in case there is a SourceWord1 in the corresponding source segment. If not, skip this segment.

          I hope my thoughts about that are somehow clear.

          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/omegat/feature-requests/1755/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

           

          Related

          Feature Requests: #1755

          • Jean-Christophe Helary

            Would you mind registering the 2 functions as 2 separate requests with a reference link to this one?

             
  • Martin Engelke

    Martin Engelke - 2024-07-31

    For sure.

     

Log in to post a comment.