Note, however, that in a sequence prediction model we have no guarantee that our output structures form well-formed discourse trees.
we use the following heuristics to guarantee well-formed output structures: Heuristics The first three heuristics are enough to guarantee well-formed trees in practice: 1) If the first predicted label only contains closing parenthesis, we replace them by opening ones.