Cotton code
319 lines · 6.9 KB · JSONRaw
{  "about": "see crates/cotton-core/src/seal/blind.rs: normalise = NFC(drop U+0300-036F,1AB0-1AFF,1DC0-1DFF,20D0-20FF,FE20-FE2F from NFD(lowercase(NFKC))); words = runs of [\\p{Alphabetic}\\p{N}\\p{M}], >= 2 scalars, not a stopword; tokens = first 8 bytes of HMAC-SHA256(BK, kind \"|\" column \"|\" value) as signed big-endian i64 in decimal; kinds w (word), p (prefixes 3..=min(6,len)), x (exact, NFKC+trim); a query's last word of >= 3 is its prefix token (up to 6)",  "database_id": "11111111-1111-4111-8111-111111111111",  "table": "message",  "bk_hex": "a8432b0d0c4952ed57027db4d988523e4aa51f17b70b794e1b6e5b1013cb9bbb",  "stopwords": {    "en": [      "a",      "about",      "after",      "all",      "also",      "am",      "an",      "and",      "any",      "are",      "as",      "at",      "be",      "because",      "been",      "but",      "by",      "can",      "could",      "did",      "do",      "does",      "for",      "from",      "had",      "has",      "have",      "he",      "her",      "him",      "his",      "how",      "i",      "if",      "in",      "into",      "is",      "it",      "its",      "just",      "me",      "my",      "no",      "not",      "of",      "on",      "or",      "our",      "out",      "she",      "so",      "than",      "that",      "the",      "their",      "them",      "then",      "there",      "these",      "they",      "this",      "to",      "up",      "us",      "was",      "we",      "were",      "what",      "when",      "which",      "who",      "will",      "with",      "would",      "you",      "your"    ],    "hi": [      "और",      "एक",      "का",      "कि",      "की",      "के",      "को",      "तो",      "था",      "थी",      "थे",      "नहीं",      "पर",      "भी",      "में",      "यह",      "वह",      "से",      "ही",      "है",      "हैं",      "हो"    ]  },  "texts": [    {      "column": "body",      "text": "Zanzibar ferry tickets for Thursday, café near the jetty",      "normalised": "zanzibar ferry tickets for thursday, cafe near the jetty",      "words": [        "zanzibar",        "ferry",        "tickets",        "thursday",        "cafe",        "near",        "jetty"      ],      "tokens": [        "-8696343167825299000",        "-8343047792092639815",        "-7326153696673177408",        "-4642897081765117833",        "-4527994849605096134",        "-3128550057678266413",        "-3026510776617909762",        "-2988290106425664585",        "-1457062914250524731",        "-980887370961848630",        "-32089377484244614",        "248023943197793836",        "868776412203272871",        "998796668403481479",        "1204975267756983972",        "1577249466327913184",        "1891620930036824299",        "2207838371620422093",        "2471900073021988446",        "2823081092415964360",        "3052222045975919431",        "5836013619198224935",        "6737064851857130378",        "6968074471658245855",        "7266495963830232878",        "7708674632886052257",        "8123960771845353819",        "8427649534455007715",        "8937062152907646044"      ]    },    {      "column": "body",      "text": "मैं कल दिल्ली में हूँ और तुम?",      "normalised": "मैं कल दिल्ली में हूँ और तुम?",      "words": [        "मैं",        "कल",        "दिल्ली",        "हूँ",        "तुम"      ],      "tokens": [        "-7155463156410061844",        "-5931228286525377979",        "-4844364748519185806",        "-4322174944072146921",        "-746802106372854610",        "1174617242120723980",        "3627062488523408609",        "4213259857320270080",        "5128446794840797063",        "5275162919813711784",        "6457999261681868433",        "6479999576897505456"      ]    },    {      "column": "body",      "text": "Meeting @ 5pm, कल मिलते हैं 🙏",      "normalised": "meeting @ 5pm, कल मिलते हैं 🙏",      "words": [        "meeting",        "5pm",        "कल",        "मिलते"      ],      "tokens": [        "-5576083598880124245",        "-3387870160460290556",        "-1311676020391737066",        "-746802106372854610",        "-111034964996221885",        "2665481879200150047",        "3818438730901234666",        "4000648649851567303",        "4164623955092283393",        "5268213891797767335",        "5635422023468111042",        "6600277141374646500"      ]    },    {      "column": "body",      "text": "👍🎉🙏",      "normalised": "👍🎉🙏",      "words": [],      "tokens": []    },    {      "column": "body",      "text": "FULL width ÅNGSTRÖM naïve",      "normalised": "full width angstrom naive",      "words": [        "full",        "width",        "angstrom",        "naive"      ],      "tokens": [        "-8859152149190171017",        "-6019249049167677711",        "-5286035300991854358",        "-4372785624718561316",        "-3767535870409845983",        "-3450376894480023184",        "-2597830150135276297",        "155019070981404057",        "161643199568136678",        "1770229714354478094",        "2006129008246611401",        "3045910573713233903",        "6034348698152789132",        "7635323194576684530",        "7673354410228523445",        "8050330192725304407"      ]    }  ],  "queries": [    {      "column": "body",      "query": "zanz",      "tokens": [        "6968074471658245855"      ]    },    {      "column": "body",      "query": "ferry tick",      "tokens": [        "-1457062914250524731",        "6737064851857130378"      ]    },    {      "column": "body",      "query": "tickets",      "tokens": [        "-3128550057678266413"      ]    },    {      "column": "body",      "query": "go",      "tokens": [        "4593389014511930831"      ]    },    {      "column": "body",      "query": "the a",      "tokens": []    },    {      "column": "body",      "query": "दिल्",      "tokens": [        "1174617242120723980"      ]    },    {      "column": "body",      "query": "कल मिल",      "tokens": [        "-746802106372854610",        "2665481879200150047"      ]    },    {      "column": "body",      "query": "Café",      "tokens": [        "-3026510776617909762"      ]    }  ],  "exact": [    {      "column": "external_id",      "value": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAEhgg",      "token": "4464680910031832102"    },    {      "column": "external_id",      "value": "+919876543210",      "token": "-1189557034317055516"    },    {      "column": "external_id",      "value": " Someone@Example.com ",      "token": "2608132138709148584"    }  ]}