Computer-aided recovery and analysis of damage. Text documents