I agree. I'd put it a little more like:
s => {
next => 't'
nearPrev => 'qr'
nearNext => 't'
}
With the size of the nearPrev and nearNext dependant on the letters. M would be in the whole "lmnop" cluster.
For numbers, I would also have a "prev" which is undefined for letters.
Now, I've found all of this facinating (really!), but how can use something like this? We've talked about associations for numbers, letters, and words.
One interesting project would be a Perl program that plays word association, and learns from playing with others. Instead of just a "next", it would be most interesting to me if it had a "context" it tried to stay in (usually) also.
Well, I've got a weekend in front of me...
=Blue
...you might be eaten by a grue...
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.