An Algorithm for Semantic Coordination