4 ms·
Ask HN: How would you make a program that finds abstract word associations?
Hi! I am facing an interesting problem, and I want to ask for your advice.
How would you go about writing a program that finds abstract associations between words?
Like if you input "balloon" it would output things like "birthday", "blimp", "red", "soap bubble", etc. Not synonyms, but the sort of connections human would make.
Is that even possible? I'd appreciate any hints and ideas.
- dragonbonheur 11y agoIn a collection of sentences, give each noun and verb a collection consisting of a score and the string it's being compared to,from that collection get a random candidate among the elements of that collection with the highest score.
- stray 11y agoI'd just make a call to the twin words API. https://www.twinword.com/api/word-associations.php https://www.twinword.com/api/word-associations.php For "balloon", it doesn't return "birthday" but it does return "party"... { "entry": "balloon", "request": "balloon", "response": { "balloon": 1 }, "associations": "aeronaut, distensible, inflate, puncture, distension, airman, aviator, deflate, helium, widen, flyer, bladder, flexible, dilate, rubber, air, expand, intestine, pilot, swollen, swell, bloat, distend, tire, gas, fly, gastric, fuse, chemistry, party", "associations_array": [ "aeronaut", "distensible", "inflate", "puncture", "distension", "airman", "aviator", "deflate", "helium", "widen", "flyer", "bladder", "flexible", "dilate", "rubber", "air", "expand", "intestine", "pilot", "swollen", "swell", "bloat", "distend", "tire", "gas", "fly", "gastric", "fuse", "chemistry", "party" ], "associations_scored": { "aeronaut": 2.5090246, "distensible": 1.8590211, "inflate": 1.8082259, "puncture": 1.5352395, "distension": 1.2243819, "airman": 1.1704121, "aviator": 1.1576922, "deflate": 1.1435689, "helium": 1.1327481, "widen": 1.0731996, "flyer": 0.926951, "bladder": 0.85258925, "flexible": 0.71675444, "dilate": 0.6800923, "rubber": 0.6176759, "air": 0.61751336, "expand": 0.6171214, "intestine": 0.6049722, "pilot": 0.5919644, "swollen": 0.54522365, "swell": 0.48640782, "bloat": 0.45009124, "distend": 0.4091111, "tire": 0.35498697, "gas": 0.34756577, "fly": 0.34399426, "gastric": 0.3329026, "fuse": 0.32793412, "chemistry": 0.29498485, "party": 0.29245383 }, "version": "4.0.0", "author": "twinword inc.", "email": "feedback@twinword.com", "result_code": "200", "result_msg": "Success" }