Author Topic: Tooltip discussion  (Read 784 times)

Offline Raklet

  • Technical Guild
  • Evaluator
  • *****
  • Posts: 1129
Tooltip discussion
« on: July 08, 2009, 01:50:15 PM »
Here is the current behavior of the tooltip system.  Let me know if you would like to see any change in the behavior.

Tooltips only show in the message body of forum posts.  This does not include PMs.  Only posts.  Every single message is parsed on the fly and compared to a database of keywords.  The keywords are searched on the premise of word boundaries.  This means that the word and only the whole and complete word is looked for.  If a word is found, then the message is automatically modified to display the word as a link along with its corresponding tooltip.  Letter case is ignored when looking for words, but the case of the word displayed in the modified message is dependent upon how it was entered in the tooltip database.  Currently, all entered keywords are converted to upper case by the program.  So, a word can be lower cased in the message, but will always appear to be upper case.  See examples below.  I've had to put spaces in between the letters so that the word is not detected and displayed as a tooltip.

Examples:

Take the keyword "F A" for example.  F A, f a, F a, f A will all be detected as tooltips.  I have typed them here with exactly the case as explained before, but you will see that they are all now upper case: FA, fa, Fa, fA.  But those same letters will not be detected if they occur in another word - like "FAlse".  Word boundaries require that the word stand on its own.  However, things like apostrophes are considered word boundaries, so "I had many FA's" will be detected but not "I had many FAs".


Problems:

There will be some problems with this method of implementation.  Namely, it will be false positives.  For example, the word "h i" will always be shown as a tooltip - HI.  Also there could be acronym conflicts when one person intends it to be a certain context while the system only knows the context programmed into it.  For example, "I walked by a church in my dream.  It was a Mormon (LDS) church".  This will tell you that it was a "lucid dreaming supplement" instead of "Latter Day Saint".

If anyone has ideas on how to improve any of this, let me know.

Raklet

Offline The Littlest Leaf Dragon

  • Alis Volat Propriis
  • Teacher's Guild
  • Evaluator
  • *****
  • Posts: 2350
Re: Tooltip discussion
« Reply #1 on: July 08, 2009, 06:00:36 PM »
I'm not sure of any one shot method of correcting that problem (and LD4all has it all over the place), but depending on how the script is set up, you might be able to set exceptions as they come up.  Like: DO == Dream Object, but not 'do' or 'DO something' or 'DO it'.  Depending on how things are set up, that might be more trouble than it's worth, especially considering that unless someone mouses over it there isn't any obvious way to tell that something's been translated into a tooltip.

Also, you may want to go back and check the definition for DILD, I think it's messed up and causing things to show that shouldn't in posts.

Offline pj

  • Learning.
  • Technical Guild
  • Evaluator
  • *****
  • Posts: 14179
  • We are made of such stuff as dreams are made of.
Re: Tooltip discussion
« Reply #2 on: July 08, 2009, 06:15:38 PM »
I already dropped you an email about this. . . server loads seem well within normal limits, but there seems to be a rather pronounced lag in loading all pages now while my browser is "connecting to localhost".

Also, perhaps simply making a set of escape tags available to not parse acronyms might be a solution to that whole thing.
What truly matters is not built of right and wrong; but of grace, and of love.

--pj