Jump to content


Photo

SC Seems To Be Ignoring Leading Colons in Text Strings


  • Please log in to reply
25 replies to this topic

#1 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 26 July 2010 - 04:55 PM

I’m also noticing another agonizing but constant gripe by SC. I’ve gone ahead and added several additional files with specific stuff in each. One is for BB smilie codes (for a different forum than RainMaker Research) and the other is for BB text formatting codes. The formatting codes seem to work fine but the smilie codes don’t seem to be recognized since they begin with a colon and some but not all end with a colon as well. Could it possibly be that I’ve defined them in the file with a leading space before the colon???

Whenever I type a smilie code SC gripes about the characters in the code but never gripes about the leading colon: such as --- :thumbsdown or :thumbsup In each case SC claims a misspelling and shows the thumbsdown or thumbsup text in the popup window but never includes the leading colon. So it’s either not recognizing the colon as part of the text string OR it’s not recognizing my file which I added the same way I did the other file which it does seem to properly recognize. :huh: For some reason, the smilies you have defined don’t seem to trigger SC. Hmmm, I wonder why??? :lol:

Is this another quirk of the parser you use in SC or is this a bug???

Is there anything you can do in the update you are working on to fix this problem????

Thanks for your time.
QuietOne

#2 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 26 July 2010 - 09:17 PM

Iím also noticing another agonizing but constant gripe by SC. Iíve gone ahead and added several additional files with specific stuff in each. One is for BB smilie codes (for a different forum than RainMaker Research) and the other is for BB text formatting codes. The formatting codes seem to work fine but the smilie codes donít seem to be recognized since they begin with a colon and some but not all end with a colon as well. Could it possibly be that Iíve defined them in the file with a leading space before the colon???

Whenever I type a smilie code SC gripes about the characters in the code but never gripes about the leading colon: such as --- :thumbsdown or :thumbsup In each case SC claims a misspelling and shows the thumbsdown or thumbsup text in the popup window but never includes the leading colon. So itís either not recognizing the colon as part of the text string OR itís not recognizing my file which I added the same way I did the other file which it does seem to properly recognize. :huh: For some reason, the smilies you have defined donít seem to trigger SC. Hmmm, I wonder why??? :lol:

Is this another quirk of the parser you use in SC or is this a bug???

Is there anything you can do in the update you are working on to fix this problem????

Thanks for your time.
QuietOne

Thanks for the report - this is closely related to the previous issue you raised, where parsing words from the surrounding whitespace (and subsequently checking them) behaves differently depending on whether you are ignoring Internet addresses or not. When Spell Catcher is ignoring Internet addresses, it includes forward slash "/", colon ":" and commercial at "@" as additional valid embedded characters when parsing. So your shorthands should work if the preference to ignore Internet addresses was selected. When it's deselected, those three characters are instead considered word separators.

For now, all I can recommend is to define your abbreviations without any leading punctuation at all, or with something like a '$', which gets treated the same regardless of the ignore Internet addresses preference.

Dealing with abbreviations that have leading/trailing punctuation characters is handled somewhat specially, as the linguistic engine's parser expects text without any surrounding whitespace. It will then (depending on various options passed to it) strip leading and trailing "gremlins", in a language-dependent way, before classifying and isolating the actual word that should be checked. Remember, this all has to work for 40 different languages, where rules can vary. This means everything from English to Hebrew to Arabic to Russian to Thai and more.

I think that properly addressing the basic issues with ignoring Internet addresses would likely give the behavior you're after.

#3 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 26 July 2010 - 10:33 PM

Thanks for the report - this is closely related to the previous issue you raised, where parsing words from the surrounding whitespace (and subsequently checking them) behaves differently depending on whether you are ignoring Internet addresses or not. When Spell Catcher is ignoring Internet addresses, it includes forward slash "/", colon ":" and commercial at "@" as additional valid embedded characters when parsing. So your shorthands should work if the preference to ignore Internet addresses was selected. When it's deselected, those three characters are instead considered word separators.

For now, all I can recommend is to define your abbreviations without any leading punctuation at all, or with something like a '$', which gets treated the same regardless of the ignore Internet addresses preference.

Dealing with abbreviations that have leading/trailing punctuation characters is handled somewhat specially, as the linguistic engine's parser expects text without any surrounding whitespace. It will then (depending on various options passed to it) strip leading and trailing "gremlins", in a language-dependent way, before classifying and isolating the actual word that should be checked. Remember, this all has to work for 40 different languages, where rules can vary. This means everything from English to Hebrew to Arabic to Russian to Thai and more.

I think that properly addressing the basic issues with ignoring Internet addresses would likely give the behavior you're after.

I currently have the Inet Address option under Spelling>>Checking deselected as per your previous advice and so it doesn’t recognize the smilie terms. Hmmm, seems as if I’m Da^&ed if I do and Da^&ed if I don’t! If I were to go in and redefine them using something like a $ instead of a colon as you suggest, the BB where I want to use them wouldn’t recognize the strings and therefore wouldn’t expand/substitute the smilie properly. So unfortunately that idea doesn’t help.

I guess it won’t matter either way whether or not I defined the smilies with both leading and trailing spaces so the BB would substitute them correctly. Can you confirm???

Thanks for filling me in on what your facing. I’ll report back in a day/two.

Later,
QuietOne

#4 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 26 July 2010 - 10:58 PM

I currently have the Inet Address option under Spelling>>Checking deselected as per your previous advice and so it doesnít recognize the smilie terms. Hmmm, seems as if Iím Da^&ed if I do and Da^&ed if I donít!


I know. Not great.

If I were to go in and redefine them using something like a $ instead of a colon as you suggest, the BB where I want to use them wouldnít recognize the strings and therefore wouldnít expand/substitute the smilie properly. So unfortunately that idea doesnít help.

I guess it wonít matter either way whether or not I defined the smilies with both leading and trailing spaces so the BB would substitute them correctly. Can you confirm???

Thanks for filling me in on what your facing. Iíll report back in a day/two.

Later,
QuietOne

Not sure why you're having a problem. Works for meÖ

Tell me the exact abbreviation and expansion you've defined.

I have a shorthand with abbreviation "$huh" and expansion ":huh:" (without quotes), and it works regardless of the ignore Internet addresses preference. Expansions can definitely contain leading and trailing spaces (just about anything, really), but abbreviations cannot.

#5 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 27 July 2010 - 12:52 AM

I know. Not great.


Not sure why you're having a problem. Works for me…

Tell me the exact abbreviation and expansion you've defined.

I have a shorthand with abbreviation "$huh" and expansion ":huh:" (without quotes), and it works regardless of the ignore Internet addresses preference. Expansions can definitely contain leading and trailing spaces (just about anything, really), but abbreviations cannot.

OK, wait a minute. I think maybe we’re talking at somewhat cross-purposes here. I think perhaps I’ve described what I’m doing incorrectly. I’m NOT defining the text strings for expansion, I’m defining them for Spell Correction so the $%^&* speller will shut up and not complain, not for text expansion.

I use Text Expander (SmileOnMyMac) for text expansion as it has several capabilities that SC doesn’t have when it comes to expanding abbreviations so I’ve turned the text expansion OFF in SC so they don’t clash. And what I define in SC, I DON’T define (at least w/ the same abbrev) in Text Expander and vice-versa.

I’ve added my file with the text strings in it to the SC>>References Pane and the file is located in the “Users/<username>/Application Support/Spell Catcher/Spell Catcher References/U.S. English - My BB Terms.learned“ file.

If I understand what you’ve done correctly, you’ve enabled the SC>>Interactive>>Shorthands Pane and defined them in the “Users/<username>/Application Support/Spell Catcher/Spell Catcher/References/U.S. English - My Shorthands.glossary“ file located in the same folder. If true, I suspect this is a very different approach than what I’ve done.

WRT the particular abbreviations I’m using, there are several as follows:

:wtf which, if it worked as advertised (i.e. stayed lowercase), would normally substitute a smilie w/ a large flag that unfurled and then refurled w/ the letters “WTF” on it (I think you can guess what it means :D ) but what actually happens is it gets text-substituted (since I also have WTF listed (w/o the colon) as an abbreviation in a spelling file and ends up as :WTF which fails to be substituted w/ the smilie.

I also have BOTH :thumbsdown and :thumbsup which each substitute a thumbsdown or thumbsup smilie respectively defined in the same spelling file which SC just gripes about it as a “Misspelling”. This of course requires me to cancel out the popup window and just slows me down.

:rofl which substitutes an animated smilie is also defined in the same file and also causes just a “Misspelling” popup window and associated slowdown.

:nono which subs an animated frowning smilie face wagging his finger also gripes about a “Misspelling” and ...

So as you can see, there is a pattern to it. If the text string (w/o the requisite colons) includes grammatically IN-correct spelling (i.e. wtf, nono, rofl, thumbsdown, thumbsup, etc.), then it gripes about a spelling error even when the colon is present, or sometimes substitutes an inappropriate spelling correction, but if the text string is grammatically CORRECT (w/ or w/o the requisite colons) (i.e. :D, ;), crazy, rant, cry, gag, help, etc.), it (SC) minds it’s own business and let’s me proceed w/o delaying me.

Please note that the smilie package I‘m attempting to define in the file and use on the other BB is NOT the same as the one you use here. The one on the other BB contains a larger set of smilies and many are animated.

Hope this gives you enough info to go on. If not, say so and I’ll amplify. :D B)
QuietOne

#6 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 27 July 2010 - 01:41 AM

OK, wait a minute. I think maybe we’re talking at somewhat cross-purposes here. I think perhaps I’ve described what I’m doing incorrectly. I’m NOT defining the text strings for expansion, I’m defining them for Spell Correction so the $%^&* speller will shut up and not complain, not for text expansion.

I use Text Expander (SmileOnMyMac) for text expansion as it has several capabilities that SC doesn’t have when it comes to expanding abbreviations so I’ve turned the text expansion OFF in SC so they don’t clash. And what I define in SC, I DON’T define (at least w/ the same abbrev) in Text Expander and vice-versa.

I’ve added my file with the text strings in it to the SC>>References Pane and the file is located in the “Users/<username>/Application Support/Spell Catcher/Spell Catcher References/U.S. English - My BB Terms.learned“ file.

If I understand what you’ve done correctly, you’ve enabled the SC>>Interactive>>Shorthands Pane and defined them in the “Users/<username>/Application Support/Spell Catcher/Spell Catcher/References/U.S. English - My Shorthands.glossary“ file located in the same folder. If true, I suspect this is a very different approach than what I’ve done.

WRT the particular abbreviations I’m using, there are several as follows:

:wtf which, if it worked as advertised (i.e. stayed lowercase), would normally substitute a smilie w/ a large flag that unfurled and then refurled w/ the letters “WTF” on it (I think you can guess what it means :D ) but what actually happens is it gets text-substituted (since I also have WTF listed (w/o the colon) as an abbreviation in a spelling file and ends up as :WTF which fails to be substituted w/ the smilie.

I also have BOTH :thumbsdown and :thumbsup which each substitute a thumbsdown or thumbsup smilie respectively defined in the same spelling file which SC just gripes about it as a “Misspelling”. This of course requires me to cancel out the popup window and just slows me down.

:rofl which substitutes an animated smilie is also defined in the same file and also causes just a “Misspelling” popup window and associated slowdown.

:nono which subs an animated frowning smilie face wagging his finger also gripes about a “Misspelling” and ...

So as you can see, there is a pattern to it. If the text string (w/o the requisite colons) includes grammatically IN-correct spelling (i.e. wtf, nono, rofl, thumbsdown, thumbsup, etc.), then it gripes about a spelling error even when the colon is present, or sometimes substitutes an inappropriate spelling correction, but if the text string is grammatically CORRECT (w/ or w/o the requisite colons) (i.e. :D, ;), crazy, rant, cry, gag, help, etc.), it (SC) minds it’s own business and let’s me proceed w/o delaying me.

Please note that the smilie package I‘m attempting to define in the file and use on the other BB is NOT the same as the one you use here. The one on the other BB contains a larger set of smilies and many are animated.

Hope this gives you enough info to go on. If not, say so and I’ll amplify. :D B)
QuietOne


Yeah, we're definitely talking about different things, here.

So you're using TextExpander to insert these smileys. What version of TE are you using?

If I try what I think you're doing, at least with TextExpander 3.1, Spell Catcher never signals an error when TE inserts an expansion because it simply doesn't "see" what TE "types" due to the technique it (TE) uses.

In general, if Spell Catcher signals an error, if you tell it to Learn that word, it won't consider it an error any more.

But I don't observe any of the behavior you're describing above at all. Obviously I'm not doing the same thing as you are, or we're using different versions of TE, or different applications where TE behaves differently.

Can you give me more info, software used, versions, exact steps to reproduce? Any relevant preferences or settings for TE and Spell Catcher?

You also refer to a "spelling file", and I'm not sure what that is - a Spell Catcher Learned Words file? A TextExpander file?

Feel free to upload a screenshot if you think it will help explain the problem.

#7 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 27 July 2010 - 11:55 AM

Yeah, we're definitely talking about different things, here.

So you're using TextExpander to insert these smileys. What version of TE are you using?

If I try what I think you're doing, at least with TextExpander 3.1, Spell Catcher never signals an error when TE inserts an expansion because it simply doesn't "see" what TE "types" due to the technique it (TE) uses.


No, I’m only using TE to expand other stuff. The only thing I’m using SC for is Spell Checking, so I’ve:
  • Defined the smilie codes used by the other forum (i.e. “ :thumbsdown “, etc) in a file I’ve added to the References pane; and
  • As I type the smilie codes when I type the trailing space (when SC is set to recognize & check each “word”) it does so but it crabs about my spelling! Arrrgggghhh!!! :rolleyes: ;
  • I’m not attempting to supply the expansions myself. I’m just trying to let the other forum do the substitutions as it normally does anyway when I click on the smilies themselves and let the forum insert the code instead of typing the code myself;
  • It, just like the RainMaker forum here, inserts smilie code into a post when the user clicks on a smilie. It inserts the colon preceded text string and then does the expansion/substitution when the user clicks the “Add/Reply” button.
So it’s (SC) acting as if the file I defined isn’t being honored as “learned” words when it crabs on my spelling. I dismiss the popup and go on (until the next time) and all is well. The expansion/substitution takes place fine when I post my reply, but I’m continually slowed down by the $%^&* “Misspelling” popup window jumping up every time I type a smilie code. You know what it’s like, “I can type the smilie code faster than I can switch from the kybd to the mouse; scroll to the appropriate spot; click on the smilie; and then move back to the kybd.”

I’ve also noticed another peculiar twist to this saga. If I type the smilie codes myself (i.e. start to finish), SC crabs about the spelling. If on the other hand either of the following two scenarios occur:
  • I click the smilie in the emoticons section of the post edit window and let the forum insert the same code; OR
  • If I type an extra space and then backspace one space and type the smilie code so the trailing space in effect already exists;
then in either case SC fails/refuses to crab at the spelling. I think it’s due to the fact that the code being inserted by the forum already has a trailing space included in the insertion text so it therefore doesn’t trigger SC’s spell checking mechanism like it does when I type the code myself.

In general, if Spell Catcher signals an error, if you tell it to Learn that word, it won't consider it an error any more.

True enough but what I can’t figure out is why it doesn’t recognize the words I’ve already added in the “learned” words file I’ve already added??? :huh:

But I don't observe any of the behavior you're describing above at all. Obviously I'm not doing the same thing as you are, or we're using different versions of TE, or different applications where TE behaves differently.

Not using TE for ANY of this at all.

Can you give me more info, software used, versions, exact steps to reproduce? Any relevant preferences or settings for TE and Spell Catcher?

You also refer to a "spelling file", and I'm not sure what that is - a Spell Catcher Learned Words file? A TextExpander file?

Feel free to upload a screenshot if you think it will help explain the problem.

Again, I’m NOT using TE to expand anything in this scenario. I merely use TE for OTHER stuff instead of using SC’s text expansion functionality since TE has a more robust text expansion capability.

Yes, a Spell Catcher Learned Words file (see screen cap). Will attach screen cap(s). Can only attach one (at least to this post due to size restrictions). Will try to upload two more (Interactive-Shorthands Pane (106Kb) & Spelling-Checking Pane (131Kb) to later post. If I can’t do that, I’ll send you a PM in hopes you’ll share an email addy to which I can forward the two remaining screen caps.



Hope this helps explain what I’m trying to do. Again, if not I’ll keep trying.
QuietOne

#8 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 27 July 2010 - 12:05 PM

I’ve tried to separately upload first one of the files and then the other with NO JOY! Forum says I don’t have enough capacity left. :o I also tried uploading the .learned files themselves (My BB Smilies.learned & My BB Terms.learned) but the forum wouldn’t let me do that either. :huh:

Finally decided to look on the RainMaker website for an email addy. Duh! :blush: Mailed a Stuffit Archive with all three screen caps and both .learned files to the feedback email address.

#9 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 27 July 2010 - 10:07 PM

Iíve tried to separately upload first one of the files and then the other with NO JOY! Forum says I donít have enough capacity left. :o I also tried uploading the .learned files themselves (My BB Smilies.learned & My BB Terms.learned) but the forum wouldnít let me do that either. :huh:

Finally decided to look on the RainMaker website for an email addy. Duh! :blush: Mailed a Stuffit Archive with all three screen caps and both .learned files to the feedback email address.

The problem appears to be that (many of) these Learned Words exist with leading and trailing space, and/or colon. However, when you add a new Learned Word, it (should!) be stripped of such punctuation (especially leading and trailing whitespace).

The question then becomes: exactly how did you manage to add these Learned Words? I tried a number of methods, but wasn't able to get the words added as they exist in your Learned Words file! The leading/trailing punctuation was always stripped (as expected). I tried adding manually (clicking the [+] button), drag & drop, copy/paste.

So how did you get the results you did?

What you should probably do is strip the white space from each Learned Word. This is actually really easy to do:
  • Open your "BB Smilies" Learned Words file (double click to edit it in Spell Catcher Preferences, References pane).
  • Edit > Select All
  • Spell Catcher > Services > Strip White Space (select beginning and end)
  • File > Save

The select the "Show Duplicates" checkbox in the toolbar, and note the words with a caution icon next to them. You can probably safely delete these duplicates. Note that if you hold down the option key while selecting Show Duplicates, all the conflicting ones will be selected. Hover the mouse over the Show Duplicates checkbox for more info.

You can try the same with the BB Terms Learned Words file, not sure whether you're having trouble with it as well.

#10 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 27 July 2010 - 11:52 PM

The problem appears to be that (many of) these Learned Words exist with leading and trailing space, and/or colon. However, when you add a new Learned Word, it (should!) be stripped of such punctuation (especially leading and trailing whitespace).

The question then becomes: exactly how did you manage to add these Learned Words? I tried a number of methods, but wasn't able to get the words added as they exist in your Learned Words file! The leading/trailing punctuation was always stripped (as expected). I tried adding manually (clicking the [+] button), drag & drop, copy/paste.

So how did you get the results you did?

:lol: :lol: :rolleyes:
Well, first off youíve gotta remember who your dealing with here. Iím an old retired systems programmer. I donít go ANYWHERE w/o my handy dandy programmerís editor! In this case -- BBEdit. So, how did I get the words into the .learned words file w/ the leading & trailing spaces???? My guess is that youíve already got your answer :lol: but ...
  • I went to the other forum and opened a post edit window;
  • Clicked on each and every smilie in the entire library one-at-a-time w/ a <carriage return> in between;
  • Selected the entire post and copied the entire thing <ctrl-c>;
  • Closed/exited the post w/o adding it to the forum;
  • Came back to BBEdit and pasted it into a skeleton copy of a .learned file (between the array begin/end array bound tags;
  • Block copied the formatting on each line (indentation, string tags AND in the case of the smilie codes ONLY - whitespace);
  • Saved the files w/ the names I wanted to use and copied them to the SC References folder; and
  • Finally added them to SC.
You see, I figured it would take far too long to do it one string at a time in SC so I just did it the quick way! BOTH Files! So not to fear Evan, SC works as advertised. It strips out the whitespace, IF itís given the opportunity. I just didnít give it the chance! :lol: :lol:

Now, why did I leave the whitespace in the strings??? Well, I reasoned that since each and every smilie NEEDED a leading & trailing space in order to be substituted properly by the forum software itself (since Iím NOT trying to do the substitutions myself, ONLY define the strings), why not include it in the definition of the text string??? So I did. The leading colons (and in a few cases, trailing ones as well) are required to designate which smilie is being inserted, just like the smilies here @ RainMaker. The BB text formatting codes donít require leading & trailing spaces to work correctly.

What you should probably do is strip the white space from each Learned Word. This is actually really easy to do:

  • Open your "BB Smilies" Learned Words file (double click to edit it in Spell Catcher Preferences, References pane).
  • Edit > Select All
  • Spell Catcher > Services > Strip White Space (select beginning and end)
  • File > Save

The select the "Show Duplicates" checkbox in the toolbar, and note the words with a caution icon next to them. You can probably safely delete these duplicates. Note that if you hold down the option key while selecting Show Duplicates, all the conflicting ones will be selected. Hover the mouse over the Show Duplicates checkbox for more info.

You can try the same with the BB Terms Learned Words file, not sure whether you're having trouble with it as well.

OK, I guess maybe the leading & trailing spaces are whatís causing the problems. Or at least thatís what it sounds like you think is at least a strong maybe. So Iíll go in and strip them out of the smilie code file). Not having any trouble with the forum text formatting code file (BB Terms.learned), but then I didnít save it with leading & trailing spaces in the strings.

Have you stopped laughing yet????? Just leave it to an industrious old codger of a coder (once a coder, always a coder) to come up with a way to game the system! :lol: :lol:

So does that answer your questions now???? If Iíve left anything out, just write back using my email addy from the Stuffit file. Donít want to give away too many trade secrets to the general populace.

Hope you had a good laugh. Iíll post back when I have a chance to verify what effect, if any, removing the spaces has.
Later,
QuietOne :lol:

#11 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 28 July 2010 - 12:24 AM

One quick update on removing the whitespace per your suggested method: Yes, it got rid of the spaces, but it also dumped ALL the colons! And that isnít whitespace. Thatís punctuation. You and SC may TREAT them (punctuation marks) as white space but they donít meet the grammatical definition of it. At least not according to Wikipedia. See the definition here: Whitespace Character

Suggest a few updates to the Services code as follows:
  • Change the Strip White Space command so it ONLY strips white space and doesnít trash the punctuation as well. Colons are required for the smilie definitions;
  • Add another option to the Services menu that strips punctuation; either those two, OR
  • Add a popup warning menu as a caveat to the Strip White Space command that warns the user about how SC treats punctuation. That :ninja: strip behavior, w/ the punctuation, isnít cool in the least. D@mn good thing I had a backup copy of my file!

Would have made me very mad if Iíd had to recreate the file from scratch since I canít remember which smilies have LEADING colons ONLY; which have Leading & Trailing colons; and which donít have any. I donít have all of them memorized, only the ones I use a lot but I do use them all from time/time. So thatís the reason Iím defining the smilies in the first place.

Anyway, will report back in a day/two after I have a chance to test it out without the whitespace in the definitions.

Thanks Evan for your time and advice,
QuietOne

#12 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 28 July 2010 - 12:42 AM

:lol: :lol: :rolleyes:
Well, first off youíve gotta remember who your dealing with here. Iím an old retired systems programmer. I donít go ANYWHERE w/o my handy dandy programmerís editor! In this case -- BBEdit. So, how did I get the words into the .learned words file w/ the leading & trailing spaces???? My guess is that youíve already got your answer :lol: but ...

  • I went to the other forum and opened a post edit window;
  • Clicked on each and every smilie in the entire library one-at-a-time w/ a <carriage return> in between;
  • Selected the entire post and copied the entire thing <ctrl-c>;
  • Closed/exited the post w/o adding it to the forum;
  • Came back to BBEdit and pasted it into a skeleton copy of a .learned file (between the array begin/end array bound tags;
  • Block copied the formatting on each line (indentation, string tags AND in the case of the smilie codes ONLY - whitespace);
  • Saved the files w/ the names I wanted to use and copied them to the SC References folder; and
  • Finally added them to SC.
You see, I figured it would take far too long to do it one string at a time in SC so I just did it the quick way! BOTH Files! So not to fear Evan, SC works as advertised. It strips out the whitespace, IF itís given the opportunity. I just didnít give it the chance! :lol: :lol:


OK, now I know how you managed to do what you did. Don't do that (obviously). Anyway, the format of Learned Words documents will be changing in the next (major) upgrade to Spell Catcher X to a Cocoa keyed archive. While these are binary plists that BBEdit and the like can open, they're not terribly human-readable, and definitely not human editable.

As for what you figured about adding multiple Learned Words at a time, that's always been possible. Select some text, drop it onto a Learned Words document window, or use Copy/Paste. Words are parsed out of the text and added. If the text is formatted such that each word or word pair is on a line by itself, they will be added as such (a single word, or word pair).

Drag and drop or cut/copy/paste between Learned Words document windows - useful for quickly re-organizing the content if you feel the need.

To quote a fellow Mac programmer, "Assumptions are evil".

Now, why did I leave the whitespace in the strings??? Well, I reasoned that since each and every smilie NEEDED a leading & trailing space in order to be substituted properly by the forum software itself (since Iím NOT trying to do the substitutions myself, ONLY define the strings), why not include it in the definition of the text string??? So I did. The leading colons (and in a few cases, trailing ones as well) are required to designate which smilie is being inserted, just like the smilies here @ RainMaker. The BB text formatting codes donít require leading & trailing spaces to work correctly.


OK, I guess maybe the leading & trailing spaces are whatís causing the problems. Or at least thatís what it sounds like you think is at least a strong maybe. So Iíll go in and strip them out of the smilie code file). Not having any trouble with the forum text formatting code file (BB Terms.learned), but then I didnít save it with leading & trailing spaces in the strings.

Have you stopped laughing yet????? Just leave it to an industrious old codger of a coder (once a coder, always a coder) to come up with a way to game the system! :lol: :lol:

So does that answer your questions now???? If Iíve left anything out, just write back using my email addy from the Stuffit file. Donít want to give away too many trade secrets to the general populace.

Hope you had a good laugh. Iíll post back when I have a chance to verify what effect, if any, removing the spaces has.
Later,
QuietOne :lol:

A laugh? More like a "yikes!".

If you hadnít sent me your Learned Words files, and I hadn't looked at them very carefully, I'd probably still be scratching my head.

#13 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 28 July 2010 - 01:03 PM

OK, now I know how you managed to do what you did. Don't do that (obviously). Anyway, the format of Learned Words documents will be changing in the next (major) upgrade to Spell Catcher X to a Cocoa keyed archive. While these are binary plists that BBEdit and the like can open, they're not terribly human-readable, and definitely not human editable.

Hmmm, so you're saying you're gonna wrap them in some variation on a DB (a Cocoa-keyed archive), huh???? Hmmmm ........ <_< I'm sure then that you are aware then that BBEdit even has a Hex Dump mode. Comes in handy from time/time. :rolleyes:;)

As for what you figured about adding multiple Learned Words at a time, that's always been possible. Select some text, drop it onto a Learned Words document window, or use Copy/Paste. Words are parsed out of the text and added. If the text is formatted such that each word or word pair is on a line by itself, they will be added as such (a single word, or word pair).

Drag and drop or cut/copy/paste between Learned Words document windows - useful for quickly re-organizing the content if you feel the need.

To quote a fellow Mac programmer, "Assumptions are evil".

Yeah, I agree. Especially when the standards aren’t followed/honored (i.e. what is/isn’t whitespace). They can be very evil but then one has to start somewhere. :) And given that I identified myself as a newby to SC in my first post, I'll grant ya that I have a lot to learn about it yet. Ways/Tricks to add multiple words simultaneously and that kind of hocus-pocus are just a few of the "tricks" I have yet to figure out ......... but give me time, just give me time.B)


A laugh? More like a "yikes!".

If you hadn't sent me your Learned Words files, and I hadn't looked at them very carefully, I'd probably still be scratching my head.


Was it THAT scary?????? I sent the files because I thought you might want to see them for yourself. I was in hopes you would look at them closely, and you did.B)

Like I said earlier, I'll test out the file w/o the leading & trailing spaces (but I’ve left the leading & trailing colons in) and see if that works and then report back.

Thanks again,
QuietOne

#14 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 04 August 2010 - 04:55 PM

Like I said earlier, I'll test out the file w/o the leading & trailing spaces (but I've left the leading & trailing colons in) and see if that works and then report back.

Thanks again,
QuietOne


Well Evan,

Reporting back as I said I would.

Removing the leading & trailing spaces doesn't seem to help any. I still get an annoying popup every time I enter the forum codes by typing them instead of using the code insertion buttons provided by the respective forums.

Seems the difference lies in the presence of a trailing space in the code inserted by the forums. If I type the code, I get the popup window claiming a "misspelling" when I try to enter the trailing space but when the codes are inserted by the forums (by pressing the buttons provided), I DON'T get the popup as the trailing space is inserted with the balance of the codes so SC never gets triggered. And even though I have the codes defined in a file, SC doesn't pay any attention to them! <_< The problem with using the buttons is that it takes so much longer to move my hand to the mouse; scroll to the button; click the mouse and then move my hand back to the kybd. I can type the codes faster than I can click 'em! :wacko:<_<

Hope this gives you enough data to formulate a fix.
Thanks,
QuietOne

#15 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 04 August 2010 - 07:28 PM

Well Evan,

Reporting back as I said I would.

Removing the leading & trailing spaces doesn't seem to help any. I still get an annoying popup every time I enter the forum codes by typing them instead of using the code insertion buttons provided by the respective forums.

Seems the difference lies in the presence of a trailing space in the code inserted by the forums. If I type the code, I get the popup window claiming a "misspelling" when I try to enter the trailing space but when the codes are inserted by the forums (by pressing the buttons provided), I DON'T get the popup as the trailing space is inserted with the balance of the codes so SC never gets triggered. And even though I have the codes defined in a file, SC doesn't pay any attention to them! <_< The problem with using the buttons is that it takes so much longer to move my hand to the mouse; scroll to the button; click the mouse and then move my hand back to the kybd. I can type the codes faster than I can click 'em! :wacko:<_<

Hope this gives you enough data to formulate a fix.
Thanks,
QuietOne

I really don't think anything needs fixing. I had no problems.

Can you email me your (new) Learned Words files?

#16 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 04 August 2010 - 08:05 PM

I really don't think anything needs fixing. I had no problems.

Can you email me your (new) Learned Words files?


Stuffed and en route to Feedback & Suggestions.
QuietOne

#17 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 04 August 2010 - 08:59 PM

Stuffed and en route to Feedback & Suggestions.
QuietOne

Did you follow my previous advice and use the Strip White Space Service to "clean up" those Learned Words?

Or did you modify them by hand again with BBEdit?

Using the Service should not only strip the white space, but also "sanitize" each Learned Word. This means the leading punctuation should be removed - i.e. those leading colons.

You need to remove those as well, then you should use the Show Duplicates feature to get rid of those words that are also in another reference.

#18 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 04 August 2010 - 09:19 PM

Did you follow my previous advice and use the Strip White Space Service to "clean up" those Learned Words?

Or did you modify them by hand again with BBEdit?

Using the Service should not only strip the white space, but also "sanitize" each Learned Word. This means the leading punctuation should be removed - i.e. those leading colons.

You need to remove those as well, then you should use the Show Duplicates feature to get rid of those words that are also in another reference.


When you talk about the leading colons, I assume you are talking about the leading colons in the BB smilies.learned file, but:

If I "sanitize" the files (meaning remove the leading colons) then it defeats the purpose for which I'm trying to use them, so Yes ... I used BBEdit. The codes that are used by the other BB's use leading colons for the emoticons. If I don't include the colons then the forum won't recognize the emoticon code and substitute the smiley for the code. But like I said, the difference is that IF I use the forum method by clicking on the button for the respective emoticon, then SC doesn't crab because the forum adds a leading & trailing space when it does the insert. If I type the emoticon code (faster method in some cases since I know the respective character sequence) then it crabs about a misspelled word.

What about the BB Terms.learned file??? It's not behaving either. And it acts/behaves in the same manner as the BB smilies.learned file.

QuietOne

#19 Evan Gross

Evan Gross

    Administrator

  • Admin
  • PipPipPip
  • 2,991 posts
  • Gender:Male
  • Location:Toronto, Canada
  • Interests:This Place!

Posted 04 August 2010 - 09:27 PM

When you talk about the leading colons, I assume you are talking about the leading colons in the BB smilies.learned file, but:

If I "sanitize" the files (meaning remove the leading colons) then it defeats the purpose for which I'm trying to use them, so Yes ... I used BBEdit. The codes that are used by the other BB's use leading colons for the emoticons. If I don't include the colons then the forum won't recognize the emoticon code and substitute the smiley for the code. But like I said, the difference is that IF I use the forum method by clicking on the button for the respective emoticon, then SC doesn't crab because the forum adds a leading & trailing space when it does the insert. If I type the emoticon code (faster method in some cases since I know the respective character sequence) then it crabs about a misspelled word.

What about the BB Terms.learned file??? It's not behaving either. And it acts/behaves in the same manner as the BB smilies.learned file.

QuietOne

Now I'm confused again. You say deleting the leading colon "defeats the purpose…".

I thought the purpose of adding these Learned Words was so that Spell Catcher wouldn't flag them as errors. Is there some other purpose that I'm not "getting"? What are your exact needs?

Did you edit out the colons with BBEdit (again, don't use an external editor!)? Did you at least Quit the Spell Catcher app before doing that?

And sure, when you click an icon to insert a smiley via the forum software, Spell Catcher won't even see that you did this (well, DirectCorrect will, Interactive checking won't). So it won't signal an error, as it has no idea this happened. Input methods rely on receiving keyboard events from the Mac OS. No keyboard events would be generated when you click to insert a smiley or other text.

#20 QuietOne

QuietOne

    Member

  • Members
  • PipPip
  • 20 posts
  • Gender:Male
  • Location:Texas, USA
  • Interests:Retired Systems Programmer/Consultant
    Reading, Hunting, Camping, Fishing

Posted 04 August 2010 - 11:31 PM

Now I'm confused again. You say deleting the leading colon "defeats the purposeÖ".

I thought the purpose of adding these Learned Words was so that Spell Catcher wouldn't flag them as errors. Is there some other purpose that I'm not "getting"? What are your exact needs?

Yes, we (You and I) are certainly missing a connection somewhere. But I'll continue to try ...

First, the Forums I'm posting on are not, repeat not RainMaker. They are other forums and use OTHER Forum software, primarily phpBB forum software. So the smiley codes that are used there are different from the smiley codes you use here.
Second, the smiley codes that I'm attempting to and wanting to use while different are also similar in that they too use leading colons and in some cases trailing colons as well - just like the smiley codes you use here.
Third, Yes the purpose is to add the words so that SC won't flag them as misspelled words (i.e. errors). But SC even crabs about misspellings when I type smiley codes for your own smilies such as : l o l : (see the screen cap) (Deliberately typed with spaces so it WOULDN'T substitute) The Forum Code (i.e. YOUR Board) also fails to substitute the smiley for the typed code IMMEDIATELY which is different than the way it works when I use the forum code insertion method. i.e. : P or : D or ^ _ ^ (i.e. ALL your boards codes but deliberately typed with spaces so they WON'T substitute). Forum method substitutes immediately while typed in method doesn't substitute until either Preview or Submission.

Attached File  lol.jpg   123.19KB   8 downloads

Did you edit out the colons with BBEdit (again, don't use an external editor!)? Did you at least Quit the Spell Catcher app before doing that?

Of course I quit SC before I edited the %^&* file! I even copied the file (as a backup) first as well. I'm NOT stupid.
Yes, I edited it using BBEdit and I did it because your stripping utility strips the $%^&* colons! and if I DON'T include the colons in the codes then the forums I use won't substitute the right smiley for the code! In fact, the forums won't recognize the code as a smiley for which it should substitute something at all. And THAT is the defeat of purpose I'm talking about!
So at least from where I sit and what I understand, the colons are necessary if I'm going to get SC to leave me alone AND achieve the results I'm attempting to achieve when I type a smiley code or a formatting code on those OTHER forums (if we talk about either the BB Terms.learned file or the BB Smilies.learned file).

***********************

What I think you may be missing, or perhaps don't realize, is that phpBB forum software (used on the other forums I'm having trouble with) acts completely different from the way IP Board software (the software you are using here) acts when it comes to substituting smilies and text formatting codes. IP Board software does the substitution IMMEDIATELY (or at least it is for me) upon code entry but phpBB inserts the actual codes (be they smiley or text formatting) into the text of the post itself that the User is typing. On a phpBB board the smiley codes or formatting codes are not, repeat not, substituted UNTIL the User either Previews their post or Submits their post. Not until that time does phpBB forum software substitute the respective symbols and formatting for the codes the User typed in their post. And even then, the Edit Box (where the post is being typed) is NEVER substituted with formatted text and/or smilies, either before or after Previewing. So you have to handle the codes (smiley and formatting) completely differently since in a phpBB forum, the codes are an actual part of the text string until post submission. You can't either hide them from the User or dispense with them immediately by substituting them for the symbols and formatting as appears to occur here using IP Board software.

NOTE: I could certainly be wrong about how IP Board software handles the codes as I haven't ever used it before but I'm only going on what I see happen.

Does this help any????

***********************

And sure, when you click an icon to insert a smiley via the forum software, Spell Catcher won't even see that you did this (well, DirectCorrect will, Interactive checking won't). So it won't signal an error, as it has no idea this happened. Input methods rely on receiving keyboard events from the Mac OS. No keyboard events would be generated when you click to insert a smiley or other text.


OK, well that explains that. Remember, I'm NOT a Mac programmer so I'm not familiar with the limitations and requirements of the Mac OS. I'm used to Unix, VMS and Windows.

Have I answered some of your concerns??? Remember, I'm using BBEdit because your utilities don't allow what I at least believe I need to do/define in order to get the results I'm after. Convince me that I can get the results I'm after w/o the colons etc. and I'll use your utilities.;)