Implement method for analyze document.