Reimplemented hypergraph for parsing