Jump to content


Photo

SC Seems To Be Ignoring Leading Colons in Text Strings


  • Please log in to reply
25 replies to this topic

#21 Evan Gross

Evan Gross

    Administrator

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

Posted 05 August 2010 - 12:02 AM

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.




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).

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.;)

Well, like I keep saying - don't use BBEdit to modify the files. The colon MUST be stripped - Spell Catcher will properly "sanitize" any Learned Words you add/edit so that they will work properly. And it's less prone to error (the entries for arrow, cry, idea, lol, mad, mrgreen, oops, roll, shock and twisted all still have trailing colons in your file).

Take a look at the screenshots you uploaded. The word that's being flagged as an error is "lol" - no leading or trailing colons. So "lol" is the word you need to learn to prevent Spell Catcher from considering it an error.

So try what I suggested again:
  • Open your smilies Learned Words file in Spell Catcher (not BBEdit!).
  • Edit > Select All.
  • Spell Catcher > Services > Strip White Space (beginning and end)
  • (Optional, but recommended) Option-click "Show Duplicates", delete all the selected words.
  • Save and Close.
Should work - unless I *still* don't understand the issue. If that's the case, maybe we should use iChat's screen sharing and you can demonstrate what it is you're doing.

#22 QuietOne

QuietOne

    Member

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

Posted 05 August 2010 - 12:47 AM

Well, like I keep saying - don't use BBEdit to modify the files. The colon MUST be stripped - Spell Catcher will properly "sanitize" any Learned Words you add/edit so that they will work properly. And it's less prone to error (the entries for arrow, cry, idea, lol, mad, mrgreen, oops, roll, shock and twisted all still have trailing colons in your file).

Take a look at the screenshots you uploaded. The word that's being flagged as an error is "lol" - no leading or trailing colons. So "lol" is the word you need to learn to prevent Spell Catcher from considering it an error.

So try what I suggested again:

  • Open your smilies Learned Words file in Spell Catcher (not BBEdit!).
  • Edit > Select All.
  • Spell Catcher > Services > Strip White Space (beginning and end)
  • (Optional, but recommended) Option-click "Show Duplicates", delete all the selected words.
  • Save and Close.
Should work - unless I *still* don't understand the issue. If that's the case, maybe we should use iChat's screen sharing and you can demonstrate what it is you're doing.


Yes, I see that it's crabbing about "lol" rather than lol w/ leading & trailing colons, but answer me this: Given that the smiley code (both your forum's and the one I'm trying to define) has BOTH leading AND trailing colons as part of the smiley code itself, are you saying that if I strip the colons (both of them) from the file that SC will ignore them (both colons) when I type the five characters the leading colon; immediately followed by lol; and that immediately followed by a trailing colon???

I'll try it (via your method) but I'm going to save a backup copy before I do it - JIC.

#23 Evan Gross

Evan Gross

    Administrator

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

Posted 05 August 2010 - 12:56 AM

Yes, I see that it's crabbing about "lol" rather than lol w/ leading & trailing colons, but answer me this: Given that the smiley code (both your forum's and the one I'm trying to define) has BOTH leading AND trailing colons as part of the smiley code itself, are you saying that if I strip the colons (both of them) from the file that SC will ignore them (both colons) when I type the five characters the leading colon; immediately followed by lol; and that immediately followed by a trailing colon???

I'll try it (via your method) but I'm going to save a backup copy before I do it - JIC.

YES, when Spell Catcher (well, Proximity's parser) parses words for spell checking purposes, it strips leading and trailing punctuation, except trailing periods. So when you type ":lol:", it checks the parsed word - "lol". If "lol" is in a word list, it will be considered a correct spelling.

Spell Catcher’s Learned Words editor does whatever cleanup is necessary so a word you Learn/add/edit will "match" the result of this parsing (and therefore be considered as correct).

There are some considerations, like the case of a learned word, and whether it has a trailing period. See this table in the Help Book (scroll down a bit).

#24 QuietOne

QuietOne

    Member

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

Posted 05 August 2010 - 01:22 AM

YES, when Spell Catcher (well, Proximity's parser) parses words for spell checking purposes, it strips leading and trailing punctuation, except trailing periods. So when you type ": l o l :", it checks the parsed word - "lol". If "lol" is in a word list, it will be considered a correct spelling.


OK! That clears up a whole lot then! I'm used to parsing strings from front-back and taking each character in turn until I get a match, and then trying to match an even longer string before I accept the first match I found. That means that a leading colon has to be dealt with as part of whatever I'm parsing until I can match some string that begins with a colon. In other words, Proximity's parser works wholly differently than I am used to a parser working. Thus part of (and maybe the majority) of my stubbornness!

Now yes, I'm also used to reading and discarding certain characters too but not necessarily when those characters are part and parcel of the token/symbol I'm trying to match! (i.e. ": l o l :") As I'm sure you are aware, there are several different theories on matching tokens, as I alluded to above. One is the minimal match (shortest/first possible match) and the other is the maximal match (longest possible match). Most, if not the vast majority, of what I've done over the years is maximal match parsing. I guess old habits die very very hard! :D

Thanks for hanging in there with me. Will give it a try and see what happens.

BTW, The "Services>Strip White Spaces" command wasn't available to me. I opened SC to the References tab and double clicked the Smilies file; then selected All; and went to the Services menu but all it gave me was "Services>Building". It never stopped "building". So I had no choice but to use BBEdit. Anyway, I've stripped all the leading AND trailing colons AND deleted the duplicates. Now when I open & edit the file in SC it does NOT show ANY colons at all. Not sure why the Services option failed but we'll see what happens with the file now.

Thanks again and give me a couple days to a week to test it out and I'll report back again.

There's still the matter of the formatting codes to figure out but one thing at a time.

Later,
QuietOne :D

#25 Evan Gross

Evan Gross

    Administrator

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

Posted 05 August 2010 - 01:30 AM

OK! That clears up a whole lot then! I'm used to parsing strings from front-back and taking each character in turn until I get a match, and then trying to match an even longer string before I accept the first match I found. That means that a leading colon has to be dealt with as part of whatever I'm parsing until I can match some string that begins with a colon. In other words, Proximity's parser works wholly differently than I am used to a parser working. Thus part of (and maybe the majority) of my stubbornness!

Now yes, I'm also used to reading and discarding certain characters too but not necessarily when those characters are part and parcel of the token/symbol I'm trying to match! (i.e. ": l o l :") As I'm sure you are aware, there are several different theories on matching tokens, as I alluded to above. One is the minimal match (shortest/first possible match) and the other is the maximal match (longest possible match). Most, if not the vast majority, of what I've done over the years is maximal match parsing. I guess old habits die very very hard! :D


Remember, it's a linguistic parser whose purpose is to help isolate individual words from surrounding text. Nothing like the parsers you've worked on.

Thanks for hanging in there with me. Will give it a try and see what happens.

BTW, The "Services>Strip White Spaces" command wasn't available to me. I opened SC to the References tab and double clicked the Smilies file; then selected All; and went to the Services menu but all it gave me was "Services>Building". It never stopped "building". So I had no choice but to use BBEdit. Anyway, I've stripped all the leading AND trailing colons AND deleted the duplicates. Now when I open & edit the file in SC it does NOT show ANY colons at all. Not sure why the Services option failed but we'll see what happens with the file now.


See this FAQ.

Thanks again and give me a couple days to a week to test it out and I'll report back again.

There's still the matter of the formatting codes to figure out but one thing at a time.

Later,
QuietOne :D


I think you'll figure it out now…

#26 QuietOne

QuietOne

    Member

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

Posted 05 August 2010 - 12:08 PM

Remember, it's a linguistic parser whose purpose is to help isolate individual words from surrounding text. Nothing like the parsers you've worked on.



See this FAQ.



I think you'll figure it out now…


Yes, I fully agree. It is a different breed of parser than I'm used to. Therein lies (ahem! laid) the rub! :rolleyes: It has a more specific purpose and use than the parsers I'm used to. But then the parsers I'm used to can be customized to almost any purpose where a linguistic parser isn't as flexible.

Services is now working but I didn't change ANYTHING, not one check box, in the Services menu/pref pane. I also didn't have the Services>Preferences option on the Services Menu before. The ONLY option I had was Services><building> and it never "Stopped" <building>. Grrr

At any rate ..... Thanks for hanging in. Seems to be working (as advertized) :rolleyes::blush:

Now to see what's wrong with the other file (BB Terms.learned).

Later,
QuietOne