package iskra // Role histogram indices, pattern.mx RoleHist. const ( HistTopic = 0 HistSubject = 1 HistObject = 2 HistVerb = 3 HistModifier = 4 HistScope = 5 HistOperator = 6 HistComplement = 7 ) // Oblique roles. Language-independent thematic relations. const ( ORNone uint8 = 0 ORGoal uint8 = 1 ORLoc uint8 = 2 ORSource uint8 = 3 ORLimit uint8 = 4 ORInstr uint8 = 5 ORComit uint8 = 6 ORBenef uint8 = 7 ORAgent uint8 = 8 ORRecip uint8 = 9 ORPart uint8 = 10 ORCompare uint8 = 11 ) // Modification kinds. A SetEntry with Head=-1 is a top-level argument; // otherwise it modifies the entry at Head. const ( MKNone uint8 = 0 MKPoss uint8 = 1 MKAttr uint8 = 2 MKCop uint8 = 3 MKAdv uint8 = 4 MKCoord uint8 = 5 MKRel uint8 = 6 MKApp uint8 = 7 MKAdj uint8 = 8 ) // Clause relations. const ( ClauseRoot = 0 ClauseAnd = 1 ClauseOr = 2 ClauseBut = 3 ClauseIf = 4 ClauseBecause = 5 ClauseRel = 6 ) // RoleEquiv is the cross-language role equivalence used for atom alignment: // Topic counts as Subject on the first pass. func RoleEquiv(a, b int32) bool { if a == b { return true } return normalizeRole(a) == normalizeRole(b) } func normalizeRole(r int32) int32 { if r == HistTopic { return HistSubject } return r }