Sorry ... I couldn't wait for you to post the next chunk. It's an interesting question...

Good, that you didn't wait. I plan to enter next chunk in a few days rather than in a few hours. You have almost written that for me, because in a natural way thinking about the problem goes in direction 'probabilities', 'mostly used', etc. Let me answer this part in another meditation.

...and while reading it, I couldn't help thinking about LZW compression. I'm not sure if you're familiar with it or not...

Yes, I know about compression algorithms, maybe not in detail, but overall technology. It will help storing those all possibilities, no doubt. Made me think about another approach: offer common 2-, 3-letter long hints, e.g. 'thr', 'in', 'st'. But it won't work. Either I'll end learning to stenotype (and learning new alphabet/set of symbols) or spending time accepting offered hints. I mean, what is quicker: to choose from 'is', 'if', 'in' or just to write letter 'i' and letter 's'?

Something like: space would autocomplete the current word, tab would autocomplete the current "best guess".

Space is not a good thing to accept hint while typing text full of spaces. Rather Tab and Enter. But it's detail and matter of personal preference. One can make shortcuts configurable.

Regarding resource usage...

I think it is not yet time for bothering about resources. You are right, memory is cheap, CPUs fast. A propos, I 'discovered' what efficiency is needed for final solution: it depends on user's typing speed. If user types 10 CPM(chars per minute), algorithm should run 10 times per second, for me it will be ca. 40 CPM, if there is any 100CPM magician willing to use it, it would be nice to have it working with frequency 100/s. Tough constraint...

If you decide to start implementing it with this table-based idea, let me know, and I'll jot down my ideas for the data structure and such. Be sure to keep us apprised of this project, it sounds fun!

You can be sure I won't keep it hidden :) I want to split the fun to following parts:

('Project'? He called this a 'project'... I though I'll end up with one file, maybe 50 lines long?...)

P.S. How do you, people, do it?!? I mean, writing nodes so quick! It takes time to preview and format correctly and you give almost immediate (and so long!) response! Admit, you had this answer prepared for a few weeks and just waited for proper question... :)


In reply to Re^2: creating crystal ball by grizzley
in thread creating crystal ball by grizzley

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.