Spaces:
Sleeping
Sleeping
| from __future__ import annotations | |
| # Directed etymology hops only. Cognacy is lateral (IE-CoR sets on the inspector), | |
| # not a parent→child edge type in the reverse-etymology graph. | |
| RELATIONS = [ | |
| "inherited", | |
| "derived", | |
| "borrowed", | |
| "calque", | |
| "clipping", | |
| "back_formation", | |
| "abbreviation", | |
| "compound", | |
| "blend", | |
| "other", | |
| ] | |
| REL_TO_CODE = {name: i for i, name in enumerate(RELATIONS)} | |
| DEFAULT_RELATIONS = list(RELATIONS) | |
| # Template names for n-ary compound/blend hyperedges (indexed as uint8). | |
| HYPER_TEMPLATE_VOCAB = ( | |
| "compound", | |
| "com", | |
| "affix", | |
| "af", | |
| "prefix", | |
| "pre", | |
| "suffix", | |
| "suf", | |
| "confix", | |
| "blend", | |
| "surf", | |
| "ety:af", | |
| "ety:blend", | |
| "etymon:af", | |
| "etymon:afeq", | |
| "etymon:blend", | |
| "etymon:redup", | |
| "etymon:univ", | |
| ) | |
| HYPER_TEMPLATE_TO_CODE = {n: i for i, n in enumerate(HYPER_TEMPLATE_VOCAB)} | |
| MACROAREAS = [ | |
| "", | |
| "Africa", | |
| "Australia", | |
| "Eurasia", | |
| "North America", | |
| "Papunesia", | |
| "South America", | |
| ] | |
| MACRO_TO_CODE = {name: i for i, name in enumerate(MACROAREAS)} | |