GitLab Repo

amachine.am_vocabulary

 1class Vocabulary :
 2
 3    symbols = {
 4        "letters_lower" : [chr(i) for i in range(97, 123)],
 5        "letters_upper" : [chr(i) for i in range(65, 91)],
 6        "digits"        : [chr(i) for i in range(48, 58)],
 7        "punctuation"   : [chr(i) for i in [33,44,45,46,58,59,63,39,34]],
 8        "brackets"      : [chr(i) for i in [40,41,91,93,123,125, 60,62]],
 9        "math"          : [chr(i) for i in [43,45,42,47,61,37, 94,126]],
10        "special"       : [chr(i) for i in [33,35,36,38,64,95]],
11        "whitespace"    : [chr(i) for i in [32, 9, 10]],
12        "greek_upper"   : [chr(i) for i in range(0x0391, 0x03A5) if i != 0x03A2][:19],
13        "greek_lower"   : [chr(i) for i in range(0x03B1, 0x03C5) if i != 0x03C2][:19],
14        "geometric"     : [chr(i) for i in range(0x25A0, 0x2600)],
15    }
16
17    @staticmethod
18    def letters_lower() -> list[str] : return Vocabulary.symbols['letters_lower']
19    @staticmethod
20    def letters_upper() -> list[str] : return Vocabulary.symbols['letters_upper']
21    @staticmethod
22    def digits() -> list[str] :        return Vocabulary.symbols['digits']
23    @staticmethod
24    def punctuation() -> list[str] :   return Vocabulary.symbols['punctuation']
25    @staticmethod
26    def brackets() -> list[str] :      return Vocabulary.symbols['brackets']
27    @staticmethod
28    def math() -> list[str] :          return Vocabulary.symbols['math']
29    @staticmethod
30    def special() -> list[str] :       return Vocabulary.symbols['special']
31    @staticmethod
32    def whitespace() -> list[str] :    return Vocabulary.symbols['whitespace']
33    @staticmethod
34    def greek_upper() -> list[str] :   return Vocabulary.symbols['greek_upper']
35    @staticmethod
36    def greek_lower() -> list[str] :   return Vocabulary.symbols['greek_lower']
37    @staticmethod
38    def geometric() -> list[str] :     return Vocabulary.symbols['geometric']
39
40    @staticmethod
41    def num_letters_lower() -> int : return len( Vocabulary.symbols[ 'letters_lower' ] )
42    @staticmethod
43    def num_letters_upper() -> int : return len( Vocabulary.symbols[ 'letters_upper' ] )
44    @staticmethod
45    def num_digits() -> int :        return len( Vocabulary.symbols[ 'digits' ] )
46    @staticmethod
47    def num_punctuation() -> int :   return len( Vocabulary.symbols[ 'punctuation' ] )
48    @staticmethod
49    def num_brackets() -> int :      return len( Vocabulary.symbols[ 'brackets' ] )
50    @staticmethod
51    def num_math() -> int :          return len( Vocabulary.symbols[ 'math' ] )
52    @staticmethod
53    def num_special() -> int :       return len( Vocabulary.symbols[ 'special' ] )
54    @staticmethod
55    def num_whitespace() -> int :    return len( Vocabulary.symbols[ 'whitespace' ] )
56    @staticmethod
57    def num_greek_upper() -> int :   return len( Vocabulary.symbols[ 'greek_upper' ] )
58    @staticmethod
59    def num_greek_lower() -> int :   return len( Vocabulary.symbols[ 'greek_lower' ] )
60    @staticmethod
61    def num_geometric() -> int :     return len( Vocabulary.symbols[ 'geometric' ] )
class Vocabulary:
 3class Vocabulary :
 4
 5    symbols = {
 6        "letters_lower" : [chr(i) for i in range(97, 123)],
 7        "letters_upper" : [chr(i) for i in range(65, 91)],
 8        "digits"        : [chr(i) for i in range(48, 58)],
 9        "punctuation"   : [chr(i) for i in [33,44,45,46,58,59,63,39,34]],
10        "brackets"      : [chr(i) for i in [40,41,91,93,123,125, 60,62]],
11        "math"          : [chr(i) for i in [43,45,42,47,61,37, 94,126]],
12        "special"       : [chr(i) for i in [33,35,36,38,64,95]],
13        "whitespace"    : [chr(i) for i in [32, 9, 10]],
14        "greek_upper"   : [chr(i) for i in range(0x0391, 0x03A5) if i != 0x03A2][:19],
15        "greek_lower"   : [chr(i) for i in range(0x03B1, 0x03C5) if i != 0x03C2][:19],
16        "geometric"     : [chr(i) for i in range(0x25A0, 0x2600)],
17    }
18
19    @staticmethod
20    def letters_lower() -> list[str] : return Vocabulary.symbols['letters_lower']
21    @staticmethod
22    def letters_upper() -> list[str] : return Vocabulary.symbols['letters_upper']
23    @staticmethod
24    def digits() -> list[str] :        return Vocabulary.symbols['digits']
25    @staticmethod
26    def punctuation() -> list[str] :   return Vocabulary.symbols['punctuation']
27    @staticmethod
28    def brackets() -> list[str] :      return Vocabulary.symbols['brackets']
29    @staticmethod
30    def math() -> list[str] :          return Vocabulary.symbols['math']
31    @staticmethod
32    def special() -> list[str] :       return Vocabulary.symbols['special']
33    @staticmethod
34    def whitespace() -> list[str] :    return Vocabulary.symbols['whitespace']
35    @staticmethod
36    def greek_upper() -> list[str] :   return Vocabulary.symbols['greek_upper']
37    @staticmethod
38    def greek_lower() -> list[str] :   return Vocabulary.symbols['greek_lower']
39    @staticmethod
40    def geometric() -> list[str] :     return Vocabulary.symbols['geometric']
41
42    @staticmethod
43    def num_letters_lower() -> int : return len( Vocabulary.symbols[ 'letters_lower' ] )
44    @staticmethod
45    def num_letters_upper() -> int : return len( Vocabulary.symbols[ 'letters_upper' ] )
46    @staticmethod
47    def num_digits() -> int :        return len( Vocabulary.symbols[ 'digits' ] )
48    @staticmethod
49    def num_punctuation() -> int :   return len( Vocabulary.symbols[ 'punctuation' ] )
50    @staticmethod
51    def num_brackets() -> int :      return len( Vocabulary.symbols[ 'brackets' ] )
52    @staticmethod
53    def num_math() -> int :          return len( Vocabulary.symbols[ 'math' ] )
54    @staticmethod
55    def num_special() -> int :       return len( Vocabulary.symbols[ 'special' ] )
56    @staticmethod
57    def num_whitespace() -> int :    return len( Vocabulary.symbols[ 'whitespace' ] )
58    @staticmethod
59    def num_greek_upper() -> int :   return len( Vocabulary.symbols[ 'greek_upper' ] )
60    @staticmethod
61    def num_greek_lower() -> int :   return len( Vocabulary.symbols[ 'greek_lower' ] )
62    @staticmethod
63    def num_geometric() -> int :     return len( Vocabulary.symbols[ 'geometric' ] )
symbols = {'letters_lower': ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'], 'letters_upper': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'], 'digits': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'punctuation': ['!', ',', '-', '.', ':', ';', '?', "'", '"'], 'brackets': ['(', ')', '[', ']', '{', '}', '<', '>'], 'math': ['+', '-', '*', '/', '=', '%', '^', '~'], 'special': ['!', '#', '$', '&', '@', '_'], 'whitespace': [' ', '\t', '\n'], 'greek_upper': ['Α', 'Β', 'Γ', 'Δ', 'Ε', 'Ζ', 'Η', 'Θ', 'Ι', 'Κ', 'Λ', 'Μ', 'Ν', 'Ξ', 'Ο', 'Π', 'Ρ', 'Σ', 'Τ'], 'greek_lower': ['α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', 'ρ', 'σ', 'τ'], 'geometric': ['■', '□', '▢', '▣', '▤', '▥', '▦', '▧', '▨', '▩', '▪', '▫', '▬', '▭', '▮', '▯', '▰', '▱', '▲', '△', '▴', '▵', '▶', '▷', '▸', '▹', '►', '▻', '▼', '▽', '▾', '▿', '◀', '◁', '◂', '◃', '◄', '◅', '◆', '◇', '◈', '◉', '◊', '○', '◌', '◍', '◎', '●', '◐', '◑', '◒', '◓', '◔', '◕', '◖', '◗', '◘', '◙', '◚', '◛', '◜', '◝', '◞', '◟', '◠', '◡', '◢', '◣', '◤', '◥', '◦', '◧', '◨', '◩', '◪', '◫', '◬', '◭', '◮', '◯', '◰', '◱', '◲', '◳', '◴', '◵', '◶', '◷', '◸', '◹', '◺', '◻', '◼', '◽', '◾', '◿']}
@staticmethod
def letters_lower() -> list[str]:
19    @staticmethod
20    def letters_lower() -> list[str] : return Vocabulary.symbols['letters_lower']
@staticmethod
def letters_upper() -> list[str]:
21    @staticmethod
22    def letters_upper() -> list[str] : return Vocabulary.symbols['letters_upper']
@staticmethod
def digits() -> list[str]:
23    @staticmethod
24    def digits() -> list[str] :        return Vocabulary.symbols['digits']
@staticmethod
def punctuation() -> list[str]:
25    @staticmethod
26    def punctuation() -> list[str] :   return Vocabulary.symbols['punctuation']
@staticmethod
def brackets() -> list[str]:
27    @staticmethod
28    def brackets() -> list[str] :      return Vocabulary.symbols['brackets']
@staticmethod
def math() -> list[str]:
29    @staticmethod
30    def math() -> list[str] :          return Vocabulary.symbols['math']
@staticmethod
def special() -> list[str]:
31    @staticmethod
32    def special() -> list[str] :       return Vocabulary.symbols['special']
@staticmethod
def whitespace() -> list[str]:
33    @staticmethod
34    def whitespace() -> list[str] :    return Vocabulary.symbols['whitespace']
@staticmethod
def greek_upper() -> list[str]:
35    @staticmethod
36    def greek_upper() -> list[str] :   return Vocabulary.symbols['greek_upper']
@staticmethod
def greek_lower() -> list[str]:
37    @staticmethod
38    def greek_lower() -> list[str] :   return Vocabulary.symbols['greek_lower']
@staticmethod
def geometric() -> list[str]:
39    @staticmethod
40    def geometric() -> list[str] :     return Vocabulary.symbols['geometric']
@staticmethod
def num_letters_lower() -> int:
42    @staticmethod
43    def num_letters_lower() -> int : return len( Vocabulary.symbols[ 'letters_lower' ] )
@staticmethod
def num_letters_upper() -> int:
44    @staticmethod
45    def num_letters_upper() -> int : return len( Vocabulary.symbols[ 'letters_upper' ] )
@staticmethod
def num_digits() -> int:
46    @staticmethod
47    def num_digits() -> int :        return len( Vocabulary.symbols[ 'digits' ] )
@staticmethod
def num_punctuation() -> int:
48    @staticmethod
49    def num_punctuation() -> int :   return len( Vocabulary.symbols[ 'punctuation' ] )
@staticmethod
def num_brackets() -> int:
50    @staticmethod
51    def num_brackets() -> int :      return len( Vocabulary.symbols[ 'brackets' ] )
@staticmethod
def num_math() -> int:
52    @staticmethod
53    def num_math() -> int :          return len( Vocabulary.symbols[ 'math' ] )
@staticmethod
def num_special() -> int:
54    @staticmethod
55    def num_special() -> int :       return len( Vocabulary.symbols[ 'special' ] )
@staticmethod
def num_whitespace() -> int:
56    @staticmethod
57    def num_whitespace() -> int :    return len( Vocabulary.symbols[ 'whitespace' ] )
@staticmethod
def num_greek_upper() -> int:
58    @staticmethod
59    def num_greek_upper() -> int :   return len( Vocabulary.symbols[ 'greek_upper' ] )
@staticmethod
def num_greek_lower() -> int:
60    @staticmethod
61    def num_greek_lower() -> int :   return len( Vocabulary.symbols[ 'greek_lower' ] )
@staticmethod
def num_geometric() -> int:
62    @staticmethod
63    def num_geometric() -> int :     return len( Vocabulary.symbols[ 'geometric' ] )