Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Toy Python program illustrating the vector space model of documents
Latest commit 6042bc6 @mnielsen Refactoring.
Failed to load latest commit information.
documents Refactoring and bug fixes.
.gitignore First commit. Refactoring, and added Refactoring.

The vector space model for documents

The program implements a toy search engine to illustrate the vector space model for documents.

The program asks you to enter a search query, and then returns all documents matching the query, in decreasing order of cosine similarity, according to the vector space model.

The document corpus consists of just four documents, which are product descriptions of popular books, taken from

Something went wrong with that request. Please try again.