Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 3 min read

Building a Zero-Dependency ATS Resume Keyword Scorer in Pure JS (C++, .NET, Synonyms & Stemming)

Most online "ATS resume checkers" ask you to upload your personal resume (full name, phone, email, employment history) to a third-party server, pay a monthly subscription, and wait for a black-box score. You don't need

Most online "ATS resume checkers" ask you to upload your personal resume (full name, phone, email, employment history) to a third-party server, pay a monthly subscription, and wait for a black-box score.

You don't need a backendβ€”or a 500 KB NLP libraryβ€”to score a resume against a job description accurately. You can do it in pure, zero-dependency JavaScript that runs both in the browser and in Node 18+.

Here is how we built the keyword matcher behind our free, client-side ATS Resume Builder & JD Keyword Scorer, and the four edge cases that trip up naive implementations.

1. Naive \w+ Regex Breaks Tech Skills

If you split text with text.toLowerCase().split(/\W+/), your job matcher silently destroys real engineering keywords:

  • C++ becomes c
  • C# becomes c
  • .NET becomes net
  • Node.js becomes node and js
  • CI/CD becomes ci and cd

Instead, keep punctuation that belongs inside technical tokens (+, #, ., /, -) and strip only trailing punctuation:

function tokenize(text) {
  const s = String(text || '')
    .toLowerCase()
    .replace(/[β€˜β€™]/g, "'")
    .replace(/[–—]/g, ' ');
  const out = [];
  const re = /[a-z0-9][a-z0-9+#]*(?:[./-][a-z0-9+#]+)*|\.[a-z][a-z0-9]*/g;
  let m;
  while ((m = re.exec(s))) {
    const t = m[0].replace(/[.\-/]+$/, '');
    if (t !== '') out.push(t);
  }
  return out;
}

Now c++, c#, .net, node.js, next.js, ci/cd, and a/b stay intact as single tokens.

2. Whole-Word Matching + Synonym Normalization

Two classic false-positive / false-negative bugs in DIY matchers:

  1. Substring false positives: resumeText.includes("java") falsely matches "JavaScript".
  2. Abbreviation misses: The JD says "Amazon Web Services" or "Kubernetes", while your resume says "AWS" or "k8s".

We solve both by normalizing tokens through a synonym map and matching on space-padded token boundaries (' ' + normalized + ' '):

const SYNONYMS = {
  js: 'javascript',
  ts: 'typescript',
  k8s: 'kubernetes',
  aws: 'amazon web services',
  gcp: 'google cloud',
  ml: 'machine learning',
  nlp: 'natural language processing',
  seo: 'search engine optimization',
  ux: 'user experience',
  'ci/cd': 'continuous integration',
  llm: 'large language models',
  llms: 'large language models',
  postgres: 'postgresql',
  'cross-functional': 'cross functional',
};

function normalize(text) {
  return tokenize(text).map(t => SYNONYMS[t] || t).join(' ');
}

Because every comparison runs on space-delimited normalized tokens, "java" never matches "javascript", and "AWS" matches "Amazon Web Services" in both directions.

3. Weighting Multi-Word Skills & Light Stemming

Single words aren't equally important. In a job description, "sales enablement", "a/b testing", or "unit testing" carry much more signal than generic single words.

Our extractKeywords(jd) pipeline runs in three lightweight passes:

  1. Known multi-word phrases (weight = 3): Match curated multi-word skills (e.g., machine learning, rest api, continuous integration, product management) first and exclude their constituent words from being double-counted as single tokens.
  2. Repeated unknown bigrams (weight = count Γ— 2): Catch role-specific two-word phrases that appear 2+ times in the JD (e.g. "pipeline reviews"), even if they aren't in the static phrase list.
  3. Light inflection stemming: Fold plurals and common verb forms without shipping Porter/Snowball dictionaries, so "managed" matches "managing" and "APIs" matches "API":
function stem(w) {
  if (w.length <= 3 || /[^a-z]/.test(w)) return w;
  return (
    w
      .replace(/(ies)$/, 'y')
      .replace(/(ing|ed|es|s)$/, '')
      .replace(/(.)\1$/, '$1')
      .replace(/(...)e$/, '$1') || w
  );
}

Notice the guard if (w.length <= 3 || /[^a-z]/.test(w)) return w; β€” that prevents corrupting short acronyms (sql, aws, css) or tech tokens (c++, node.js).

4. Beyond Keywords: Deterministic ATS Hygiene Checks & Text-Based PDF

Even with strong keyword overlap, resumes get dropped for structural issues. In the same pure core.js module, we run deterministic checks for:

  • Missing contact details
  • Bullets without measurable numbers
  • Weak openers (like "Responsible for")
  • Overlong bullets, missing dates, decorative symbols, and overall length

For PDF export, instead of rasterizing your resume to a <canvas> image (which many ATS parsers cannot read at all), we use a clean single-column (or reading-order-preserving two-column) print stylesheet with browser print-to-PDF. Every character remains selectable text, A4/Letter friendly, and compatible with JSON Resume save/load.

Try It Free (Zero Uploads, Zero Dependencies)

You can also browse our other free browser tools and templates at quietstack-labs.github.io.

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.