Re: [bme-develop] Working emoticon code!
Status: Planning
Brought to you by:
sirmik
|
From: Sir M. <obe...@ho...> - 2004-04-13 09:34:29
|
Aloha...
grmf....took me a while to notice this email...hotmail decided it was
junk....:S
>Nice work!
>
>I will have a look at the code later. What are the window lengths for?
>Isn't it easier just to do a loop:
>for each emoticonString
> if BString::FindFirst(textToScan, emoticonString) != NULL
> addEmot
>loop
>
Yep that's easier....but a lot slower...if you scan the text like that you
have to:
-search through the entire text
-search through the entire emoticon list
No I'm doing something like this:
loop through text
loop through windowLengths
subString = text[currentPos, currentPos + windowLength]
Emoticon emot = findEmoticon(subString)
if not null
add to emoticon list(emot)
currentPos += windowLenght
currentPos++
Ok we still have to loop through the entire text...but that can't be
prevented....But! I implemented findEmoticon with a so called
binarySearch...this search has a complexity of (if I remember it correctly)
2 log n...and roughly has to search only half of the emoticons or even
less....this will be a great improvement in speed! therefore it's a bit more
complex...
>Sorry to say I've been very busy recently, so I've not managed to
>change the protocol code to use a bigger buffer yet. I may get round to
>it soon (although exams are now fast approaching, so I will be a bit
>busier for the next few months :s)
>
No problem! Well Daniel has fixed the bigger buffer, as you may have read in
his email...we'll see you back after your exams...oh I will see what I can
do about that news section!
regards,
Tim
_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl
|