Algorithms for multimedia document processing