- May, 2008 (5)
- June, 2008 (2)
With a little Regular Expression, we can parse almost anything follow a predefined pattern.
Singapore Address is a good example for parsing data with regular expression. The code in this article is produce by me today, feel free to use it for your purpose.
I use PHP for my parser, but it can be port to any other language which support Regular Expression.
Today, I have a small task require a HTML Keyword Parser, the objective is to produce the meaningful keywords from HTML page, but I'm just done it with a very simple version. This very basic version just cut the long sentence into keywords, count how many time it appears and yes, calculate the keyword's density. As I told you, this is the simple version, but I think it suitable for who needs to count, calculate density of each SINGLE keyword in an article, paragraph.