A Fundamental Algorithm for Dependency Parsing