Synonymizer

Back to the tool

How Synonymizer works

What it does

You paste some text, plain or Markdown, and Synonymizer swaps a share of its words for synonyms. Two sliders set the terms. Swap chance is the odds that any given word is swapped. Closeness is the lowest score a synonym needs before it can be used at all. Everything happens in your browser, and the text you type is never sent anywhere.

Is this AI?

No. No AI model runs in your browser or on any server, and there is no chatbot or language model involved. Every swap comes from a fixed dictionary, built from Open English WordNet and the Moby Thesaurus, and a seeded dice roll.

One ingredient is machine-learned. When the dictionary is built, its closeness scores are computed partly with GloVe word vectors, a statistical word-embedding model published in 2014. Those scores are frozen into the dictionary file; nothing is learned or generated while you use the tool.

How a word gets swapped

  1. Protect. In Markdown mode the text is split into prose and protected parts: code blocks and inline code, link targets, URLs, email addresses, HTML tags and entities, attribute blocks and YAML front matter. Only prose is touched. Contractions, hyphenated words and capitalized words in the middle of a sentence (probably names) are skipped.
  2. Find the dictionary form. bugs is read as bug plus a plural, stopped as stop in the past tense, and spent as spend from a table of irregular verbs. Each reading is checked by inflecting the base form again and confirming it gives back the original word.
  3. Choose a part of speech. When a word can be a noun or a verb, the word before it decides. After the, for or an adjective it is a noun; after to, a pronoun or a modal like will, or at the start of a sentence, it is a verb. If nothing decides it, the word is left alone.
  4. Filter. A synonym survives if its score clears the closeness bar, it can take the same form as the original, and the next word doesn’t rule it out (ask for can’t become request for).
  5. Roll. Each word gets a dice roll from the seed and the word’s position. Because the roll is tied to position, moving the swap chance slider adds or removes swaps without reshuffling the ones already there. Reroll picks a new seed.
  6. Pick and repair. One synonym is drawn from the survivors, weighted toward closer ones, in a way that keeps the same pick when the closeness bar moves (unless the pick itself drops out). The winner is inflected to match, gets the original’s capitalization, and a preceding a or an is corrected: an hour, a unit.

In the result, highlighted words were swapped. Select any word the dictionary knows to see its roll and every candidate with its score.

Choosing a word yourself

In that list you can choose any candidate, even one below the closeness bar, or the original word, which is listed first. Your choice replaces the dice for that one spot and gets the same inflection, capitalization and a/an repair as any swap. It stays when you move the sliders or reroll, follows the word when you edit text around it, and is dropped if you change the word itself. With consistent swaps on, a choice applies to every use of that word. Clear picks, under Options, removes them all.

The dictionary

Synonym pairs come from Open English WordNet and the Moby Thesaurus. Each pair is scored from 0 to 100 by how close it is to the word’s most common meaning, blending word-vector similarity (GloVe), WordNet’s sense order and how common the synonym is. Each word keeps at most twelve synonyms, and a hand-edited overrides file pins, rescores or bans pairs and adds rules such as “not before for”. The file downloads once and your browser caches it.

Known limits

Privacy

There is no server-side processing, no account, no cookies and no analytics. Your last text and settings are saved in this browser’s local storage so they are still there next time; the Clear button empties the text.

Possible next steps

Sources and credits

The synonym dictionary is generated from open data and a few hundred hand-written corrections. The dictionary file is offered under CC BY-SA 4.0 as a precaution, because wordfreq’s frequency data (share-alike) guided which words it includes. It contains no frequency data itself.

Synonym data

Typefaces

The Synonymizer application code is MIT licensed.

WordNet license

WordNet Release 3.0

This software and database is being provided to you, the LICENSEE, by
Princeton University under the following license.  By obtaining, using
and/or copying this software and database, you agree that you have
read, understood, and will comply with these terms and conditions.:

Permission to use, copy, modify and distribute this software and
database and its documentation for any purpose and without fee or
royalty is hereby granted, provided that you agree to comply with
the following copyright notice and statements, including the disclaimer,
and that the same appear on ALL copies of the software, database and
documentation, including modifications that you make for internal
use or for distribution.

WordNet 3.0 Copyright 2006 by Princeton University.  All rights reserved.

THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE
OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT
INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
OTHER RIGHTS.

The name of Princeton University or Princeton may not be used in
advertising or publicity pertaining to distribution of the software
and/or database.  Title to copyright in this software, database and
any associated documentation shall at all times remain with
Princeton University and LICENSEE agrees to preserve same.