Ignore Dictionary

Ignore Swalekh in-built dictionary

Swalekh keeps a lightweight dictionary in the browser's localStorage that remembers past user selections and uses that history to rank suggestions. When enabled, the dictionary causes previously chosen suggestions to appear first for that client.

What the client dictionary is

  • A small, localStorage-backed cache of past suggestions and selections.
  • Used to rank and surface personalized suggestions quickly on subsequent uses.
  • Stored only on the user's device (client-side).

Why you might disable it

  • Security / privacy concerns: avoid storing any user suggestion history in localStorage.
  • Determinism: ensure default transliteration suggestions are shown without ranking from past selections.
  • Consistency across users: prevent per-client suggestion ordering.
  • Reduce client storage usage.

Behaviour when disabled

  • No client-side suggestion history will be read or written.
  • Suggestions will be the default/untweaked set (transliteration suggestions) with no ranking from past selections.
  • Core validation and required-field checks continue to function normally.

How to use

Client-side example — disable the dictionary during initialization:

const loadSwalekh = async () => {
  await window.initSwalekh({
    validationKey,
    creds: {
      // necessary credentials
    },
    optional: {
      dictionaryEnabled: false, // disable client-side localStorage dictionary
    },
  });
};

Troubleshooting

  • "No personalized suggestions anymore": expected if dictionary is disabled.
  • "I still see history-based results": clear localStorage and confirm init config passes dictionaryEnabled: false.