Alex Rivera | Logout

search 25 000 words within a text

Asked 2008-09-30T18:35:55.163
17

I need to find occurrences of ~ 25 000 words within a text. What is the most suitable algorithm/library for this purpose?

target language is C++

Edit
Report

1 Answer

12

build a hashtable with the words, and scan throuhgt the text, for each word lookup in the wordtable and stuff the needed info (increment count, add to a position list, whatever).

answered 2008-09-30T18:39:09.633

Your Answer