I have one custom website with code created 100% by me. I need to show at the end of the article 3 related articles. How can I do it? Is there any way to pickup the most 3 used words in the article and search based on that?
You need to first check keyword density and based on that you can show related articles. You can show related articles based on:
- Keyword density
- title matching
- tags matching
- category matching
That totally depends on the structure of your product base, your question is not detailed enough. I doubt working with keywords will bring good results - not if the product text you search is the usual descriptive blurb. Again, we can't tell because we don't know anything about your database.
The following comes to mind, though, when thinking about finding related items:
Item is related if....
- Is in same Category
- Is an accessoire / part / addition to the selected product
- Has been purchased together by a extraordinarily great number of customers
- Has been defined as "related" manually by the shop owner
TF*IDF
Pekka has a better idea in my opinion then the original answerer (But can still be improved). Keyword density has nothing to do with matching the same related articles in isolation.
I would add that TF*IDF is your BEST friend here. If you want truely related articles, then you should look up TF*IDF and try and implement your own working version. Its really simple.
http://en.wikipedia.org/wiki/Tf%E2%80%93idf
Once you can calculate what the most important terms are in your current article, you then find related articles which also have the same term frequency. It will allow you to accurately find related articles.