1. A method comprising: receiving one or more documents that contain a first flow diagram in one or more diagram formats supported by the documents; automatically extracting from the first flow diagram one or more flow graphs comprising extracted nodes and edges; automatically extracting from the first flow diagram relational, geometric and textual features for the extracted nodes and edges; automatically learning rules to recognize process semantics based on the extracted nodes and edges, and the relational, geometric and textual features of the extracted nodes and edges, the rules configured as a decision tree; and automatically generating, based on the learned rules, process modeling recognition code to recognize and decide process semantics in a second flow diagram.