restrict relations to specific spans

122 views
Skip to first unread message

Alexis McClimans

unread,
May 19, 2020, 3:22:19 PM5/19/20
to inception-users
Hello all,

Is it possible to restrict relations to specific span features? Such that I could constrain the usage of particular relations, or direction of their arcs, to only go from one type to another?

Valid:
Person1 -> relation1 -> Organization1

Invalid:
Organization1 ->relation1 -> Person1


Thank you!

Richard Eckart de Castilho

unread,
May 25, 2020, 6:15:55 AM5/25/20
to inception-users
Hi,
I found this constraints rule on a relation type in one of our unit tests:

import de.tudarmstadt.ukp.dkpro.core.api.syntax.type.dependency.Dependency as DEPENDENCY;
DEPENDENCY {
Governor.pos.PosValue = "NN" & Dependent.pos.PosValue = "DET" -> DependencyType = "det";
}

The "Governor" and "Dependent" things are hard-coded and refer to the two ends of the relation - any relation, not only Dependency relations.

Cheers,

-- Richard


Reply all
Reply to author
Forward
0 new messages