Functions for automatic document summary and keyword extraction