Back

Version 40

11/9/2024
import { Hono } from "https://esm.sh/hono@3.10.2";
import { encode } from "https://esm.sh/js-base64@3.7.5";

const app = new Hono();

// Expanded stopwords list (unchanged)
const stopwords = new Set([
'a', 'about', 'above', 'after', 'again', 'against', 'all', 'am', 'an', 'and', 'any', 'are', 'as', 'at', 'be', 'because',
'been', 'before', 'being', 'below', 'between', 'both', 'but', 'by', 'could', 'did', 'do', 'does', 'doing', 'down',
'during', 'each', 'few', 'for', 'from', 'further', 'had', 'has', 'have', 'having', 'he', 'her', 'here', 'hers',
'herself', 'him', 'himself', 'his', 'how', 'i', 'if', 'in', 'into', 'is', 'it', 'its', 'itself', 'just', 'me',
'more', 'most', 'my', 'myself', 'no', 'nor', 'not', 'now', 'of', 'off', 'on', 'once', 'only', 'or', 'other',
'ought', 'our', 'ours', 'ourselves', 'out', 'over', 'own', 'same', 'she', 'should', 'so', 'some', 'such', 'than',
'that', 'the', 'their', 'theirs', 'them', 'themselves', 'then', 'there', 'these', 'they', 'this', 'those', 'through',
'to', 'too', 'under', 'until', 'up', 'very', 'was', 'we', 'were', 'what', 'when', 'where', 'which', 'while', 'who',
'whom', 'why', 'with', 'would', 'you', 'your', 'yours', 'yourself', 'yourselves'
]);

// Expanded Synonym dictionary (unchanged)
const synonyms = {
"important": ["significant", "crucial", "vital", "essential", "key"],
"example": ["instance", "case", "illustration", "sample", "specimen"],
"unique": ["distinct", "singular", "individual", "exclusive", "rare"],
"beautiful": ["attractive", "gorgeous", "stunning", "lovely", "exquisite"],
"happy": ["joyful", "delighted", "pleased", "content", "elated"],
"sad": ["unhappy", "sorrowful", "depressed", "gloomy", "melancholy"],
"big": ["large", "huge", "enormous", "massive", "gigantic"],
"small": ["tiny", "little", "miniature", "petite", "diminutive"],
"fast": ["quick", "rapid", "swift", "speedy", "hasty"],
"slow": ["sluggish", "leisurely", "unhurried", "gradual", "plodding"],
"good": ["excellent", "fine", "superior", "wonderful", "great"],
"bad": ["poor", "inferior", "substandard", "awful", "terrible"],
"smart": ["intelligent", "clever", "bright", "brilliant", "wise"],
"stupid": ["foolish", "dumb", "idiotic", "moronic", "dense"],
"strong": ["powerful", "robust", "sturdy", "tough", "mighty"],
"weak": ["feeble", "frail", "fragile", "delicate", "flimsy"],
mikehiggins-sanguinecyanmastodon.web.val.run
Updated: November 16, 2024