1. A memory-efficient implementation of sparse vectors using hash tables, said implementation representing the occurrence of words in a collection of documents, wherein: said sparse vectors are hash tables of integer-number pairs, said hash tables has keys as its indices, a unique word identifier as its primary key, a unique document identifier as its secondary key, and values as its entries, said values are non-null if a given word occurs in a document, modification of values occur in constant time, operations on vectors occur in linear time as appropriate, and total memory consumption being linear with respect to the number of nonzero values.