defmodule Unicode.GeneralCategory.Derived do @moduledoc """ For certain operations and transformations (especially in [Unicode Sets](http://unicode.org/reports/tr35/#Unicode_Sets)) there is an expectation that certain derived general categories exists even though they are not defined in the unicode character database. These categories are: * `:any` which is the full unicode character range `0x0..0x10ffff` * `:assigned` which is the set of codepoints that are assigned and which is therefore equivalent to `:any` - `:Cn`. In fact that is exactly how it is calculated using `unicode_set` and the results are statically copied here so that there is no mutual dependency. * `:ascii` which is the range for the US ASCII character set of `0x0..0x7f` """ @any_category [{0x0, 0x10FFFF}] @ascii_category [{0x0, 0x7F}] # assigned is any - Cn # This is a static version calculated # by [unicode_set](https://hex.pm/packages/unicode_set) by the # operation `"[[:any:]-[:Cn:]]` @assigned_category [ {0, 887}, {890, 895}, {900, 906}, {908, 908}, {910, 929}, {931, 1327}, {1329, 1366}, {1369, 1418}, {1421, 1423}, {1425, 1479}, {1488, 1514}, {1519, 1524}, {1536, 1564}, {1566, 1805}, {1807, 1866}, {1869, 1969}, {1984, 2042}, {2045, 2093}, {2096, 2110}, {2112, 2139}, {2142, 2142}, {2144, 2154}, {2208, 2228}, {2230, 2237}, {2259, 2435}, {2437, 2444}, {2447, 2448}, {2451, 2472}, {2474, 2480}, {2482, 2482}, {2486, 2489}, {2492, 2500}, {2503, 2504}, {2507, 2510}, {2519, 2519}, {2524, 2525}, {2527, 2531}, {2534, 2558}, {2561, 2563}, {2565, 2570}, {2575, 2576}, {2579, 2600}, {2602, 2608}, {2610, 2611}, {2613, 2614}, {2616, 2617}, {2620, 2620}, {2622, 2626}, {2631, 2632}, {2635, 2637}, {2641, 2641}, {2649, 2652}, {2654, 2654}, {2662, 2678}, {2689, 2691}, {2693, 2701}, {2703, 2705}, {2707, 2728}, {2730, 2736}, {2738, 2739}, {2741, 2745}, {2748, 2757}, {2759, 2761}, {2763, 2765}, {2768, 2768}, {2784, 2787}, {2790, 2801}, {2809, 2815}, {2817, 2819}, {2821, 2828}, {2831, 2832}, {2835, 2856}, {2858, 2864}, {2866, 2867}, {2869, 2873}, {2876, 2884}, {2887, 2888}, {2891, 2893}, {2902, 2903}, {2908, 2909}, {2911, 2915}, {2918, 2935}, {2946, 2947}, {2949, 2954}, {2958, 2960}, {2962, 2965}, {2969, 2970}, {2972, 2972}, {2974, 2975}, {2979, 2980}, {2984, 2986}, {2990, 3001}, {3006, 3010}, {3014, 3016}, {3018, 3021}, {3024, 3024}, {3031, 3031}, {3046, 3066}, {3072, 3084}, {3086, 3088}, {3090, 3112}, {3114, 3129}, {3133, 3140}, {3142, 3144}, {3146, 3149}, {3157, 3158}, {3160, 3162}, {3168, 3171}, {3174, 3183}, {3191, 3212}, {3214, 3216}, {3218, 3240}, {3242, 3251}, {3253, 3257}, {3260, 3268}, {3270, 3272}, {3274, 3277}, {3285, 3286}, {3294, 3294}, {3296, 3299}, {3302, 3311}, {3313, 3314}, {3328, 3331}, {3333, 3340}, {3342, 3344}, {3346, 3396}, {3398, 3400}, {3402, 3407}, {3412, 3427}, {3430, 3455}, {3458, 3459}, {3461, 3478}, {3482, 3505}, {3507, 3515}, {3517, 3517}, {3520, 3526}, {3530, 3530}, {3535, 3540}, {3542, 3542}, {3544, 3551}, {3558, 3567}, {3570, 3572}, {3585, 3642}, {3647, 3675}, {3713, 3714}, {3716, 3716}, {3718, 3722}, {3724, 3747}, {3749, 3749}, {3751, 3773}, {3776, 3780}, {3782, 3782}, {3784, 3789}, {3792, 3801}, {3804, 3807}, {3840, 3911}, {3913, 3948}, {3953, 3991}, {3993, 4028}, {4030, 4044}, {4046, 4058}, {4096, 4293}, {4295, 4295}, {4301, 4301}, {4304, 4680}, {4682, 4685}, {4688, 4694}, {4696, 4696}, {4698, 4701}, {4704, 4744}, {4746, 4749}, {4752, 4784}, {4786, 4789}, {4792, 4798}, {4800, 4800}, {4802, 4805}, {4808, 4822}, {4824, 4880}, {4882, 4885}, {4888, 4954}, {4957, 4988}, {4992, 5017}, {5024, 5109}, {5112, 5117}, {5120, 5788}, {5792, 5880}, {5888, 5900}, {5902, 5908}, {5920, 5942}, {5952, 5971}, {5984, 5996}, {5998, 6000}, {6002, 6003}, {6016, 6109}, {6112, 6121}, {6128, 6137}, {6144, 6158}, {6160, 6169}, {6176, 6264}, {6272, 6314}, {6320, 6389}, {6400, 6430}, {6432, 6443}, {6448, 6459}, {6464, 6464}, {6468, 6509}, {6512, 6516}, {6528, 6571}, {6576, 6601}, {6608, 6618}, {6622, 6683}, {6686, 6750}, {6752, 6780}, {6783, 6793}, {6800, 6809}, {6816, 6829}, {6832, 6846}, {6912, 6987}, {6992, 7036}, {7040, 7155}, {7164, 7223}, {7227, 7241}, {7245, 7304}, {7312, 7354}, {7357, 7367}, {7376, 7418}, {7424, 7673}, {7675, 7957}, {7960, 7965}, {7968, 8005}, {8008, 8013}, {8016, 8023}, {8025, 8025}, {8027, 8027}, {8029, 8029}, {8031, 8061}, {8064, 8116}, {8118, 8132}, {8134, 8147}, {8150, 8155}, {8157, 8175}, {8178, 8180}, {8182, 8190}, {8192, 8292}, {8294, 8305}, {8308, 8334}, {8336, 8348}, {8352, 8383}, {8400, 8432}, {8448, 8587}, {8592, 9254}, {9280, 9290}, {9312, 11123}, {11126, 11157}, {11160, 11310}, {11312, 11358}, {11360, 11507}, {11513, 11557}, {11559, 11559}, {11565, 11565}, {11568, 11623}, {11631, 11632}, {11647, 11670}, {11680, 11686}, {11688, 11694}, {11696, 11702}, {11704, 11710}, {11712, 11718}, {11720, 11726}, {11728, 11734}, {11736, 11742}, {11744, 11855}, {11904, 11929}, {11931, 12019}, {12032, 12245}, {12272, 12283}, {12288, 12351}, {12353, 12438}, {12441, 12543}, {12549, 12591}, {12593, 12686}, {12688, 12730}, {12736, 12771}, {12784, 12830}, {12832, 19893}, {19904, 40943}, {40960, 42124}, {42128, 42182}, {42192, 42539}, {42560, 42743}, {42752, 42943}, {42946, 42950}, {42999, 43051}, {43056, 43065}, {43072, 43127}, {43136, 43205}, {43214, 43225}, {43232, 43347}, {43359, 43388}, {43392, 43469}, {43471, 43481}, {43486, 43518}, {43520, 43574}, {43584, 43597}, {43600, 43609}, {43612, 43714}, {43739, 43766}, {43777, 43782}, {43785, 43790}, {43793, 43798}, {43808, 43814}, {43816, 43822}, {43824, 43879}, {43888, 44013}, {44016, 44025}, {44032, 55203}, {55216, 55238}, {55243, 55291}, {55296, 64109}, {64112, 64217}, {64256, 64262}, {64275, 64279}, {64285, 64310}, {64312, 64316}, {64318, 64318}, {64320, 64321}, {64323, 64324}, {64326, 64449}, {64467, 64831}, {64848, 64911}, {64914, 64967}, {65008, 65021}, {65024, 65049}, {65056, 65106}, {65108, 65126}, {65128, 65131}, {65136, 65140}, {65142, 65276}, {65279, 65279}, {65281, 65470}, {65474, 65479}, {65482, 65487}, {65490, 65495}, {65498, 65500}, {65504, 65510}, {65512, 65518}, {65529, 65533}, {65536, 65547}, {65549, 65574}, {65576, 65594}, {65596, 65597}, {65599, 65613}, {65616, 65629}, {65664, 65786}, {65792, 65794}, {65799, 65843}, {65847, 65934}, {65936, 65947}, {65952, 65952}, {66000, 66045}, {66176, 66204}, {66208, 66256}, {66272, 66299}, {66304, 66339}, {66349, 66378}, {66384, 66426}, {66432, 66461}, {66463, 66499}, {66504, 66517}, {66560, 66717}, {66720, 66729}, {66736, 66771}, {66776, 66811}, {66816, 66855}, {66864, 66915}, {66927, 66927}, {67072, 67382}, {67392, 67413}, {67424, 67431}, {67584, 67589}, {67592, 67592}, {67594, 67637}, {67639, 67640}, {67644, 67644}, {67647, 67669}, {67671, 67742}, {67751, 67759}, {67808, 67826}, {67828, 67829}, {67835, 67867}, {67871, 67897}, {67903, 67903}, {67968, 68023}, {68028, 68047}, {68050, 68099}, {68101, 68102}, {68108, 68115}, {68117, 68119}, {68121, 68149}, {68152, 68154}, {68159, 68168}, {68176, 68184}, {68192, 68255}, {68288, 68326}, {68331, 68342}, {68352, 68405}, {68409, 68437}, {68440, 68466}, {68472, 68497}, {68505, 68508}, {68521, 68527}, {68608, 68680}, {68736, 68786}, {68800, 68850}, {68858, 68903}, {68912, 68921}, {69216, 69246}, {69376, 69415}, {69424, 69465}, {69600, 69622}, {69632, 69709}, {69714, 69743}, {69759, 69825}, {69837, 69837}, {69840, 69864}, {69872, 69881}, {69888, 69940}, {69942, 69958}, {69968, 70006}, {70016, 70093}, {70096, 70111}, {70113, 70132}, {70144, 70161}, {70163, 70206}, {70272, 70278}, {70280, 70280}, {70282, 70285}, {70287, 70301}, {70303, 70313}, {70320, 70378}, {70384, 70393}, {70400, 70403}, {70405, 70412}, {70415, 70416}, {70419, 70440}, {70442, 70448}, {70450, 70451}, {70453, 70457}, {70459, 70468}, {70471, 70472}, {70475, 70477}, {70480, 70480}, {70487, 70487}, {70493, 70499}, {70502, 70508}, {70512, 70516}, {70656, 70745}, {70747, 70747}, {70749, 70751}, {70784, 70855}, {70864, 70873}, {71040, 71093}, {71096, 71133}, {71168, 71236}, {71248, 71257}, {71264, 71276}, {71296, 71352}, {71360, 71369}, {71424, 71450}, {71453, 71467}, {71472, 71487}, {71680, 71739}, {71840, 71922}, {71935, 71935}, {72096, 72103}, {72106, 72151}, {72154, 72164}, {72192, 72263}, {72272, 72354}, {72384, 72440}, {72704, 72712}, {72714, 72758}, {72760, 72773}, {72784, 72812}, {72816, 72847}, {72850, 72871}, {72873, 72886}, {72960, 72966}, {72968, 72969}, {72971, 73014}, {73018, 73018}, {73020, 73021}, {73023, 73031}, {73040, 73049}, {73056, 73061}, {73063, 73064}, {73066, 73102}, {73104, 73105}, {73107, 73112}, {73120, 73129}, {73440, 73464}, {73664, 73713}, {73727, 74649}, {74752, 74862}, {74864, 74868}, {74880, 75075}, {77824, 78894}, {78896, 78904}, {82944, 83526}, {92160, 92728}, {92736, 92766}, {92768, 92777}, {92782, 92783}, {92880, 92909}, {92912, 92917}, {92928, 92997}, {93008, 93017}, {93019, 93025}, {93027, 93047}, {93053, 93071}, {93760, 93850}, {93952, 94026}, {94031, 94087}, {94095, 94111}, {94176, 94179}, {94208, 100_343}, {100_352, 101_106}, {110_592, 110_878}, {110_928, 110_930}, {110_948, 110_951}, {110_960, 111_355}, {113_664, 113_770}, {113_776, 113_788}, {113_792, 113_800}, {113_808, 113_817}, {113_820, 113_827}, {118_784, 119_029}, {119_040, 119_078}, {119_081, 119_272}, {119_296, 119_365}, {119_520, 119_539}, {119_552, 119_638}, {119_648, 119_672}, {119_808, 119_892}, {119_894, 119_964}, {119_966, 119_967}, {119_970, 119_970}, {119_973, 119_974}, {119_977, 119_980}, {119_982, 119_993}, {119_995, 119_995}, {119_997, 120_003}, {120_005, 120_069}, {120_071, 120_074}, {120_077, 120_084}, {120_086, 120_092}, {120_094, 120_121}, {120_123, 120_126}, {120_128, 120_132}, {120_134, 120_134}, {120_138, 120_144}, {120_146, 120_485}, {120_488, 120_779}, {120_782, 121_483}, {121_499, 121_503}, {121_505, 121_519}, {122_880, 122_886}, {122_888, 122_904}, {122_907, 122_913}, {122_915, 122_916}, {122_918, 122_922}, {123_136, 123_180}, {123_184, 123_197}, {123_200, 123_209}, {123_214, 123_215}, {123_584, 123_641}, {123_647, 123_647}, {124_928, 125_124}, {125_127, 125_142}, {125_184, 125_259}, {125_264, 125_273}, {125_278, 125_279}, {126_065, 126_132}, {126_209, 126_269}, {126_464, 126_467}, {126_469, 126_495}, {126_497, 126_498}, {126_500, 126_500}, {126_503, 126_503}, {126_505, 126_514}, {126_516, 126_519}, {126_521, 126_521}, {126_523, 126_523}, {126_530, 126_530}, {126_535, 126_535}, {126_537, 126_537}, {126_539, 126_539}, {126_541, 126_543}, {126_545, 126_546}, {126_548, 126_548}, {126_551, 126_551}, {126_553, 126_553}, {126_555, 126_555}, {126_557, 126_557}, {126_559, 126_559}, {126_561, 126_562}, {126_564, 126_564}, {126_567, 126_570}, {126_572, 126_578}, {126_580, 126_583}, {126_585, 126_588}, {126_590, 126_590}, {126_592, 126_601}, {126_603, 126_619}, {126_625, 126_627}, {126_629, 126_633}, {126_635, 126_651}, {126_704, 126_705}, {126_976, 127_019}, {127_024, 127_123}, {127_136, 127_150}, {127_153, 127_167}, {127_169, 127_183}, {127_185, 127_221}, {127_232, 127_244}, {127_248, 127_340}, {127_344, 127_404}, {127_462, 127_490}, {127_504, 127_547}, {127_552, 127_560}, {127_568, 127_569}, {127_584, 127_589}, {127_744, 128_725}, {128_736, 128_748}, {128_752, 128_762}, {128_768, 128_883}, {128_896, 128_984}, {128_992, 129_003}, {129_024, 129_035}, {129_040, 129_095}, {129_104, 129_113}, {129_120, 129_159}, {129_168, 129_197}, {129_280, 129_291}, {129_293, 129_393}, {129_395, 129_398}, {129_402, 129_442}, {129_445, 129_450}, {129_454, 129_482}, {129_485, 129_619}, {129_632, 129_645}, {129_648, 129_651}, {129_656, 129_658}, {129_664, 129_666}, {129_680, 129_685}, {131_072, 173_782}, {173_824, 177_972}, {177_984, 178_205}, {178_208, 183_969}, {183_984, 191_456}, {194_560, 195_101}, {917_505, 917_505}, {917_536, 917_631}, {917_760, 917_999}, {983_040, 1_048_573}, {1_048_576, 1_114_109} ] @derived_categories %{ Ascii: @ascii_category, Assigned: @assigned_category, Any: @any_category } @derived_aliases %{ "any" => :Any, "assigned" => :Assigned, "ascii" => :Ascii } @doc """ Returns a map of the derived General Categories """ @spec categories :: map() def categories do @derived_categories end @doc """ Returns a map of the aliases for the derived General Categories """ @spec aliases :: map() def aliases do @derived_aliases end end