string combination

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jaysome

    #16
    Re: string combination

    On Thu, 17 Apr 2008 18:05:41 -0400, CBFalconer wrote:
    jaysome wrote:
    >CBFalconer <cbfalconer@yah oo.comwrote:
    >>Bartc wrote:
    >>>>
    >>>... snip ...
    >>>>
    >>>It also generates anagrams of course rather than just all the
    >>>combinatio ns of the letters.
    >>>>
    >>>It could also have done with small.dict rather than big.dict.
    >>>
    >>This generates full anagrams.
    >>
    >jumble support@aol.com
    >>
    >This outputs lines of text indefinitely.
    >>
    >Is that a bug or a feature?
    >
    You want all anagrams of a 15 char word? That will take a while. It
    will generate about 1.3e12 words. That is 1.3 million million words!
    >
    Try it on shorter words, or limit the output length. e.g: "jumble gupp"
    and "jumble gupp 3". Also try redirecting output to a file so you can
    read the initial line to stderr.
    I feel like an idiot. Your program deals with anagrams, but somehow I
    thought it dealt with palindromes. My bad.

    Sorry,
    --
    jay

    Ubuntu is the modern, open source operating system on Linux for the enterprise server, desktop, cloud, and IoT.



    Comment

    • Bartc

      #17
      Re: string combination


      "CBFalconer " <cbfalconer@yah oo.comwrote in message
      news:4807C9B5.4 790AD84@yahoo.c om...
      jaysome wrote:
      >CBFalconer <cbfalconer@yah oo.comwrote:
      >>Bartc wrote:
      >>>>
      >>>... snip ...
      >>>>
      >>>It also generates anagrams of course rather than just all the
      >>>combinatio ns of the letters.
      >>>>
      >>>It could also have done with small.dict rather than big.dict.
      >>>
      >>This generates full anagrams.
      >>
      >jumble support@aol.com
      >>
      >This outputs lines of text indefinitely.
      >>
      >Is that a bug or a feature?
      >
      You want all anagrams of a 15 char word? That will take a while.
      It will generate about 1.3e12 words. That is 1.3 million million
      words!
      That would be permutations of all the letters.

      I thought anagrams would be all words and phrases that could be made from
      the letters, with each word being meaningful.

      For that it would need input in the form of a dictionary.

      And I don't think the combinations would be anything like 1.3 trillion.
      (Unless you allow each letter of the alphabet to be a word, but then the
      combinations I /think/ might be more than 15! because of introducing up to
      14 spaces into the results)

      --
      Bart


      Comment

      • CBFalconer

        #18
        Re: string combination

        Bartc wrote:
        "CBFalconer " <cbfalconer@yah oo.comwrote in message
        >jaysome wrote:
        >>CBFalconer <cbfalconer@yah oo.comwrote:
        >>>Bartc wrote:
        >>>>>
        >>>>... snip ...
        >>>>>
        >>>>It also generates anagrams of course rather than just all the
        >>>>combination s of the letters.
        >>>>>
        >>>>It could also have done with small.dict rather than big.dict.
        >>>>
        >>>This generates full anagrams.
        >>>
        >>jumble support@aol.com
        >>>
        >>This outputs lines of text indefinitely.
        >>>
        >>Is that a bug or a feature?
        >>
        >You want all anagrams of a 15 char word? That will take a while.
        >It will generate about 1.3e12 words. That is 1.3 million million
        >words!
        >
        That would be permutations of all the letters.
        >
        I thought anagrams would be all words and phrases that could be
        made from the letters, with each word being meaningful.
        >
        For that it would need input in the form of a dictionary.
        >
        And I don't think the combinations would be anything like 1.3
        trillion. (Unless you allow each letter of the alphabet to be a
        word, but then the combinations I /think/ might be more than 15!
        because of introducing up to 14 spaces into the results)
        Then you haven't look at the program. Here are a couple of aliases
        that I use to cut the output down to something usable:

        [1] c:\c\ggets>alia s jumble
        \c\jumble\jumbl e %1& | sort | uniq | pr -a -T --columns=8

        [1] c:\c\ggets>alia s jumspell
        c:\c\jumble\jum ble %1& | sort | uniq | comm -1 -2 -
        \djgpp\share\di ct\words

        Of course you need to have sort, uniq, comm, pr programs available.

        --
        [mail]: Chuck F (cbfalconer at maineline dot net)
        [page]: <http://cbfalconer.home .att.net>
        Try the download section.

        ** Posted from http://www.teranews.com **

        Comment

        • Bartc

          #19
          Re: string combination


          "CBFalconer " <cbfalconer@yah oo.comwrote in message
          news:4808A0C8.D 206D646@yahoo.c om...
          Bartc wrote:
          >"CBFalconer " <cbfalconer@yah oo.comwrote in message
          >>jaysome wrote:
          >>>CBFalconer <cbfalconer@yah oo.comwrote:
          >>>>Bartc wrote:
          >>>>>>
          >>>>>... snip ...
          >>>>>>
          >>>>>It also generates anagrams of course rather than just all the
          >>>>>combinatio ns of the letters.
          >>>>>>
          >>>>>It could also have done with small.dict rather than big.dict.
          >>>>>
          >>>>This generates full anagrams.
          >>>>
          >>>jumble support@aol.com
          >>>>
          >>>This outputs lines of text indefinitely.
          >>>>
          >>>Is that a bug or a feature?
          >>>
          >>You want all anagrams of a 15 char word? That will take a while.
          >>It will generate about 1.3e12 words. That is 1.3 million million
          >>words!
          >>
          >That would be permutations of all the letters.
          >>
          >I thought anagrams would be all words and phrases that could be
          >made from the letters, with each word being meaningful.
          >>
          >For that it would need input in the form of a dictionary.
          Then you haven't look at the program. Here are a couple of aliases
          that I use to cut the output down to something usable:
          I've looked at it briefly. But I've run it. And it produces permutations!

          I doubt whether passing the output through all those filters can produce
          true multi-word anagrams (although I don't know what comm does; I have a
          feeling it chooses only those words in a dictionary, in that case yes it
          would generate single-word anagrams)

          BTW your usage message assumes the program is called 'jumble'.

          --
          Bart


          Comment

          • CBFalconer

            #20
            Re: string combination

            Bartc wrote:
            "CBFalconer " <cbfalconer@yah oo.comwrote in message
            >Bartc wrote:
            >>"CBFalconer " <cbfalconer@yah oo.comwrote in message
            >>>jaysome wrote:
            >>>>CBFalcone r <cbfalconer@yah oo.comwrote:
            >>>>>Bartc wrote:
            >>>>>>>
            >>>>>>... snip ...
            >>>>>>>
            >>>>>>It also generates anagrams of course rather than just all the
            >>>>>>combinati ons of the letters.
            >>>>>>>
            >>>>>>It could also have done with small.dict rather than big.dict.
            >>>>>>
            >>>>>This generates full anagrams.
            >>>>>
            >>>>jumble support@aol.com
            >>>>>
            >>>>This outputs lines of text indefinitely.
            >>>>>
            >>>>Is that a bug or a feature?
            >>>>
            >>>You want all anagrams of a 15 char word? That will take a
            >>>while. It will generate about 1.3e12 words. That is 1.3
            >>>million million words!
            >>>
            >>That would be permutations of all the letters.
            >>>
            >>I thought anagrams would be all words and phrases that could be
            >>made from the letters, with each word being meaningful.
            >>>
            >>For that it would need input in the form of a dictionary.
            >>
            >Then you haven't look at the program. Here are a couple of
            >aliases that I use to cut the output down to something usable:
            >
            I've looked at it briefly. But I've run it. And it produces
            permutations!
            >
            I doubt whether passing the output through all those filters can
            produce true multi-word anagrams (although I don't know what comm
            does; I have a feeling it chooses only those words in a dictionary,
            in that case yes it would generate single-word anagrams)
            sort, uniq, comm, pr are standard Unix or Linux programs, and are
            also available on Winders under djgpp. In particular:

            [1] c:\c\ggets>comm --help
            Usage: c:/djgpp/bin/comm.exe [OPTION]... LEFT_FILE RIGHT_FILE
            Compare sorted files LEFT_FILE and RIGHT_FILE line by line.

            -1 suppress lines unique to left file
            -2 suppress lines unique to right file
            -3 suppress lines unique to both files
            --help display this help and exit
            --version output version information and exit

            Report bugs to <bug-textutils@gnu.o rg>.

            It compares the input file (stdin) to the specified file, and
            outputs items that are common to both.

            --
            [mail]: Chuck F (cbfalconer at maineline dot net)
            [page]: <http://cbfalconer.home .att.net>
            Try the download section.


            ** Posted from http://www.teranews.com **

            Comment

            • santosh

              #21
              Re: string combination

              CBFalconer wrote:

              <snip>
              sort, uniq, comm, pr are standard Unix or Linux programs, and are
              also available on Winders under djgpp.
              <snip>

              Another option is:

              <http://unxutils.source forge.net/>

              Comment

              Working...