Announcement

Collapse
No announcement yet.

unimportant vs. default text

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ugeuder
    replied
    Originally posted by Michael Bulgrien View Post
    try the "alternate method" option on the alignment tab in session settings. This compares from both directions (top down & bottom up) .
    Thanks for the hint Michael. I've already wondered in BC2 what this alternate method really is. I think I could have needed it sometimes earlier (with completely different files), when alignment bailed out and I had to do 10s of manula alignments.

    However, this time I don't think it would help. As I wrote above, one of my files has a long tail which the other one doesn't have. And because there a plenty of unimportant lines, which match in many places, I'd expect only problems when starting from the end, too. (I'm not at the machine with the files in question right now.)

    Leave a comment:


  • Michael Bulgrien
    replied
    You can also try the "alternate method" option on the alignment tab in session settings. This compares from both directions (top down & bottom up) which can improve alignment in certain types of files... especially when the top and bottom of both files are similar to each other with a change section in the middle.

    Leave a comment:


  • ugeuder
    replied
    Originally posted by Aaron View Post
    ... that matches you Manual Alignment (that you do at the end), .
    Hmm, not sure how I would do that. My manual alignment is something like "align line 95 left to line 950 right". How would define something like that?

    I can of course repeat the regexp of my record number (which tells me how I want it aligned and which I already have in the grammar) and give lines containing the record number priority 5. But that does not seem to make any difference at all.

    If the regexp is in the grammar and this grammar element is the only important one, alignment works for 95% of the file.

    If the grammar is empty and I try to achieve the alignment using line weights, it doesn't work at all. (The same as with no line weight at all)

    If both grammar and line weight are defined it can again align the first 95% correctly but bails out towards the end.
    Last edited by ugeuder; 19-Apr-2009, 12:23 PM. Reason: clarifed after reading the manual once more

    Leave a comment:


  • Aaron
    replied
    Line Weights can also help with alignment. Create a definition to match on, and then give it a high priority to help the alignment align that first.

    In your scenario, create a line weight that matches you Manual Alignment (that you do at the end), that may help you avoid that last step.

    Leave a comment:


  • ugeuder
    replied
    Originally posted by Aaron View Post
    Hello,

    As Michael suggests, you probably just need to uncheck the necessary values in your Session Settings .
    Perfect answers, thanks. This does indeed most of the job.

    I had looked at the importance tab of the session settings window, but somehow I had interpreted the checkboxes in the "Default text" frame incorrectly that they define what belongs to the default text category.

    Improvement suggestion: Just add "is important" to all 5 lines in the default text to make it really clear to the confused user.

    - Leading whitespace is important
    ...
    ...
    ...
    - Character case is important

    Yes, it's somewhat duplicated with the headline, but I don't think that harms.


    Originally posted by Aaron View Post
    You can also use the Alignment option under the Session Settings: Alignment tab: Never align differences, so that only your defined important text is used during the alignment, and that it will always match 100%.
    Great, so importance has really an effect on alignment, too. I wasn't too sure, whether importance is only for coloring and navigating differences. Improvement suggestion: Add help to the alignment tab and explain how it works and what the various selections really mean.

    Yes, "never align differences" works 95% as expected for my files. My files have different length, one covering just 10% of the other one. Very close to the end of the shorter file the alignment bails out, starts to align unimportant stuff (which happens to be identical) and after that it can no longer align the important record numbers. But that's not a big issue now, because I can correct it with one manual alignment.

    Thanks again! Problem solved.

    Just for curiosity: What are the line weights in File Formats / Grammar used for?

    Leave a comment:


  • Aaron
    replied
    Hello,

    You define the grammar elements as the File Format, and then set importance in the Session Settings. As Michael suggests, you probably just need to uncheck the necessary values in your Session Settings (the Everything Else value, as well as any other defined Grammars you do not want to be considered Important). Then, Important text will be shown as Red, and Unimportant text will be shown as Blue. You can toggle Ignore Unimportant Text to hide blue text as black text.

    You can also use the Alignment option under the Session Settings: Alignment tab: Never align differences, so that only your defined important text is used during the alignment, and that it will always match 100%. Or simply increase the slider for more accurate alignment results.

    Leave a comment:


  • Michael Bulgrien
    replied
    Originally posted by ugeuder View Post
    In my comparison everything seems to be always important. Can I make the default text unimportant? I vaguely remember a setting from BC2 times "everything else is unimportant".
    Under the Session Settings Importance tab, remove the check from the "Everything else" checkbox.

    Leave a comment:


  • ugeuder
    started a topic unimportant vs. default text

    unimportant vs. default text

    I work with special (read: not so commonly used proprietary format) text files which contain record numbers.

    When comparing them I have 2 requirements:

    1. equal record numbers should always be aligned (even if other lines before or after them are identical and might suggest some other alignment)

    2. everything else but record numbers can be set as unimportant (at least optionally by pressing the "similar" button)

    I managed to create a file format with the right regexp to match my record numbers. Now BC3 recognizes record numbers as their own grammar item and the rest as "default text".

    But this file format has no visible effect to the comparison.

    What is the meaning of the line weights in the grammar tab? Could that be used to influence the alignment according to my #1? My record numbers are not separate lines, so I haven't experimented with that.

    In my comparison everything seems to be always important. Can I make the default text unimportant? I vaguely remember a setting from BC2 times "everything else is unimportant".

    Of course mathematically it is possible to define a regexp for everything else than my record numbers. And then deselect this everything else from being important. But it seems more complicated than what I would like to do (or my regexp algebra skills are not enough...)

    P.S. Yes, I probably somehow mix alignment and importance here. The problem is just that it's not really clear to me how these are related, if at all.
Working...
X