A Multi-Agent System for Hand-drawn Diagram Recognition