computing resources such that the number can be chosen according to the applications being sought in special situations when the database is very small as in the example discussed hereinafter the restriction may be removed allowing a word or phrase even it if appears only once in the database to effectively deal with morphological term variants of natural language a stemming process is essential not only to reduce the size of indexing files but also to improve the efficiency of information retrieval ir a stemming algorithm needs be implemented before the term index can be set up while many stemming algorithms are available currently there is relatively little difference between them as far as the final retrieval performance is concerned a preferred embodiment of the present invention uses an affix removal stemmer by porter named porter algorithm m f porter u201c an algorithm for suffix stripping u201d program vol 14 no 3 pp 130 137 1980 suppose the terms that appear in the documents are selected and listed as t 1 t 2 t m each document in the collection is preprocessed and assigned with a document vector as a 1 a 2 a m where a 1 f 1 u00d7 g 1 where f i is the number of times the term t 1 appears in an expression of the document and g i is a global weight of all the documents which is a parameter indicating the importance of the term in representing the documents local weights may be either raw occurrence counts boolean or logarithm of occurrence count global weighting may be no weighting uniform.