Afficher un message
Vieux 16/09/2007, 13h24   #1
gomsi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut algorithm to highlight required words in a paragraph

hi,

i have a paragraph where i have to insert <mark> and </mark> tags to
highlight the required words.i am implementing it in c++ i am
currently doing it as follows..

i take the corresponding position at which the word occurs within the
paragraph and the word length and store it in a map(STL)..and start
inserting the tags after i scan the paragraph for the words....
although it works fine for larger words problem occurs when the word
to be marked are like "bidder dd d"..the tags start overlapping and
become mixed up within the paragraph.. can someone provide a good
algorithm and please... asap..

  Réponse avec citation
 
Page generated in 0,04320 seconds with 9 queries