I want to read in an article from a text file,no shorter than 500 words using boost regex I want to locate and tag locations,like <Houston> and the print out the article with the locations tagged. I can use a list of common locations but I have to look at words before and after the locations to find uncoomon locations.so cities, states would be on the list but locations like "store " would be uncommon.I have never used boost regex. Any ideas at all? The program doesn't have to be perfect just a high percentage of correctness.
It's a text file copied from the net. It's a random file. I've got it to identify a word and highlight it but only because I've tried the whole word, in this case California. At least i know regex search and format works. I was wondering can regex search also use a list to search? Say i have a list of all states in a list, it will tag those.
yes exactly.At the same time, I cannot rely solely on the list. I have to try and see if there is a possible way to identify locations by the words that precede it as well as come after it.Thats a more daunting task but for now, searching a list to check if any of the words in it match a text file would be good. thanks for helping.