You are here: algorithm to highlight required words in a paragraph « PHP Programming Language « IT news, forums, messages
algorithm to highlight required words in a paragraph

Posted by gomsi on 09/16/07 12:24

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 help please... asap..

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация