Methodology and Integration Manual

Mathematical guidelines, software architecture paths, and details on adding custom text analyzers.

System Architecture Overview

NLPinSEO.com is built as an ultra-fast, statically-optimized **Next.js 15 App Router** application with full **TypeScript** type checking.

To achieve maximum SEO crawl-budget performance and core web vitals speed, all text calculations, regex parsers, and node map mappings compile as modular **client-side TypeScript objects**. This enables immediate execution inside the client browser playground without relying on heavy external API roundtrips.

How to Add a New Tool in 3 Steps

Integrating a new text diagnostic or semantic auditor is simple and modular:

  1. Create the Analyzer Calculations file:

    Add your string processing or scoring equations file in /lib/analyzers/myanalyzer.ts:

    export const MyAnalyzer = {
      run(text: string, title: string) {
        // Custom regex or mathematical models here
        const score = Math.round(50 + Math.abs(Math.sin(text.length)) * 40);
        return { title, score };
      }
    };
  2. Register inside the loader catalog:

    Map your new analyzer inside the central registry /lib/analyzers/registry.ts:

    import { MyAnalyzer } from "./myanalyzer";
    
    export const ANALYZER_REGISTRY = {
      // Add entry:
      "my-custom-tool": {
        id: "my-custom-tool",
        name: "My Custom Scorer",
        category: "seo-ai-optimization",
        run: MyAnalyzer.run
      }
    };
  3. Append attributes to the database catalog:

    Include descriptions, difficulty badges, input requirements, and priority flags inside /data/tools.ts. The dynamic route will automatically pre-render the matching pages!

Under the Hood: Mathematical Models

1. Okapi BM25 Lexical Scoring

BM25 ranks candidate documents based on the query terms appearing in each document. It incorporates term frequency saturation and document length normalization:

Score(D, Q) = ∑ [ IDF(qi) · (f(qi, D) · (k1 + 1)) / (f(qi, D) + k1 · (1 - b + b · (|D| / avgdl))) ]
2. Sentence-BERT Cosine Meaning Overlap

High-dimensional vectors mapped from deep encoders are compared by calculating the cosine angle direction:

Cosine Similarity = (A · B) / (||A|| ||B||)

Vercel Deployment Checklist

The website is fully optimized for continuous git integration on **Vercel**:

  • Connect your repository to your Vercel team dashboard.
  • Select **Next.js** as your deployment preset. Vercel resolves standard tsconfig parameters automatically.
  • Enable Edge pre-rendering for maximum performance.
  • Click Deploy. Vercel maps all static routes (FAQs, articles, glossaries) in under 2 minutes!