Loading ...
Sorry, an error occurred while loading the content.
 

Matching/Sorting line terminations

Expand Messages
  • jbl
    Hi: The first difficulty with the problem I describe below is that I don t know what the key terms would be to search Google accurately. I have searched for a
    Message 1 of 10 , Sep 30, 2012
      Hi: The first difficulty with the problem I describe below is that I
      don't know what the key terms would be to search Google accurately. I
      have searched for a long time already. So if anyone could even tell me
      what it is I am looking for I'd be very grateful.

      The problem is this: I have a large file of poetry in alphabetical
      order sorted on the last term in each line, I post an except in
      sample1 below. I want to sort it so that lines that share, say, the
      last two terms (on the right) with the last two terms of any other
      line are in one group, those lines that share the last three terms in
      another and so on up to seven places -- as in sample2 below.

      The first difficulty I have is getting the search terms into an :ex
      command -- I need to find for each line whether there are any others
      that match it to seven terminal places, then to six and so on. I could
      do the simple locating with something cumbersome like this:

      map ö $BB2yW: p0ig/ A$/m0 map ä $ByW: p0ig/ A$/m0

      and so on up to seven places. But it must be possible to generalize
      that somehow. What would be the general form of an expression for
      finding the last 'x' words of a line in the same position somewhere
      else in the file?

      Apart from the crudeness of the operation, the trouble would be
      exporting (redirecting?) the results automatically and keeping the
      exported results in order (as in sample2 below). And also how to
      iterate it usefully through the whole file.

      If I started at the top of the raw file, iterating something like
      these commands, checking each line and exporting the results to a
      single file, the resulting file would be identical to the original
      file. I need, I think, to be able to eliminate those lines which do
      not share any terminations with any other lines. I think starting
      (somehow) with seven places then six and down to two, would leave me
      the non-sharing lines by themselves in the original file(?).

      But I'm not even sure what the strategic logic should be: exactly what
      tasks should I be trying to get the program to perform? The process
      needs to be automated because the file is 33,000 lines long. As I say,
      if someone could tell me what key terms, what types of operations, I
      should be looking for on Google, it would help a great deal.

      Many thanks for any help, JBL
      Vim 7.x Debian/Win7

      Here are the samples, one before (from the raw file) and one after (as
      I'd like the whole thing organized).

      Raw Lines
      6.4.30.7 All these our ioyes and all our blisse abate
      2.12.15.9 And after them did driue with all her power and might
      3.9.14.4 And both full liefe his boasting to abate
      6.6.27.9 And layd at him amaine with all his will and might
      6.1.38.2 At once did heaue with all their powre and might
      6.1.12.7 But through misfortune which did me abase
      5.11.57.9 Did set vpon those troupes with all his powre and might
      6.2.26.5 For deare affection and vnfayned zeale
      3.2.13.6 For hardy thing it is to weene by might
      4.9.6.9 He her vnwares attacht and captiue held by might
      6.1.32.9 He spide come pricking on with al his powre and might
      6.6.31.9 He stayd his second strooke and did his hand abase
      3.8.51.6 Mote not mislike you also to abate
      3.8.28.7 Ne ought your burning fury mote abate
      1.7.35.1 No magicke arts hereof had any might
      5.8.46.8 She at her ran with all her force and might
      1.10.2.8 She cast to bring him where he chearen might
      3.7.35.3 That at the last his fiercenesse gan abate
      4.8.17.8 That her inburning wrath she gan abate
      1.10.47.7 That hill they scale with all their powre and might
      4.6.3.4 The armes he bore his speare he gan abase
      5.9.39.4 To all assayes; his name was called Zele
      2.9.7.4 To serue that Queene with all my powre and might
      2.1.26.7 When suddenly that warriour gan abace
      6.12.23.9 Where he him found despoyling all with maine and might
      1.5.1.8 With greatest honour he atchieuen might
      4.8.1.7 With sufferaunce soft which rigour can abate
      5.5.30.1 With that she turn'd her head as halfe abashed

      Sorted lines
      ---Lines not repeating final term (=Unique lines):
      FQ 2.1.26.7 When suddenly that warriour gan abace
      FQ 5.5.30.1 With that she turn'd her head as halfe abashed
      FQ 6.2.26.5 For deare affection and vnfayned zeale
      FQ 5.9.39.4 To all assayes; his name was called Zele

      ---Lines repeating final term only:
      FQ 6.1.12.7 But through misfortune which did me abase
      FQ 6.6.31.9 He stayd his second strooke and did his hand abase
      FQ 4.6.3.4 The armes he bore his speare he gan abase
      FQ 3.8.28.7 Ne ought your burning fury mote abate
      FQ 4.8.1.7 With sufferaunce soft which rigour can abate
      FQ 6.4.30.7 All these our ioyes and all our blisse abate
      FQ 1.7.35.1 No magicke arts hereof had any might
      FQ 1.10.2.8 She cast to bring him where he chearen might
      FQ 1.5.1.8 With greatest honour he atchieuen might
      FQ 6.6.27.9 And layd at him amaine with all his will and might

      ---Lines repeating final two terms:
      FQ 3.9.14.4 And both full liefe his boasting to abate
      FQ 3.8.51.6 Mote not mislike you also to abate
      FQ 4.8.17.8 That her inburning wrath she gan abate
      FQ 3.7.35.3 That at the last his fiercenesse gan abate
      FQ 3.2.13.6 For hardy thing it is to weene by might
      FQ 4.9.6.9 He her vnwares attacht and captiue held by might

      ---Lines repeating final three terms:
      FQ 5.8.46.8 She at her ran with all her force and might
      FQ 6.12.23.9 Where he him found despoyling all with maine and might
      FQ 2.9.7.4 To serue that Queene with all my powre and might
      ........

      ---Lines repeating final six terms:
      FQ 2.12.15.9 And after them did driue with all her power and might
      FQ 5.11.57.9 Did set vpon those troupes with all his powre and might
      FQ 6.1.32.9 He spide come pricking on with all his powre and might
      FQ 1.10.47.7 That hill they scale with all their powre and might
      FQ 6.1.38.2 At once did heaue with all their powre and might

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Tony Mechelynck
      ... abase == abate == might? I guess I m too stupid. ... force == maine == powre (sic) ? You will have to explain me that ... I suppose powre is four times a
      Message 2 of 10 , Sep 30, 2012
        On 30/09/12 18:14, jbl wrote:
        > Hi: The first difficulty with the problem I describe below is that I
        > don't know what the key terms would be to search Google accurately. I
        > have searched for a long time already. So if anyone could even tell me
        > what it is I am looking for I'd be very grateful.
        >
        > The problem is this: I have a large file of poetry in alphabetical
        > order sorted on the last term in each line, I post an except in
        > sample1 below. I want to sort it so that lines that share, say, the
        > last two terms (on the right) with the last two terms of any other
        > line are in one group, those lines that share the last three terms in
        > another and so on up to seven places -- as in sample2 below.
        >
        > The first difficulty I have is getting the search terms into an :ex
        > command -- I need to find for each line whether there are any others
        > that match it to seven terminal places, then to six and so on. I could
        > do the simple locating with something cumbersome like this:
        >
        > map ö $BB2yW: p0ig/ A$/m0 map ä $ByW: p0ig/ A$/m0
        >
        > and so on up to seven places. But it must be possible to generalize
        > that somehow. What would be the general form of an expression for
        > finding the last 'x' words of a line in the same position somewhere
        > else in the file?
        >
        > Apart from the crudeness of the operation, the trouble would be
        > exporting (redirecting?) the results automatically and keeping the
        > exported results in order (as in sample2 below). And also how to
        > iterate it usefully through the whole file.
        >
        > If I started at the top of the raw file, iterating something like
        > these commands, checking each line and exporting the results to a
        > single file, the resulting file would be identical to the original
        > file. I need, I think, to be able to eliminate those lines which do
        > not share any terminations with any other lines. I think starting
        > (somehow) with seven places then six and down to two, would leave me
        > the non-sharing lines by themselves in the original file(?).
        >
        > But I'm not even sure what the strategic logic should be: exactly what
        > tasks should I be trying to get the program to perform? The process
        > needs to be automated because the file is 33,000 lines long. As I say,
        > if someone could tell me what key terms, what types of operations, I
        > should be looking for on Google, it would help a great deal.
        >
        > Many thanks for any help, JBL
        > Vim 7.x Debian/Win7
        >
        > Here are the samples, one before (from the raw file) and one after (as
        > I'd like the whole thing organized).
        >
        > Raw Lines
        > 6.4.30.7 All these our ioyes and all our blisse abate
        > 2.12.15.9 And after them did driue with all her power and might
        > 3.9.14.4 And both full liefe his boasting to abate
        > 6.6.27.9 And layd at him amaine with all his will and might
        > 6.1.38.2 At once did heaue with all their powre and might
        > 6.1.12.7 But through misfortune which did me abase
        > 5.11.57.9 Did set vpon those troupes with all his powre and might
        > 6.2.26.5 For deare affection and vnfayned zeale
        > 3.2.13.6 For hardy thing it is to weene by might
        > 4.9.6.9 He her vnwares attacht and captiue held by might
        > 6.1.32.9 He spide come pricking on with al his powre and might
        > 6.6.31.9 He stayd his second strooke and did his hand abase
        > 3.8.51.6 Mote not mislike you also to abate
        > 3.8.28.7 Ne ought your burning fury mote abate
        > 1.7.35.1 No magicke arts hereof had any might
        > 5.8.46.8 She at her ran with all her force and might
        > 1.10.2.8 She cast to bring him where he chearen might
        > 3.7.35.3 That at the last his fiercenesse gan abate
        > 4.8.17.8 That her inburning wrath she gan abate
        > 1.10.47.7 That hill they scale with all their powre and might
        > 4.6.3.4 The armes he bore his speare he gan abase
        > 5.9.39.4 To all assayes; his name was called Zele
        > 2.9.7.4 To serue that Queene with all my powre and might
        > 2.1.26.7 When suddenly that warriour gan abace
        > 6.12.23.9 Where he him found despoyling all with maine and might
        > 1.5.1.8 With greatest honour he atchieuen might
        > 4.8.1.7 With sufferaunce soft which rigour can abate
        > 5.5.30.1 With that she turn'd her head as halfe abashed
        >
        > Sorted lines
        > ---Lines not repeating final term (=Unique lines):
        > FQ 2.1.26.7 When suddenly that warriour gan abace
        > FQ 5.5.30.1 With that she turn'd her head as halfe abashed
        > FQ 6.2.26.5 For deare affection and vnfayned zeale
        > FQ 5.9.39.4 To all assayes; his name was called Zele
        >
        > ---Lines repeating final term only:
        > FQ 6.1.12.7 But through misfortune which did me abase
        > FQ 6.6.31.9 He stayd his second strooke and did his hand abase
        > FQ 4.6.3.4 The armes he bore his speare he gan abase
        > FQ 3.8.28.7 Ne ought your burning fury mote abate
        > FQ 4.8.1.7 With sufferaunce soft which rigour can abate
        > FQ 6.4.30.7 All these our ioyes and all our blisse abate
        > FQ 1.7.35.1 No magicke arts hereof had any might
        > FQ 1.10.2.8 She cast to bring him where he chearen might
        > FQ 1.5.1.8 With greatest honour he atchieuen might
        > FQ 6.6.27.9 And layd at him amaine with all his will and might
        abase == abate == might? I guess I'm too stupid.
        >
        > ---Lines repeating final two terms:
        > FQ 3.9.14.4 And both full liefe his boasting to abate
        > FQ 3.8.51.6 Mote not mislike you also to abate
        > FQ 4.8.17.8 That her inburning wrath she gan abate
        > FQ 3.7.35.3 That at the last his fiercenesse gan abate
        > FQ 3.2.13.6 For hardy thing it is to weene by might
        > FQ 4.9.6.9 He her vnwares attacht and captiue held by might
        >
        > ---Lines repeating final three terms:
        > FQ 5.8.46.8 She at her ran with all her force and might
        > FQ 6.12.23.9 Where he him found despoyling all with maine and might
        > FQ 2.9.7.4 To serue that Queene with all my powre and might
        force == maine == powre (sic) ? You will have to explain me that

        > ........
        >
        > ---Lines repeating final six terms:
        > FQ 2.12.15.9 And after them did driue with all her power and might
        > FQ 5.11.57.9 Did set vpon those troupes with all his powre and might
        > FQ 6.1.32.9 He spide come pricking on with all his powre and might
        > FQ 1.10.47.7 That hill they scale with all their powre and might
        > FQ 6.1.38.2 At once did heaue with all their powre and might
        I suppose "powre" is four times a typo.
        her == his == their? Or are there three different sets of lines, one of
        them a singleton?

        >

        This sounds like a "decorate - sort - undecorate" problem:
        1. Put each line into "sortable" order (in this case, reverse the order
        of the terms, so that the last term comes at the start of the line, then
        one space, then the last but one, then one space, etc.);
        2. Sort
        3. Put the lines back like they used to be (i.e., reverse the order of
        the terms again).

        Note that no "dumb" computer will be able to find out that "his", "her"
        and "their" are to be sorted together, unless you somehow program it
        into the logic of your steps 1 and 3.


        Best regards,
        Tony.
        --
        "I'd love to go out with you, but I'm taking punk totem pole carving."

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Bee
        ... This will sort the lines by the last term: sort ir / w +$/ ... Bill -- You received this message from the vim_use maillist. Do not top-post! Type your
        Message 3 of 10 , Sep 30, 2012
          On Sep 30, 9:14 am, jbl <lethbri...@...> wrote:
          > The problem is this: I have a large file of poetry in
          > alphabetical order sorted on the last term in each line,

          This will sort the lines by the last term:

          sort ir /\w\+$/

          :help :sort

          Bill

          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • jbl
          Thanks -- the lines are in English 400 years old, hence the eccentric spelling. The sorting you suggest is just what produced the first list, the raw file: it
          Message 4 of 10 , Sep 30, 2012
            Thanks -- the lines are in English 400 years old, hence the eccentric spelling.

            The sorting you suggest is just what produced the first list, the raw
            file: it is mixed up with lines without repetitions, and those
            repetitions that occur are not ordered: so that in the whole file you
            might find two repetitions here and three there, with a six between
            them, and odd single lines getting in the way. Over 33,000 lines, this
            becomes impossible to manage by hand.

            'his', 'her' etc are not related or linked: they are different terms
            and do not count as repetitions.

            In the first group (repeating two terms) there are three separate
            groups of terminations: 'to abate', 'gan abate' and 'by might'.

            In the next group (repeating three terms) I accidentally left out the
            second line in each case -- again there are supposed to be three
            different pairs. And in the six repeating terms group, I missed out
            the first line of the group.

            Sorry for the missing lines, and thanks for your comments,

            Julian


            On Sun, Sep 30, 2012 at 7:20 PM, Tony Mechelynck
            <antoine.mechelynck@...> wrote:
            > On 30/09/12 18:14, jbl wrote:
            >>
            >> Hi: The first difficulty with the problem I describe below is that I
            >> don't know what the key terms would be to search Google accurately. I
            >> have searched for a long time already. So if anyone could even tell me
            >> what it is I am looking for I'd be very grateful.
            >>
            >> The problem is this: I have a large file of poetry in alphabetical
            >> order sorted on the last term in each line, I post an except in
            >> sample1 below. I want to sort it so that lines that share, say, the
            >> last two terms (on the right) with the last two terms of any other
            >> line are in one group, those lines that share the last three terms in
            >> another and so on up to seven places -- as in sample2 below.
            >>
            >> The first difficulty I have is getting the search terms into an :ex
            >> command -- I need to find for each line whether there are any others
            >> that match it to seven terminal places, then to six and so on. I could
            >> do the simple locating with something cumbersome like this:
            >>
            >> map ö $BB2yW: p0ig/ A$/m0 map ä $ByW: p0ig/ A$/m0
            >>
            >> and so on up to seven places. But it must be possible to generalize
            >> that somehow. What would be the general form of an expression for
            >> finding the last 'x' words of a line in the same position somewhere
            >> else in the file?
            >>
            >> Apart from the crudeness of the operation, the trouble would be
            >> exporting (redirecting?) the results automatically and keeping the
            >> exported results in order (as in sample2 below). And also how to
            >> iterate it usefully through the whole file.
            >>
            >> If I started at the top of the raw file, iterating something like
            >> these commands, checking each line and exporting the results to a
            >> single file, the resulting file would be identical to the original
            >> file. I need, I think, to be able to eliminate those lines which do
            >> not share any terminations with any other lines. I think starting
            >> (somehow) with seven places then six and down to two, would leave me
            >> the non-sharing lines by themselves in the original file(?).
            >>
            >> But I'm not even sure what the strategic logic should be: exactly what
            >> tasks should I be trying to get the program to perform? The process
            >> needs to be automated because the file is 33,000 lines long. As I say,
            >> if someone could tell me what key terms, what types of operations, I
            >> should be looking for on Google, it would help a great deal.
            >>
            >> Many thanks for any help, JBL
            >> Vim 7.x Debian/Win7
            >>
            >> Here are the samples, one before (from the raw file) and one after (as
            >> I'd like the whole thing organized).
            >>
            >> Raw Lines
            >> 6.4.30.7 All these our ioyes and all our blisse abate
            >> 2.12.15.9 And after them did driue with all her power and might
            >> 3.9.14.4 And both full liefe his boasting to abate
            >> 6.6.27.9 And layd at him amaine with all his will and might
            >> 6.1.38.2 At once did heaue with all their powre and might
            >> 6.1.12.7 But through misfortune which did me abase
            >> 5.11.57.9 Did set vpon those troupes with all his powre and might
            >> 6.2.26.5 For deare affection and vnfayned zeale
            >> 3.2.13.6 For hardy thing it is to weene by might
            >> 4.9.6.9 He her vnwares attacht and captiue held by might
            >> 6.1.32.9 He spide come pricking on with al his powre and might
            >> 6.6.31.9 He stayd his second strooke and did his hand abase
            >> 3.8.51.6 Mote not mislike you also to abate
            >> 3.8.28.7 Ne ought your burning fury mote abate
            >> 1.7.35.1 No magicke arts hereof had any might
            >> 5.8.46.8 She at her ran with all her force and might
            >> 1.10.2.8 She cast to bring him where he chearen might
            >> 3.7.35.3 That at the last his fiercenesse gan abate
            >> 4.8.17.8 That her inburning wrath she gan abate
            >> 1.10.47.7 That hill they scale with all their powre and might
            >> 4.6.3.4 The armes he bore his speare he gan abase
            >> 5.9.39.4 To all assayes; his name was called Zele
            >> 2.9.7.4 To serue that Queene with all my powre and might
            >> 2.1.26.7 When suddenly that warriour gan abace
            >> 6.12.23.9 Where he him found despoyling all with maine and might
            >> 1.5.1.8 With greatest honour he atchieuen might
            >> 4.8.1.7 With sufferaunce soft which rigour can abate
            >> 5.5.30.1 With that she turn'd her head as halfe abashed
            >>
            >> Sorted lines
            >> ---Lines not repeating final term (=Unique lines):
            >> FQ 2.1.26.7 When suddenly that warriour gan abace
            >> FQ 5.5.30.1 With that she turn'd her head as halfe abashed
            >> FQ 6.2.26.5 For deare affection and vnfayned zeale
            >> FQ 5.9.39.4 To all assayes; his name was called Zele
            >>
            >> ---Lines repeating final term only:
            >> FQ 6.1.12.7 But through misfortune which did me abase
            >> FQ 6.6.31.9 He stayd his second strooke and did his hand abase
            >> FQ 4.6.3.4 The armes he bore his speare he gan abase
            >> FQ 3.8.28.7 Ne ought your burning fury mote abate
            >> FQ 4.8.1.7 With sufferaunce soft which rigour can abate
            >> FQ 6.4.30.7 All these our ioyes and all our blisse abate
            >> FQ 1.7.35.1 No magicke arts hereof had any might
            >> FQ 1.10.2.8 She cast to bring him where he chearen might
            >> FQ 1.5.1.8 With greatest honour he atchieuen might
            >> FQ 6.6.27.9 And layd at him amaine with all his will and might
            >
            > abase == abate == might? I guess I'm too stupid.
            >
            >>
            >> ---Lines repeating final two terms:
            >> FQ 3.9.14.4 And both full liefe his boasting to abate
            >> FQ 3.8.51.6 Mote not mislike you also to abate
            >> FQ 4.8.17.8 That her inburning wrath she gan abate
            >> FQ 3.7.35.3 That at the last his fiercenesse gan abate
            >> FQ 3.2.13.6 For hardy thing it is to weene by might
            >> FQ 4.9.6.9 He her vnwares attacht and captiue held by might
            >>
            >> ---Lines repeating final three terms:
            >> FQ 5.8.46.8 She at her ran with all her force and might
            >> FQ 6.12.23.9 Where he him found despoyling all with maine and might
            >> FQ 2.9.7.4 To serue that Queene with all my powre and might
            >
            > force == maine == powre (sic) ? You will have to explain me that
            >
            >
            >> ........
            >>
            >> ---Lines repeating final six terms:
            >> FQ 2.12.15.9 And after them did driue with all her power and might
            >> FQ 5.11.57.9 Did set vpon those troupes with all his powre and might
            >> FQ 6.1.32.9 He spide come pricking on with all his powre and might
            >> FQ 1.10.47.7 That hill they scale with all their powre and might
            >> FQ 6.1.38.2 At once did heaue with all their powre and might
            >
            > I suppose "powre" is four times a typo.
            > her == his == their? Or are there three different sets of lines, one of them
            > a singleton?
            >
            >>
            >
            > This sounds like a "decorate - sort - undecorate" problem:
            > 1. Put each line into "sortable" order (in this case, reverse the order of
            > the terms, so that the last term comes at the start of the line, then one
            > space, then the last but one, then one space, etc.);
            > 2. Sort
            > 3. Put the lines back like they used to be (i.e., reverse the order of the
            > terms again).
            >
            > Note that no "dumb" computer will be able to find out that "his", "her" and
            > "their" are to be sorted together, unless you somehow program it into the
            > logic of your steps 1 and 3.
            >
            >
            > Best regards,
            > Tony.
            > --
            > "I'd love to go out with you, but I'm taking punk totem pole carving."
            >
            > --
            > You received this message from the "vim_use" maillist.
            > Do not top-post! Type your reply below the text you are replying to.
            > For more information, visit http://www.vim.org/maillist.php



            --
            J.B. Lethbridge
            (Gen. Ed. The Manchester Spenser)
            English Seminar
            Tuebingen University
            WIlhelmstrasse 50
            Tuebingen
            72074 Germany

            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • jbl
            Hi. Thanks. Here is a better sample of the raw lines file sorted as you suggest. This is the form I generated ages ago to work on these repetitions, and which
            Message 5 of 10 , Sep 30, 2012
              Hi. Thanks. Here is a better sample of the raw lines file sorted as
              you suggest. This is the form I generated ages ago to work on these
              repetitions, and which I am now trying to sort again into groups
              repeating the last two terms, last three terms ... and so on. You can
              see that the repetitions of two and three terms and non-repetitions
              are all mixed up together:

              FQ 6.8.5.5 And did his head for bashfulnesse abase
              FQ 4.6.3.4 The armes he bore, his speare he gan abase
              FQ 6.6.31.9 He stayd his second strooke, and did his hand abase
              FQ 6.1.12.7 But through misfortune, which did me abase
              FQ 5.5.30.1 With that she turn'd her head, as halfe abashed
              FQ 6.4.30.7 All these our ioyes, and all our blisse abate
              FQ 4.8.1.7 With sufferaunce soft, which rigour can abate
              FQ 1.3.7.2 Quoth she, his princely puissance doth abate
              FQ 3.7.35.3 That at the last his fiercenesse gan abate
              FQ 4.8.17.8 That her inburning wrath she gan abate
              FQ 3.8.28.7 Ne ought your burning fury mote abate
              FQ 3.8.51.6 Mote not mislike you also to abate
              FQ 3.9.14.4 And both full liefe his boasting to abate
              FQ 4.9.34.6 Him selfe he bent their furies to abate
              FQ 4.3.26.6 Which when for want of breath gan to abate
              FQ 1.10.26.2 His daintie corse, proud humors to abate
              FQ 5.9.46.7 Which when as \Zele\ perceiued to abate
              FQ 4.2.50.2 To graunt her boone, and rigour to abate
              FQ 2.2.19.5 And th'=others pleasing seruice to abate
              FQ 5.12.19.1 So did the Faerie knight himselfe abeare
              FQ 6.9.45.1 Thus did the gentle knight himselfe abeare
              FQ 4.3.11.2 The meede of thy mischalenge and abet
              FQ 6.5.22.4 To reskue him, and his weake part abet

              I think the command you suggest sorts only on the last term of the
              line. In this sample I have sorted by first reversing the order of
              words in the line and then sorting and again reversing the order of
              words. Pretty much as suggested just now by someone else.

              Thanks,

              Julian

              On Sun, Sep 30, 2012 at 8:17 PM, Bee <forth@...> wrote:
              > On Sep 30, 9:14 am, jbl <lethbri...@...> wrote:
              >> The problem is this: I have a large file of poetry in
              >> alphabetical order sorted on the last term in each line,
              >
              > This will sort the lines by the last term:
              >
              > sort ir /\w\+$/
              >
              > :help :sort
              >
              > Bill
              >
              > --
              > You received this message from the "vim_use" maillist.
              > Do not top-post! Type your reply below the text you are replying to.
              > For more information, visit http://www.vim.org/maillist.php



              --
              J.B. Lethbridge
              (Gen. Ed. The Manchester Spenser)
              English Seminar
              Tuebingen University
              WIlhelmstrasse 50
              Tuebingen
              72074 Germany

              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Tim Chase
              ... Well, a quick little Python script seems to do the grunt-work for me: ############################## import re r = re.compile(r w+ ) print .join(sorted(
              Message 6 of 10 , Sep 30, 2012
                On 09/30/12 11:14, jbl wrote:
                > The problem is this: I have a large file of poetry in alphabetical
                > order sorted on the last term in each line, I post an except in
                > sample1 below. I want to sort it so that lines that share, say, the
                > last two terms (on the right) with the last two terms of any other
                > line are in one group, those lines that share the last three terms in
                > another and so on

                Well, a quick little Python script seems to do the grunt-work for me:

                ##############################
                import re
                r = re.compile(r'\w+')
                print ''.join(sorted(
                (line for line in file("raw.txt")),
                key=lambda s: tuple(reversed(r.findall(s)))
                ))
                ##############################

                That is case-sensitive. It's a small bit more if you want it
                case-insensitive:

                ##############################
                import re
                r = re.compile(r'\w+')
                print ''.join(sorted(
                (line for line in file("raw.txt")),
                key=lambda s: tuple(w.upper() for w in reversed(r.findall(s)))
                ))
                ##############################

                > and so on up to seven places. But it must be possible to generalize
                > that somehow.

                One of the tricky aspects of this is how you treat (or ignore)
                differing punctuation. If you want the same words, but allowing for
                varying punctuation, it's a lot more complex. That said, it sounded
                like a fun afternoon challenge, so I threw together & attached a
                quick program that accommodates all your options and
                case-insensitivity needs :-)

                It can be called on a pair of files, or you can pipe stdin and it
                will return on stdout in case you want to call it from Vim with

                :%! python revsort.py

                to just operate on a sub-range of your file. Alternatively, from a
                command-line, you can use

                python revsort.py infile.txt outfile.txt

                or, if you only want those where the last N words match, you can do
                things like

                python revsort.py -w 3 infile.txt outfile.txt

                It was kinda fun, and hopefully the code is easy to follow. This
                does assume that you have Python installed on your machine. It was
                tested on 2.6, but should run on 2.4-2.7, and possibly on 3.x as well.

                -tim






                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • J.B. Lethbridge
                Dear TIm: Thank you very much. I ve just been trying it out and I m still quite breathless -- you ve saved me so much grief with this brilliant generosity that
                Message 7 of 10 , Sep 30, 2012
                  Dear TIm: Thank you very much. I've just been trying it out and I'm
                  still quite breathless -- you've saved me so much grief with this
                  brilliant generosity that I hardly know what to say. It works
                  beautifully on python 2.6.6 (Debian). Also the results look even more
                  informative than I had hoped. And I learned another batch of stuff
                  about Linux; it is kind of you to include explanations, with that I
                  can manage.

                  Thank you so much -- and thanks to all who joined in,

                  Julian

                  On Sun, Sep 30, 2012 at 10:20 PM, Tim Chase <vim@...> wrote:
                  > On 09/30/12 11:14, jbl wrote:
                  >> The problem is this: I have a large file of poetry in alphabetical
                  >> order sorted on the last term in each line, I post an except in
                  >> sample1 below. I want to sort it so that lines that share, say, the
                  >> last two terms (on the right) with the last two terms of any other
                  >> line are in one group, those lines that share the last three terms in
                  >> another and so on
                  >
                  > Well, a quick little Python script seems to do the grunt-work for me:
                  >
                  > ##############################
                  > import re
                  > r = re.compile(r'\w+')
                  > print ''.join(sorted(
                  > (line for line in file("raw.txt")),
                  > key=lambda s: tuple(reversed(r.findall(s)))
                  > ))
                  > ##############################
                  >
                  > That is case-sensitive. It's a small bit more if you want it
                  > case-insensitive:
                  >
                  > ##############################
                  > import re
                  > r = re.compile(r'\w+')
                  > print ''.join(sorted(
                  > (line for line in file("raw.txt")),
                  > key=lambda s: tuple(w.upper() for w in reversed(r.findall(s)))
                  > ))
                  > ##############################
                  >
                  >> and so on up to seven places. But it must be possible to generalize
                  >> that somehow.
                  >
                  > One of the tricky aspects of this is how you treat (or ignore)
                  > differing punctuation. If you want the same words, but allowing for
                  > varying punctuation, it's a lot more complex. That said, it sounded
                  > like a fun afternoon challenge, so I threw together & attached a
                  > quick program that accommodates all your options and
                  > case-insensitivity needs :-)
                  >
                  > It can be called on a pair of files, or you can pipe stdin and it
                  > will return on stdout in case you want to call it from Vim with
                  >
                  > :%! python revsort.py
                  >
                  > to just operate on a sub-range of your file. Alternatively, from a
                  > command-line, you can use
                  >
                  > python revsort.py infile.txt outfile.txt
                  >
                  > or, if you only want those where the last N words match, you can do
                  > things like
                  >
                  > python revsort.py -w 3 infile.txt outfile.txt
                  >
                  > It was kinda fun, and hopefully the code is easy to follow. This
                  > does assume that you have Python installed on your machine. It was
                  > tested on 2.6, but should run on 2.4-2.7, and possibly on 3.x as well.
                  >
                  > -tim
                  >
                  >
                  >
                  >
                  >
                  >
                  > --
                  > You received this message from the "vim_use" maillist.
                  > Do not top-post! Type your reply below the text you are replying to.
                  > For more information, visit http://www.vim.org/maillist.php

                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                • Tim Chase
                  ... Glad to help, and glad you found it useful--consider it my small karmic payment for maintaining personal disdain towards poetry[*] ;-) -tim [*] okay, so I
                  Message 8 of 10 , Sep 30, 2012
                    On 09/30/12 17:44, J.B. Lethbridge wrote:
                    > Dear TIm: Thank you very much. I've just been trying it out and I'm
                    > still quite breathless -- you've saved me so much grief with this
                    > brilliant generosity that I hardly know what to say. It works
                    > beautifully on python 2.6.6 (Debian). Also the results look even more
                    > informative than I had hoped. And I learned another batch of stuff
                    > about Linux; it is kind of you to include explanations, with that I
                    > can manage.

                    Glad to help, and glad you found it useful--consider it my small
                    karmic payment for maintaining personal disdain towards poetry[*] ;-)

                    -tim


                    [*] okay, so I have a minor exemption for *good* poetry like Shel
                    Silverstein, Lewis Carrol, corny limericks, etc ;-)




                    --
                    You received this message from the "vim_use" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  • Tony Mechelynck
                    ... So you want to group lines so that the groups of lines which have most in common come at the top. Okay, this is a little more difficult: 1. Reverse the
                    Message 9 of 10 , Oct 1 5:18 PM
                      On 30/09/12 20:18, jbl wrote:
                      > Thanks -- the lines are in English 400 years old, hence the eccentric spelling.
                      >
                      > The sorting you suggest is just what produced the first list, the raw
                      > file: it is mixed up with lines without repetitions, and those
                      > repetitions that occur are not ordered: so that in the whole file you
                      > might find two repetitions here and three there, with a six between
                      > them, and odd single lines getting in the way. Over 33,000 lines, this
                      > becomes impossible to manage by hand.
                      >
                      > 'his', 'her' etc are not related or linked: they are different terms
                      > and do not count as repetitions.
                      >
                      > In the first group (repeating two terms) there are three separate
                      > groups of terminations: 'to abate', 'gan abate' and 'by might'.
                      >
                      > In the next group (repeating three terms) I accidentally left out the
                      > second line in each case -- again there are supposed to be three
                      > different pairs. And in the six repeating terms group, I missed out
                      > the first line of the group.
                      >
                      > Sorry for the missing lines, and thanks for your comments,
                      >
                      > Julian
                      >
                      >
                      > On Sun, Sep 30, 2012 at 7:20 PM, Tony Mechelynck
                      > <antoine.mechelynck@...> wrote:
                      >> On 30/09/12 18:14, jbl wrote:
                      >>>
                      >>> Hi: The first difficulty with the problem I describe below is that I
                      >>> don't know what the key terms would be to search Google accurately. I
                      >>> have searched for a long time already. So if anyone could even tell me
                      >>> what it is I am looking for I'd be very grateful.
                      >>>
                      >>> The problem is this: I have a large file of poetry in alphabetical
                      >>> order sorted on the last term in each line, I post an except in
                      >>> sample1 below. I want to sort it so that lines that share, say, the
                      >>> last two terms (on the right) with the last two terms of any other
                      >>> line are in one group, those lines that share the last three terms in
                      >>> another and so on up to seven places -- as in sample2 below.
                      >>>
                      >>> The first difficulty I have is getting the search terms into an :ex
                      >>> command -- I need to find for each line whether there are any others
                      >>> that match it to seven terminal places, then to six and so on. I could
                      >>> do the simple locating with something cumbersome like this:
                      >>>
                      >>> map ö $BB2yW: p0ig/ A$/m0 map ä $ByW: p0ig/ A$/m0
                      >>>
                      >>> and so on up to seven places. But it must be possible to generalize
                      >>> that somehow. What would be the general form of an expression for
                      >>> finding the last 'x' words of a line in the same position somewhere
                      >>> else in the file?
                      >>>
                      >>> Apart from the crudeness of the operation, the trouble would be
                      >>> exporting (redirecting?) the results automatically and keeping the
                      >>> exported results in order (as in sample2 below). And also how to
                      >>> iterate it usefully through the whole file.
                      >>>
                      >>> If I started at the top of the raw file, iterating something like
                      >>> these commands, checking each line and exporting the results to a
                      >>> single file, the resulting file would be identical to the original
                      >>> file. I need, I think, to be able to eliminate those lines which do
                      >>> not share any terminations with any other lines. I think starting
                      >>> (somehow) with seven places then six and down to two, would leave me
                      >>> the non-sharing lines by themselves in the original file(?).
                      >>>
                      >>> But I'm not even sure what the strategic logic should be: exactly what
                      >>> tasks should I be trying to get the program to perform? The process
                      >>> needs to be automated because the file is 33,000 lines long. As I say,
                      >>> if someone could tell me what key terms, what types of operations, I
                      >>> should be looking for on Google, it would help a great deal.
                      >>>
                      >>> Many thanks for any help, JBL
                      >>> Vim 7.x Debian/Win7
                      >>>
                      >>> Here are the samples, one before (from the raw file) and one after (as
                      >>> I'd like the whole thing organized).
                      >>>
                      >>> Raw Lines
                      >>> 6.4.30.7 All these our ioyes and all our blisse abate
                      >>> 2.12.15.9 And after them did driue with all her power and might
                      >>> 3.9.14.4 And both full liefe his boasting to abate
                      >>> 6.6.27.9 And layd at him amaine with all his will and might
                      >>> 6.1.38.2 At once did heaue with all their powre and might
                      >>> 6.1.12.7 But through misfortune which did me abase
                      >>> 5.11.57.9 Did set vpon those troupes with all his powre and might
                      >>> 6.2.26.5 For deare affection and vnfayned zeale
                      >>> 3.2.13.6 For hardy thing it is to weene by might
                      >>> 4.9.6.9 He her vnwares attacht and captiue held by might
                      >>> 6.1.32.9 He spide come pricking on with al his powre and might
                      >>> 6.6.31.9 He stayd his second strooke and did his hand abase
                      >>> 3.8.51.6 Mote not mislike you also to abate
                      >>> 3.8.28.7 Ne ought your burning fury mote abate
                      >>> 1.7.35.1 No magicke arts hereof had any might
                      >>> 5.8.46.8 She at her ran with all her force and might
                      >>> 1.10.2.8 She cast to bring him where he chearen might
                      >>> 3.7.35.3 That at the last his fiercenesse gan abate
                      >>> 4.8.17.8 That her inburning wrath she gan abate
                      >>> 1.10.47.7 That hill they scale with all their powre and might
                      >>> 4.6.3.4 The armes he bore his speare he gan abase
                      >>> 5.9.39.4 To all assayes; his name was called Zele
                      >>> 2.9.7.4 To serue that Queene with all my powre and might
                      >>> 2.1.26.7 When suddenly that warriour gan abace
                      >>> 6.12.23.9 Where he him found despoyling all with maine and might
                      >>> 1.5.1.8 With greatest honour he atchieuen might
                      >>> 4.8.1.7 With sufferaunce soft which rigour can abate
                      >>> 5.5.30.1 With that she turn'd her head as halfe abashed
                      >>>
                      >>> Sorted lines
                      >>> ---Lines not repeating final term (=Unique lines):
                      >>> FQ 2.1.26.7 When suddenly that warriour gan abace
                      >>> FQ 5.5.30.1 With that she turn'd her head as halfe abashed
                      >>> FQ 6.2.26.5 For deare affection and vnfayned zeale
                      >>> FQ 5.9.39.4 To all assayes; his name was called Zele
                      >>>
                      >>> ---Lines repeating final term only:
                      >>> FQ 6.1.12.7 But through misfortune which did me abase
                      >>> FQ 6.6.31.9 He stayd his second strooke and did his hand abase
                      >>> FQ 4.6.3.4 The armes he bore his speare he gan abase
                      >>> FQ 3.8.28.7 Ne ought your burning fury mote abate
                      >>> FQ 4.8.1.7 With sufferaunce soft which rigour can abate
                      >>> FQ 6.4.30.7 All these our ioyes and all our blisse abate
                      >>> FQ 1.7.35.1 No magicke arts hereof had any might
                      >>> FQ 1.10.2.8 She cast to bring him where he chearen might
                      >>> FQ 1.5.1.8 With greatest honour he atchieuen might
                      >>> FQ 6.6.27.9 And layd at him amaine with all his will and might
                      >>
                      >> abase == abate == might? I guess I'm too stupid.
                      >>
                      >>>
                      >>> ---Lines repeating final two terms:
                      >>> FQ 3.9.14.4 And both full liefe his boasting to abate
                      >>> FQ 3.8.51.6 Mote not mislike you also to abate
                      >>> FQ 4.8.17.8 That her inburning wrath she gan abate
                      >>> FQ 3.7.35.3 That at the last his fiercenesse gan abate
                      >>> FQ 3.2.13.6 For hardy thing it is to weene by might
                      >>> FQ 4.9.6.9 He her vnwares attacht and captiue held by might
                      >>>
                      >>> ---Lines repeating final three terms:
                      >>> FQ 5.8.46.8 She at her ran with all her force and might
                      >>> FQ 6.12.23.9 Where he him found despoyling all with maine and might
                      >>> FQ 2.9.7.4 To serue that Queene with all my powre and might
                      >>
                      >> force == maine == powre (sic) ? You will have to explain me that
                      >>
                      >>
                      >>> ........
                      >>>
                      >>> ---Lines repeating final six terms:
                      >>> FQ 2.12.15.9 And after them did driue with all her power and might
                      >>> FQ 5.11.57.9 Did set vpon those troupes with all his powre and might
                      >>> FQ 6.1.32.9 He spide come pricking on with all his powre and might
                      >>> FQ 1.10.47.7 That hill they scale with all their powre and might
                      >>> FQ 6.1.38.2 At once did heaue with all their powre and might
                      >>
                      >> I suppose "powre" is four times a typo.
                      >> her == his == their? Or are there three different sets of lines, one of them
                      >> a singleton?
                      >>
                      >>>
                      >>
                      >> This sounds like a "decorate - sort - undecorate" problem:
                      >> 1. Put each line into "sortable" order (in this case, reverse the order of
                      >> the terms, so that the last term comes at the start of the line, then one
                      >> space, then the last but one, then one space, etc.);
                      >> 2. Sort
                      >> 3. Put the lines back like they used to be (i.e., reverse the order of the
                      >> terms again).
                      >>
                      >> Note that no "dumb" computer will be able to find out that "his", "her" and
                      >> "their" are to be sorted together, unless you somehow program it into the
                      >> logic of your steps 1 and 3.
                      >>
                      >>
                      >> Best regards,
                      >> Tony.
                      >> --
                      >> "I'd love to go out with you, but I'm taking punk totem pole carving."
                      >>
                      >> --
                      >> You received this message from the "vim_use" maillist.
                      >> Do not top-post! Type your reply below the text you are replying to.
                      >> For more information, visit http://www.vim.org/maillist.php
                      >
                      >
                      >
                      So you want to group lines so that the groups of lines which have most
                      in common come at the top. Okay, this is a little more difficult:

                      1. Reverse the order of the terms
                      2. Sort
                      3. Count how many words match, and add that count at the start of every
                      line in the group.
                      4. Sort again, numerically.
                      5. Un-decorate (remove the number and reverse the words)

                      You will have to handle the case where lines with many common words are
                      included in larger groups with only two or three common words, as
                      follows: the following are after step 2, and I'm adding the number of
                      matching words at the end to show your choices:

                      The length of the border between Scotland and England |1
                      Cambridge, Massachusetts and Cambridge, England |1
                      London, the capital of England |2 |1
                      The House of Commons invited the Queen of England |3 |2 |1
                      The flower gardens of the former Queen of England |3 |2 |1
                      Once upon a time when all the ships of England |4 |2 |1
                      All the ships of Spain couldn't sink the ships of England |4 |2 |1

                      If you remove the lines with 4 matching words and those with 3 matching
                      words, will you bring them back to create a group with 2 matching words?
                      Or will the line "London…" find itself in only a group with 1 matching
                      word? And the "England" group (1 matching word) which started out with 7
                      lines, will it be "amputated" of better matching lines, and reduced to 2
                      lines (without "London…") or 3 (with it)?


                      Best regards,
                      Tony.
                      --
                      The wind doth taste so bitter sweet,
                      Like Jaspar wine and sugar,
                      It must have blown through someone's feet,
                      Like those of Caspar Weinberger.
                      -- P. Opus

                      --
                      You received this message from the "vim_use" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php
                    • Bee
                      ... -------1---------2---------3---------4---------5---------6---- Found time to play with this sort. The following vim function will sort the
                      Message 10 of 10 , Oct 1 8:01 PM
                        On Sep 30, 11:31 am, jbl <lethbri...@...> wrote:
                        > Hi. Thanks. Here is a better sample of the raw lines file sorted as
                        > you suggest. This is the form I generated ages ago to work on these
                        > repetitions, and which I am now trying to sort again into groups
                        > repeating the last two terms, last three terms ... and so on. You can
                        > see that the repetitions of two and three terms and non-repetitions
                        > are all mixed up together:
                        >
                        > FQ 6.8.5.5 And did his head for bashfulnesse abase
                        > FQ 4.6.3.4 The armes he bore, his speare he gan abase
                        > FQ 6.6.31.9 He stayd his second strooke, and did his hand abase
                        > FQ 6.1.12.7 But through misfortune, which did me abase
                        > FQ 5.5.30.1 With that she turn'd her head, as halfe abashed
                        > FQ 6.4.30.7 All these our ioyes, and all our blisse abate
                        > FQ 4.8.1.7 With sufferaunce soft, which rigour can abate
                        > FQ 1.3.7.2 Quoth she, his princely puissance doth abate
                        > FQ 3.7.35.3 That at the last his fiercenesse gan abate
                        > FQ 4.8.17.8 That her inburning wrath she gan abate
                        > FQ 3.8.28.7 Ne ought your burning fury mote abate
                        > FQ 3.8.51.6 Mote not mislike you also to abate
                        > FQ 3.9.14.4 And both full liefe his boasting to abate
                        > FQ 4.9.34.6 Him selfe he bent their furies to abate
                        > FQ 4.3.26.6 Which when for want of breath gan to abate
                        > FQ 1.10.26.2 His daintie corse, proud humors to abate
                        > FQ 5.9.46.7 Which when as \Zele\ perceiued to abate
                        > FQ 4.2.50.2 To graunt her boone, and rigour to abate
                        > FQ 2.2.19.5 And th'=others pleasing seruice to abate
                        > FQ 5.12.19.1 So did the Faerie knight himselfe abeare
                        > FQ 6.9.45.1 Thus did the gentle knight himselfe abeare
                        > FQ 4.3.11.2 The meede of thy mischalenge and abet
                        > FQ 6.5.22.4 To reskue him, and his weake part abet
                        >
                        > I think the command you suggest sorts only on the last term of the
                        > line. In this sample I have sorted by first reversing the order of
                        > words in the line and then sorting and again reversing the order of
                        > words. Pretty much as suggested just now by someone else.
                        >
                        > Thanks,
                        >
                        > Julian
                        >
                        >
                        >
                        >
                        >
                        > On Sun, Sep 30, 2012 at 8:17 PM, Bee <fo...@...> wrote:
                        > > On Sep 30, 9:14 am, jbl <lethbri...@...> wrote:
                        > >> The problem is this: I have a large file of poetry in
                        > >> alphabetical order sorted on the last term in each line,
                        >
                        > > This will sort the lines by the last term:
                        >
                        > > sort ir /\w\+$/
                        >
                        > > :help :sort
                        >
                        > > Bill
                        >
                        > > --
                        > > You received this message from the "vim_use" maillist.
                        > > Do not top-post! Type your reply below the text you are replying to.
                        > > For more information, visithttp://www.vim.org/maillist.php
                        >
                        > --
                        > J.B. Lethbridge
                        > (Gen. Ed. The Manchester Spenser)
                        > English Seminar
                        > Tuebingen University
                        > WIlhelmstrasse 50
                        > Tuebingen
                        > 72074 Germany

                        " -------1---------2---------3---------4---------5---------6----
                        " Found time to play with this sort.
                        "
                        " The following vim function will sort
                        " the selected lines of poetry and
                        " put the result in the "a register.
                        "
                        " It is most likely much slower than Tim's python script
                        " but is is completely vim script.
                        "
                        " Does it do what you want?

                        function! SortPoems() range
                        let aaa = []
                        let current = a:firstline
                        while current <= a:lastline
                        let aaa = aaa + [reverse(split(getline(current)))]
                        let current = current + 1
                        endwhile
                        let sss = sort(aaa,1) " 1=ignore case

                        let @a = ""
                        let current = 0
                        while current < a:lastline - a:firstline
                        let @a = @a . join(reverse(sss[current])) . "\n"
                        let current = current + 1
                        endwhile
                        let @a = @a . join(reverse(sss[current]))
                        endfun " usage :'<,'>call SortPoems()<cr>

                        finish

                        " -------1---------2---------3---------4---------5---------6----
                        Raw:

                        6.4.30.7 All these our ioyes and all our blisse abate
                        2.12.15.9 And after them did driue with all her power and might
                        3.9.14.4 And both full liefe his boasting to abate
                        6.6.27.9 And layd at him amaine with all his will and might
                        6.1.38.2 At once did heaue with all their powre and might
                        6.1.12.7 But through misfortune which did me abase
                        5.11.57.9 Did set vpon those troupes with all his powre and might
                        6.2.26.5 For deare affection and vnfayned zeale
                        3.2.13.6 For hardy thing it is to weene by might
                        4.9.6.9 He her vnwares attacht and captiue held by might
                        6.1.32.9 He spide come pricking on with al his powre and might
                        6.6.31.9 He stayd his second strooke and did his hand abase
                        3.8.51.6 Mote not mislike you also to abate
                        3.8.28.7 Ne ought your burning fury mote abate
                        1.7.35.1 No magicke arts hereof had any might
                        5.8.46.8 She at her ran with all her force and might
                        1.10.2.8 She cast to bring him where he chearen might
                        3.7.35.3 That at the last his fiercenesse gan abate
                        4.8.17.8 That her inburning wrath she gan abate
                        1.10.47.7 That hill they scale with all their powre and might
                        4.6.3.4 The armes he bore his speare he gan abase
                        5.9.39.4 To all assayes; his name was called Zele
                        2.9.7.4 To serue that Queene with all my powre and might
                        2.1.26.7 When suddenly that warriour gan abace
                        6.12.23.9 Where he him found despoyling all with maine and might
                        1.5.1.8 With greatest honour he atchieuen might
                        4.8.1.7 With sufferaunce soft which rigour can abate
                        5.5.30.1 With that she turn'd her head as halfe abashed

                        " -------1---------2---------3---------4---------5---------6----
                        Result:

                        2.1.26.7 When suddenly that warriour gan abace
                        4.6.3.4 The armes he bore his speare he gan abase
                        6.6.31.9 He stayd his second strooke and did his hand abase
                        6.1.12.7 But through misfortune which did me abase
                        5.5.30.1 With that she turn'd her head as halfe abashed
                        6.4.30.7 All these our ioyes and all our blisse abate
                        4.8.1.7 With sufferaunce soft which rigour can abate
                        3.7.35.3 That at the last his fiercenesse gan abate
                        4.8.17.8 That her inburning wrath she gan abate
                        3.8.28.7 Ne ought your burning fury mote abate
                        3.8.51.6 Mote not mislike you also to abate
                        3.9.14.4 And both full liefe his boasting to abate
                        5.8.46.8 She at her ran with all her force and might
                        6.12.23.9 Where he him found despoyling all with maine and might
                        2.12.15.9 And after them did driue with all her power and might
                        6.1.32.9 He spide come pricking on with al his powre and might
                        5.11.57.9 Did set vpon those troupes with all his powre and might
                        2.9.7.4 To serue that Queene with all my powre and might
                        6.1.38.2 At once did heaue with all their powre and might
                        1.10.47.7 That hill they scale with all their powre and might
                        6.6.27.9 And layd at him amaine with all his will and might
                        1.7.35.1 No magicke arts hereof had any might
                        1.5.1.8 With greatest honour he atchieuen might
                        4.9.6.9 He her vnwares attacht and captiue held by might
                        3.2.13.6 For hardy thing it is to weene by might
                        1.10.2.8 She cast to bring him where he chearen might
                        6.2.26.5 For deare affection and vnfayned zeale
                        5.9.39.4 To all assayes; his name was called Zele

                        " -------1---------2---------3---------4---------5---------6----

                        --
                        You received this message from the "vim_use" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php
                      Your message has been successfully submitted and would be delivered to recipients shortly.