Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

18.7 KB
Raw Blame
{
  "script_ranges": [
    {
      "name": "greek",
      "ranges": [
        [
          880,
          1023
        ],
        [
          7936,
          8191
        ]
      ]
    },
    {
      "name": "cyrillic",
      "ranges": [
        [
          1024,
          1327
        ],
        [
          11744,
          11775
        ],
        [
          42560,
          42655
        ]
      ]
    },
    {
      "name": "armenian",
      "ranges": [
        [
          1328,
          1423
        ]
      ]
    },
    {
      "name": "hebrew",
      "ranges": [
        [
          1424,
          1535
        ]
      ]
    },
    {
      "name": "arabic",
      "ranges": [
        [
          1536,
          1791
        ],
        [
          1872,
          1919
        ],
        [
          2208,
          2303
        ],
        [
          64336,
          65023
        ],
        [
          65136,
          65279
        ]
      ]
    },
    {
      "name": "devanagari",
      "ranges": [
        [
          2304,
          2431
        ],
        [
          43232,
          43263
        ]
      ]
    },
    {
      "name": "bengali",
      "ranges": [
        [
          2432,
          2559
        ]
      ]
    },
    {
      "name": "gurmukhi",
      "ranges": [
        [
          2560,
          2687
        ]
      ]
    },
    {
      "name": "gujarati",
      "ranges": [
        [
          2688,
          2815
        ]
      ]
    },
    {
      "name": "oriya",
      "ranges": [
        [
          2816,
          2943
        ]
      ]
    },
    {
      "name": "tamil",
      "ranges": [
        [
          2944,
          3071
        ]
      ]
    },
    {
      "name": "telugu",
      "ranges": [
        [
          3072,
          3199
        ]
      ]
    },
    {
      "name": "kannada",
      "ranges": [
        [
          3200,
          3327
        ]
      ]
    },
    {
      "name": "malayalam",
      "ranges": [
        [
          3328,
          3455
        ]
      ]
    },
    {
      "name": "sinhala",
      "ranges": [
        [
          3456,
          3583
        ]
      ]
    },
    {
      "name": "thai",
      "ranges": [
        [
          3584,
          3711
        ]
      ]
    },
    {
      "name": "lao",
      "ranges": [
        [
          3712,
          3839
        ]
      ]
    },
    {
      "name": "tibetan",
      "ranges": [
        [
          3840,
          4095
        ]
      ]
    },
    {
      "name": "myanmar",
      "ranges": [
        [
          4096,
          4255
        ]
      ]
    },
    {
      "name": "georgian",
      "ranges": [
        [
          4256,
          4351
        ]
      ]
    },
    {
      "name": "ethiopic",
      "ranges": [
        [
          4608,
          4991
        ]
      ]
    },
    {
      "name": "khmer",
      "ranges": [
        [
          6016,
          6143
        ]
      ]
    },
    {
      "name": "hangul",
      "ranges": [
        [
          4352,
          4607
        ],
        [
          12592,
          12687
        ],
        [
          44032,
          55215
        ]
      ]
    },
    {
      "name": "kana",
      "ranges": [
        [
          12352,
          12447
        ],
        [
          12448,
          12543
        ],
        [
          12784,
          12799
        ]
      ]
    },
    {
      "name": "han",
      "ranges": [
        [
          13312,
          19903
        ],
        [
          19968,
          40959
        ],
        [
          63744,
          64255
        ]
      ]
    }
  ],
  "stop_word_order": [
    "en",
    "fr",
    "de",
    "es",
    "pt",
    "it",
    "nl",
    "sv",
    "ro",
    "bn",
    "az"
  ],
  "stop_words": {
    "az": [
      "amma",
      "ancaq",
      "artiq",
      "artıq",
      "bir",
      "biz",
      "bu",
      "cox",
      "daha",
      "deyil",
      "də",
      "eger",
      "görə",
      "həm",
      "hər",
      "ile",
      "ilə",
      "isə",
      "kimi",
      "lakin",
      "mən",
      "nə",
      "olan",
      "olmasa",
      "olub",
      "onlar",
      "siz",
      "sonra",
      "sən",
      "ucun",
      "var",
      "ve",
      "və",
      "yalniz",
      "yalnız",
      "yox",
      "yoxdur",
      "çox",
      "üçün",
      "əgər"
    ],
    "bn": [
      "abar",
      "ajke",
      "akhon",
      "amader",
      "amake",
      "amar",
      "ami",
      "amra",
      "apnake",
      "apnar",
      "apnara",
      "apni",
      "ar",
      "asbe",
      "bhai",
      "bhalo",
      "bolte",
      "bolun",
      "chai",
      "chaina",
      "dhonnobad",
      "dilam",
      "dite",
      "diye",
      "diyechi",
      "dorkar",
      "duibar",
      "ei",
      "eita",
      "ekbar",
      "ekhon",
      "ekhono",
      "ekta",
      "ferot",
      "geche",
      "gese",
      "hobe",
      "hocche",
      "hoise",
      "hoye",
      "hoyeche",
      "hoyni",
      "jabe",
      "jodi",
      "jonno",
      "kalke",
      "keno",
      "keu",
      "kharap",
      "khub",
      "ki",
      "kibhabe",
      "kichu",
      "kintu",
      "kivabe",
      "kobe",
      "kokhon",
      "korbo",
      "korchi",
      "kore",
      "koreche",
      "korechi",
      "koren",
      "korlam",
      "korsi",
      "korte",
      "korun",
      "kothay",
      "koto",
      "lagbe",
      "moddhe",
      "nai",
      "niye",
      "oi",
      "oita",
      "onek",
      "ota",
      "pabo",
      "paini",
      "parben",
      "parbo",
      "parchi",
      "parchina",
      "peyechi",
      "sathe",
      "shathe",
      "shob",
      "shomossa",
      "somossa",
      "tader",
      "tahole",
      "taka",
      "theke",
      "tomake",
      "tomar",
      "tomra",
      "tumi",
      "valo"
    ],
    "de": [
      "aber",
      "auch",
      "auf",
      "aus",
      "bei",
      "bitte",
      "das",
      "dem",
      "den",
      "der",
      "dich",
      "die",
      "diese",
      "diesen",
      "dieser",
      "dieses",
      "dir",
      "ein",
      "eine",
      "einem",
      "einen",
      "einer",
      "für",
      "gibt",
      "habe",
      "haben",
      "heute",
      "ich",
      "im",
      "in",
      "ist",
      "jetzt",
      "kann",
      "kannst",
      "mein",
      "meine",
      "meinem",
      "meinen",
      "meiner",
      "mich",
      "mir",
      "mit",
      "nach",
      "nicht",
      "noch",
      "oder",
      "sich",
      "sind",
      "und",
      "uns",
      "von",
      "wann",
      "was",
      "welche",
      "werden",
      "wie",
      "wir",
      "wird",
      "wo",
      "wurde",
      "zu",
      "zum",
      "zur"
    ],
    "en": [
      "after",
      "already",
      "always",
      "and",
      "any",
      "are",
      "aren",
      "as",
      "at",
      "be",
      "because",
      "been",
      "before",
      "being",
      "between",
      "both",
      "but",
      "can",
      "could",
      "couldn",
      "didn",
      "didnt",
      "does",
      "doesn",
      "doesnt",
      "doing",
      "done",
      "dont",
      "down",
      "during",
      "each",
      "ever",
      "every",
      "few",
      "for",
      "from",
      "has",
      "hasn",
      "have",
      "haven",
      "havent",
      "here",
      "him",
      "his",
      "how",
      "i",
      "if",
      "in",
      "into",
      "is",
      "isn",
      "isnt",
      "it",
      "ive",
      "many",
      "might",
      "much",
      "must",
      "never",
      "nor",
      "not",
      "of",
      "on",
      "only",
      "onto",
      "our",
      "please",
      "shall",
      "she",
      "should",
      "some",
      "than",
      "that",
      "thats",
      "the",
      "their",
      "them",
      "then",
      "there",
      "these",
      "they",
      "this",
      "those",
      "through",
      "to",
      "too",
      "until",
      "very",
      "was",
      "wasn",
      "wasnt",
      "we",
      "were",
      "weren",
      "what",
      "whats",
      "when",
      "where",
      "which",
      "while",
      "who",
      "whom",
      "why",
      "will",
      "with",
      "within",
      "without",
      "won",
      "wont",
      "would",
      "wouldn",
      "yet",
      "you",
      "your",
      "youre",
      "yours"
    ],
    "es": [
      "al",
      "algo",
      "aquí",
      "aunque",
      "como",
      "con",
      "cuando",
      "del",
      "donde",
      "dos",
      "el",
      "entre",
      "es",
      "esa",
      "ese",
      "eso",
      "esta",
      "este",
      "esto",
      "está",
      "fue",
      "fueron",
      "gracias",
      "han",
      "hay",
      "hemos",
      "hoy",
      "la",
      "las",
      "le",
      "les",
      "lo",
      "los",
      "mi",
      "muy",
      "más",
      "nada",
      "necesito",
      "ni",
      "nos",
      "para",
      "pero",
      "por",
      "porque",
      "puede",
      "pueden",
      "que",
      "quiero",
      "se",
      "ser",
      "sobre",
      "son",
      "su",
      "sus",
      "también",
      "tengo",
      "tiene",
      "tienen",
      "todo",
      "tres",
      "tu",
      "un",
      "una",
      "y",
      "ya"
    ],
    "fr": [
      "alors",
      "au",
      "aux",
      "avec",
      "bien",
      "bonjour",
      "ce",
      "ces",
      "cette",
      "comment",
      "dans",
      "des",
      "deux",
      "dois",
      "doit",
      "donc",
      "du",
      "elle",
      "elles",
      "est",
      "et",
      "fait",
      "fois",
      "il",
      "ils",
      "je",
      "jour",
      "jours",
      "la",
      "le",
      "les",
      "ma",
      "mais",
      "merci",
      "mes",
      "mois",
      "mon",
      "nous",
      "ont",
      "ou",
      "pas",
      "peut",
      "peux",
      "plus",
      "pour",
      "pourquoi",
      "quand",
      "que",
      "qui",
      "sa",
      "ses",
      "sont",
      "sur",
      "ta",
      "tes",
      "ton",
      "tous",
      "tout",
      "toute",
      "trois",
      "très",
      "tu",
      "une",
      "veut",
      "veux",
      "vous",
      "être"
    ],
    "it": [
      "abbiamo",
      "adesso",
      "agli",
      "alla",
      "alle",
      "anche",
      "ancora",
      "avete",
      "che",
      "ci",
      "ciao",
      "col",
      "come",
      "con",
      "da",
      "dagli",
      "dal",
      "dalla",
      "dallo",
      "degli",
      "dei",
      "del",
      "della",
      "delle",
      "dello",
      "deve",
      "devo",
      "devono",
      "di",
      "dove",
      "e",
      "ed",
      "era",
      "fra",
      "già",
      "gli",
      "grazie",
      "ha",
      "hai",
      "hanno",
      "ho",
      "ieri",
      "il",
      "la",
      "le",
      "lo",
      "mai",
      "mi",
      "mia",
      "mio",
      "molto",
      "ne",
      "negli",
      "nel",
      "nell",
      "nella",
      "non",
      "o",
      "oggi",
      "per",
      "perche",
      "più",
      "poco",
      "quando",
      "questa",
      "questo",
      "scusa",
      "sempre",
      "si",
      "sono",
      "stata",
      "stato",
      "su",
      "sua",
      "sul",
      "sulla",
      "sulle",
      "tra",
      "tuo",
      "un",
      "una",
      "uno",
      "voglio",
      "vorrei",
      "è"
    ],
    "nl": [
      "aan",
      "dat",
      "deze",
      "door",
      "een",
      "het",
      "is",
      "maar",
      "met",
      "naar",
      "niet",
      "ook",
      "op",
      "te",
      "van",
      "voor",
      "worden",
      "wordt",
      "zijn"
    ],
    "pt": [
      "agora",
      "ainda",
      "alguem",
      "alguém",
      "ali",
      "antes",
      "ao",
      "aos",
      "aqui",
      "as",
      "até",
      "boa",
      "cadê",
      "com",
      "como",
      "consigo",
      "da",
      "das",
      "depois",
      "deu",
      "do",
      "dois",
      "dos",
      "e",
      "em",
      "entao",
      "então",
      "era",
      "esta",
      "estamos",
      "estava",
      "este",
      "estou",
      "está",
      "eu",
      "ficou",
      "fiz",
      "foi",
      "gostaria",
      "hoje",
      "isso",
      "isto",
      "ja",
      "já",
      "mais",
      "mas",
      "meu",
      "meus",
      "minha",
      "minhas",
      "muito",
      "na",
      "nada",
      "nao",
      "nas",
      "nenhum",
      "nenhuma",
      "ninguem",
      "ninguém",
      "noite",
      "nos",
      "nossa",
      "nosso",
      "não",
      "o",
      "obrigada",
      "obrigado",
      "olá",
      "onde",
      "ontem",
      "os",
      "para",
      "pela",
      "pelo",
      "pode",
      "podem",
      "por",
      "porque",
      "pra",
      "preciso",
      "quando",
      "que",
      "quero",
      "sao",
      "se",
      "ser",
      "seu",
      "sou",
      "sua",
      "são",
      "tambem",
      "também",
      "tarde",
      "tem",
      "tenho",
      "três",
      "tudo",
      "tá",
      "um",
      "uma",
      "vc",
      "vcs",
      "voce",
      "voces",
      "você",
      "vocês",
      "é"
    ],
    "ro": [
      "aceasta",
      "această",
      "acest",
      "acesta",
      "acum",
      "ale",
      "care",
      "dar",
      "din",
      "după",
      "este",
      "foarte",
      "fost",
      "fără",
      "lui",
      "mi",
      "nu",
      "pentru",
      "până",
      "sunt",
      "să",
      "trebuie",
      "vreau",
      "vă",
      "în",
      "și",
      "ți"
    ],
    "sv": [
      "appen",
      "aterbetala",
      "aterbetalning",
      "att",
      "behover",
      "behöver",
      "blivit",
      "debiterade",
      "dessa",
      "detta",
      "faktura",
      "fel",
      "från",
      "får",
      "ganger",
      "gång",
      "gånger",
      "gör",
      "göra",
      "hittar",
      "hjalp",
      "hjalpa",
      "hjälp",
      "hjälpa",
      "här",
      "installningarna",
      "installningen",
      "inställningarna",
      "inställningen",
      "inte",
      "jag",
      "kommer",
      "kraschar",
      "kvittot",
      "losenord",
      "lösenord",
      "mig",
      "min",
      "mitt",
      "måste",
      "nar",
      "när",
      "nästa",
      "och",
      "också",
      "om",
      "oppnar",
      "paket",
      "ska",
      "skicka",
      "skulle",
      "sparningen",
      "spårningen",
      "säger",
      "till",
      "tva",
      "två",
      "upp",
      "uppdaterats",
      "utan",
      "vi",
      "vill",
      "är",
      "återbetala",
      "återbetalning",
      "öppnar"
    ]
  },
  "short_swedish_words": [
    "abonnemanget",
    "aterbetalning",
    "atkomst",
    "behover",
    "behöver",
    "betalningen",
    "fakturan",
    "felmeddelande",
    "glomt",
    "glömt",
    "inloggningen",
    "installningen",
    "inställningen",
    "kvitto",
    "kvittot",
    "losenord",
    "lösenord",
    "sparningen",
    "spårningen",
    "återbetalning",
    "åtkomst"
  ],
  "non_en_diacritics": [
    "ß",
    "à",
    "á",
    "â",
    "ã",
    "ä",
    "å",
    "æ",
    "ç",
    "è",
    "é",
    "ê",
    "ë",
    "ì",
    "í",
    "î",
    "ï",
    "ñ",
    "ò",
    "ó",
    "ô",
    "õ",
    "ö",
    "ø",
    "ù",
    "ú",
    "û",
    "ü",
    "ý",
    "ÿ",
    "ā",
    "ă",
    "ą",
    "ć",
    "č",
    "ď",
    "đ",
    "ē",
    "ę",
    "ě",
    "ğ",
    "ģ",
    "ī",
    "ı",
    "ķ",
    "ļ",
    "ł",
    "ń",
    "ņ",
    "ň",
    "ő",
    "œ",
    "ř",
    "ś",
    "ş",
    "š",
    "ţ",
    "ť",
    "ū",
    "ů",
    "ű",
    "ź",
    "ż",
    "ž",
    "ơ",
    "ư",
    "ș",
    "ț",
    "ə",
    "ạ",
    "ả",
    "ấ",
    "ầ",
    "ẩ",
    "ẫ",
    "ậ",
    "ắ",
    "ằ",
    "ẳ",
    "ẵ",
    "ặ",
    "ẹ",
    "ẻ",
    "ẽ",
    "ế",
    "ề",
    "ể",
    "ễ",
    "ệ",
    "ỉ",
    "ị",
    "ọ",
    "ỏ",
    "ố",
    "ồ",
    "ổ",
    "ỗ",
    "ộ",
    "ớ",
    "ờ",
    "ở",
    "ỡ",
    "ợ",
    "ụ",
    "ủ",
    "ứ",
    "ừ",
    "ử",
    "ữ",
    "ự",
    "ỳ",
    "ỵ",
    "ỷ",
    "ỹ"
  ],
  "shared_words": [
    "as",
    "como",
    "con",
    "da",
    "das",
    "del",
    "dois",
    "dos",
    "e",
    "era",
    "esta",
    "este",
    "está",
    "får",
    "hej",
    "il",
    "in",
    "is",
    "ja",
    "jo",
    "kommer",
    "la",
    "le",
    "les",
    "lo",
    "mais",
    "mi",
    "mig",
    "min",
    "nada",
    "nej",
    "nos",
    "o",
    "om",
    "para",
    "por",
    "porque",
    "quando",
    "que",
    "se",
    "ser",
    "skulle",
    "su",
    "sua",
    "tack",
    "tu",
    "un",
    "una",
    "vi",
    "was"
  ],
  "nordic_overlap_words": [
    "får",
    "hej",
    "ja",
    "jo",
    "kommer",
    "mig",
    "min",
    "nej",
    "om",
    "skulle",
    "tack",
    "vi"
  ],
  "en_only_words": [
    "after",
    "already",
    "always",
    "and",
    "any",
    "are",
    "aren",
    "at",
    "be",
    "because",
    "been",
    "before",
    "being",
    "between",
    "both",
    "but",
    "can",
    "could",
    "couldn",
    "didn",
    "didnt",
    "does",
    "doesn",
    "doesnt",
    "doing",
    "done",
    "dont",
    "down",
    "during",
    "each",
    "ever",
    "every",
    "few",
    "for",
    "from",
    "has",
    "hasn",
    "have",
    "haven",
    "havent",
    "here",
    "him",
    "his",
    "how",
    "i",
    "if",
    "into",
    "isn",
    "isnt",
    "it",
    "ive",
    "many",
    "might",
    "much",
    "must",
    "never",
    "nor",
    "not",
    "of",
    "on",
    "only",
    "onto",
    "our",
    "please",
    "shall",
    "she",
    "should",
    "some",
    "than",
    "that",
    "thats",
    "the",
    "their",
    "them",
    "then",
    "there",
    "these",
    "they",
    "this",
    "those",
    "through",
    "to",
    "too",
    "until",
    "very",
    "wasn",
    "wasnt",
    "we",
    "were",
    "weren",
    "what",
    "whats",
    "when",
    "where",
    "which",
    "while",
    "who",
    "whom",
    "why",
    "will",
    "with",
    "within",
    "without",
    "won",
    "wont",
    "would",
    "wouldn",
    "yet",
    "you",
    "your",
    "youre",
    "yours"
  ],
  "en_collision_words": [
    "care",
    "come",
    "do",
    "im",
    "per",
    "plus",
    "son",
    "todo"
  ],
  "thresholds": {
    "ENGLISH_RESCUE_DIACRITIC_RATE": 0.06,
    "NON_EN_DIACRITIC_RATE": 0.02,
    "NON_LATIN_FRACTION": 0.2,
    "NON_LATIN_MIN_FRACTION": 0.1,
    "NON_LATIN_MIN_LETTERS": 10,
    "_POST_DATABASE_LETTER_FLOOR": 7305,
    "_SHOUTED_MIN_STOPWORD": 4,
    "_SHOUTED_MIN_WORD": 5
  },
  "regexes": {
    "_WORD": "[^\\W\\d_]+",
    "_IDENTIFIER": "(?<![\\w-])[\\w-]*(?:[.@][\\w-]+)+",
    "_CODE_LINE": "[=;{}\\[\\]]|\\w\\(",
    "_JOINED": "[^\\W_][._/\\\\][^\\W_]",
    "_LETTER_RUN": "[^\\W\\d_]{2,}"
  }
}