File size: 299 Bytes
ed6bec6
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# generator/fallback.py

def encode_fallback(term: str):
    """
    Returns the three Glyphic representations for an undefined term.
    """
    upper = term.upper()

    return {
        "human": f'FALLBACK["{term}"]',
        "compact": f"FB{{{upper}}}",
        "tokens": f"<FB:{upper}>"
    }