{
  "id": "task_libraries:nlp/javascript",
  "path": "/exapedia/javascript-nlp-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript NLP libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript NLP libraries analyze text in Node.js and the browser, from splitting it into tokens to tagging words and detecting its language. Local libraries process text with rules, statistics, or pretrained models instead of a hosted API. These libraries let apps and AI agents count model tokens, classify text, and tag parts of speech."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript NLP libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#openai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F123"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F125"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#js-tiktoken",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#huggingface-transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#gpt-tokenizer",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#natural",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F218"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#franc-min",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F235"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#compromise",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F255"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#openai",
          "label": [
            {
              "t": "text",
              "text": "OpenAI Node"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F124"
        },
        {
          "t": "text",
          "text": ", a count that covers every use of the OpenAI API rather than text analysis alone."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Local processing",
            "Tag words"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#openai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F123"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#js-tiktoken",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#huggingface-transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#gpt-tokenizer",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#natural",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F218"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#franc-min",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F235"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#compromise",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F255"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "openai",
          "name": [
            {
              "t": "fact",
              "fact": "F123"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/openai/openai-node"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/openai"
            },
            {
              "label": "Docs",
              "href": "https://github.com/openai/openai-node#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F130"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F124"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F125"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/openai/openai-node#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F123"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchainjs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F140"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async _call(values: ChainValues): Promise<ChainValues> {\n  const text = values[this.inputKey];\n  const moderationRequest: OpenAIClient.ModerationCreateParams = {\n    input: text,\n  };\n  let mod;\n  try {\n    mod = await this.caller.call(() =>\n      this.client.moderations.create(moderationRequest)\n    );\n  } catch (error) {\n    // eslint-disable-next-line no-instanceof/no-instanceof\n    if (error instanceof Error) {\n      throw error;\n    } else {\n      throw new Error(error as string);\n    }\n  }\n  const output = this._moderate(text, mod.results[0]);\n  return {\n    [this.outputKey]: output,\n    results: mod.results,\n  };\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchainjs/blob/ff0dc580a71268b098e5ac2ee68b7d98317727ed/langchain/src/chains/openai_moderation.ts#L124-L147",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=openai%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F123"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import OpenAI from 'openai'\n\nconst client = new OpenAI()\nconst result = await client.moderations.create({ input: 'Hello, world!' })\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/openai/openai-node/blob/main/src/resources/moderations.ts",
                  "label": [
                    {
                      "t": "text",
                      "text": "moderations.ts"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F128"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "ai",
          "name": [
            {
              "t": "fact",
              "fact": "F142"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/vercel/ai"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/ai"
            },
            {
              "label": "Docs",
              "href": "https://ai-sdk.dev/docs"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F149"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://ai-sdk.dev/docs",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/zaidmukaddam/scira",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F159"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async function rerankResults<T>(\n  items: T[],\n  query: string,\n  createDocument: (item: T) => string,\n  topN?: number,\n): Promise<T[]> {\n  if (items.length === 0) return items;\n\n  try {\n    const documents = items.map(createDocument);\n    const { ranking } = await rerank({\n      model: cohere.reranking('rerank-v4.0-pro'),\n      query,\n      documents,\n      topN: topN || items.length,\n    });\n\n    return ranking.map((r) => items[r.originalIndex]);\n  } catch (error) {\n    console.error('Reranking failed, returning original order:', error);\n    return items;\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/zaidmukaddam/scira/blob/e1692f5bdec7ec3f6482a24e0c6cf9b483d810f9/lib/tools/spotify-search.ts#L266-L288",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F158"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=ai%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { rerank } from 'ai'\nimport { cohere } from '@ai-sdk/cohere'\n\nconst result = await rerank({ model: cohere.reranking('rerank-v4.0-pro'), query: 'rain', documents: ['a rainy day', 'a sunny day'] })\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ai-sdk.dev/docs/ai-sdk-core/reranking",
                  "label": [
                    {
                      "t": "text",
                      "text": "reranking"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F147"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "js-tiktoken",
          "name": [
            {
              "t": "fact",
              "fact": "F161"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/dqbd/tiktoken"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/js-tiktoken"
            },
            {
              "label": "Docs",
              "href": "https://github.com/dqbd/tiktoken#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F168"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/dqbd/tiktoken#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F161"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { getEncoding } from 'js-tiktoken'\n\nconst encoder = getEncoding('gpt2')\nconst tokenIds = encoder.encode('hello world')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/dqbd/tiktoken/blob/main/js/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=js-tiktoken%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F161"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F166"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "huggingface-transformers",
          "name": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/huggingface/transformers.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@huggingface/transformers"
            },
            {
              "label": "Docs",
              "href": "https://github.com/huggingface/transformers.js#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F184"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/transformers.js#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/transformers.js-examples",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async (event) => {\n  // Retrieve the translation pipeline. When called for the first time,\n  // this will load the pipeline and save it for future use.\n  const translator = await MyTranslationPipeline.getInstance((x) => {\n    // We also add a progress callback to the pipeline so that we can\n    // track model loading.\n    self.postMessage(x);\n  });\n\n  // Capture partial output as it streams from the pipeline\n  const streamer = new TextStreamer(translator.tokenizer, {\n    skip_prompt: true,\n    skip_special_tokens: true,\n    callback_function: function (text) {\n      self.postMessage({\n        status: \"update\",\n        output: text,\n      });\n    },\n  });\n\n  // Actually perform the translation\n  const output = await translator(event.data.text, {\n    tgt_lang: event.data.tgt_lang,\n    src_lang: event.data.src_lang,\n\n    // Allows for partial output\n    streamer,\n  });\n\n  // Send the output back to the main thread\n  self.postMessage({\n    status: \"complete\",\n    output,\n  });\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/transformers.js-examples/blob/204b0948e88cd2bdc046316e78b754359653caea/react-translator/src/worker.js#L23-L58",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40huggingface/transformers%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { pipeline } from '@huggingface/transformers'\n\nconst classifier = await pipeline('sentiment-analysis')\nconst result = await classifier('I love transformers!')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/transformers.js/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "gpt-tokenizer",
          "name": [
            {
              "t": "fact",
              "fact": "F196"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/niieani/gpt-tokenizer"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/gpt-tokenizer"
            },
            {
              "label": "Docs",
              "href": "https://github.com/niieani/gpt-tokenizer#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F203"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/niieani/gpt-tokenizer#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/onlook-dev/onlook",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F212"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export async function countTokensWithRoles(messages: ChatMessage[]): Promise<number> {\n    const perMessageExtra = 4; // ~role + metadata tokens (OpenAI chat format)\n    const perReplyExtra = 2; // for assistant reply priming\n    let total = 0;\n    for (const m of messages) {\n        const content = m.parts\n            .map((p) => {\n                if (p.type === 'text') {\n                    return (p as TextUIPart).text;\n                } else if (p.type.startsWith('tool-')) {\n                    return JSON.stringify((p as ToolUIPart).input); // TODO: check if this is correct\n                }\n                return '';\n            })\n            .join('');\n        total += encode(content).length + perMessageExtra;\n    }\n    return total + perReplyExtra;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/onlook-dev/onlook/blob/1f6e0258f461c3ca9a72ccb989c78d1cbff9de29/packages/ai/src/tokens/index.ts#L5-L23",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=gpt-tokenizer%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/continuedev/continue",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F216"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "function countToolCallFunctionTokens(\n  toolCallFunction: { name?: string; arguments?: string } | undefined,\n): number {\n  if (!toolCallFunction) {\n    return 0;\n  }\n\n  let tokenCount = 0;\n  tokenCount += encode(toolCallFunction.name ?? \"\").length + 10; // Function name and structure overhead\n  tokenCount += encode(toolCallFunction.arguments ?? \"\").length; // Arguments\n  return tokenCount;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/extensions/cli/src/util/tokenizer.ts#L67",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F215"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=gpt-tokenizer%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { encode } from 'gpt-tokenizer'\n\nconst tokenIds = encode('Hello, world!')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/niieani/gpt-tokenizer/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "natural",
          "name": [
            {
              "t": "fact",
              "fact": "F218"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/NaturalNode/natural"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/natural"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/NaturalNode/natural",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F218"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/zxcvbn-ts/zxcvbn",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "const getTokens = async (inputDir: string, counter: TopTokenCounter) => {\n  // const tokenizer = tokenizerZh\n  // const tokenizer = new natural.TokenizerJa()\n  const tokenizer = new natural.AggressiveTokenizerRu()\n  let lines = 0\n  let filesProcessedCounter = 0\n  const files: string[] = fs.globSync(`${inputDir}/**/wiki_*`)\n  for (const filePath of files) {\n    const readInterface = readline.createInterface({\n      input: fs.createReadStream(filePath),\n      terminal: false,\n    })\n    await readLinePromise(readInterface, (line: string) => {\n      const tokens = tokenizer.tokenize(line) ?? []\n      counter.addTokens(tokens)\n      lines += 1\n      if (lines % SENTENCES_PER_BATCH === 0) {\n        counter.batchPrune()\n        console.info(counter.getStats(), `processing: ${filePath}`)\n      }\n    })\n    filesProcessedCounter += 1\n    console.info(\n      counter.getStats(),\n      `processed: ${filePath} ${filesProcessedCounter}/${files.length} `,\n    )\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/zxcvbn-ts/zxcvbn/blob/83efdae34558e792547559a0bf7e4bd7a1477ec7/data-scripts/wikiExtractor/index.ts#L158-L185",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F232"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20natural%20for%20natural%20language%20processing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F218"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import natural from 'natural'\n\nconst tokenizer = new natural.WordTokenizer()\nconst words = tokenizer.tokenize('your dog has fleas.')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://naturalnode.github.io/natural/Tokenizers.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "sentiment_analysis.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F223"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "franc-min",
          "name": [
            {
              "t": "fact",
              "fact": "F235"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/wooorm/franc"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/franc-min"
            },
            {
              "label": "Docs",
              "href": "https://github.com/wooorm/franc/tree/main#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F242"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/wooorm/franc/tree/main#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F235"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/RSSNext/Folo",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F253"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export const checkLanguage = ({\n  content,\n  language,\n}: {\n  content: string\n  language: SupportedActionLanguage\n}) => {\n  if (!content) return true\n  const pureContent = parseHtml(content)\n    .toText()\n    .replaceAll(/https?:\\/\\/\\S+|www\\.\\S+/g, \" \")\n  const { code } = ACTION_LANGUAGE_MAP[language]\n  if (!code) {\n    return false\n  }\n\n  const sourceLanguage = franc(duplicateIfLengthLessThan(pureContent, 20), {\n    only: detectableLanguageCodes,\n  })\n\n  return sourceLanguage === code\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/RSSNext/Folo/blob/292d15d94f9e7680899e1e2567c1c0d48a423f48/packages/internal/utils/src/language.ts#L12-L33",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=franc-min%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F235"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { franc } from 'franc-min'\n\nconst language = franc('All human beings are born free and equal in dignity and rights.')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/wooorm/franc/blob/main/readme.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "readme.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F240"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "compromise",
          "name": [
            {
              "t": "fact",
              "fact": "F255"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/spencermountain/compromise"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/compromise"
            },
            {
              "label": "Docs",
              "href": "https://compromise.cool"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F35"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://compromise.cool",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F255"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F36"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import nlp from 'compromise'\n\nconst doc = nlp('she sells seashells by the seashore.')\nconst past = doc.verbs().toPastTense().text()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/spencermountain/compromise/blob/master/docs/concepts.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "concepts.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20compromise%20for%20natural%20language%20processing&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F255"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F260"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript NLP library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#compromise",
          "label": [
            {
              "t": "text",
              "text": "compromise"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits rule-based English tagging and text transformation. "
        },
        {
          "t": "link",
          "href": "#natural",
          "label": [
            {
              "t": "text",
              "text": "Natural"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits tokenizers, stemmers, and classifiers in Node.js. "
        },
        {
          "t": "link",
          "href": "#huggingface-transformers",
          "label": [
            {
              "t": "text",
              "text": "Transformers.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits pretrained models for tasks such as translation and token classification."
        }
      ]
    },
    {
      "q": "What is the OpenAI moderation API?",
      "a": [
        {
          "t": "text",
          "text": "The OpenAI moderation API classifies text into predefined moderation categories. "
        },
        {
          "t": "link",
          "href": "#openai",
          "label": [
            {
              "t": "text",
              "text": "OpenAI Node"
            }
          ]
        },
        {
          "t": "text",
          "text": " calls it as a hosted service rather than running a local model."
        }
      ]
    },
    {
      "q": "How do I count tokens in JavaScript?",
      "a": [
        {
          "t": "link",
          "href": "#js-tiktoken",
          "label": [
            {
              "t": "text",
              "text": "js-tiktoken"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#gpt-tokenizer",
          "label": [
            {
              "t": "text",
              "text": "gpt-tokenizer"
            }
          ]
        },
        {
          "t": "text",
          "text": " encode text into the BPE token IDs that OpenAI models read. Both run locally in pure JavaScript."
        }
      ]
    },
    {
      "q": "What is Transformers.js?",
      "a": [
        {
          "t": "link",
          "href": "#huggingface-transformers",
          "label": [
            {
              "t": "text",
              "text": "Transformers.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " runs pretrained NLP pipelines and tokenizers locally in the browser or Node.js. The available tasks and languages depend on the model."
        }
      ]
    },
    {
      "q": "How do I detect the language of text in JavaScript?",
      "a": [
        {
          "t": "link",
          "href": "#franc-min",
          "label": [
            {
              "t": "text",
              "text": "franc-min"
            }
          ]
        },
        {
          "t": "text",
          "text": " identifies the language of a text from statistical evidence across the whole text. It returns a language code rather than tags for each word."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, natural",
      "display": "Natural",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, natural",
      "display": "7.3M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, natural",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, natural",
      "display": "8.2.6",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, natural",
      "display": "v8.2.6",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, natural",
      "display": "10.9K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Tokenization, natural",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "POS tagging, natural",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Sentiment, natural",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Output formats, natural",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, natural",
      "display": "npm install natural",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, natural",
      "display": "Provides tokenizers, classifiers, word scoring, and other NLP algorithms for Node.js.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, natural",
      "display": "Configures token boundaries",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, natural",
      "display": "Choose word, Treebank, or regular-expression tokenizers for the input.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, natural",
      "display": "Trains reusable text classifiers",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, natural",
      "display": "Train a BayesClassifier on labeled text, then classify new inputs.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, natural",
      "display": "Sentiment follows word vocabularies",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, natural",
      "display": "Scores sum word polarities and account for negation.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "Quickstart, natural",
      "display": "var Analyzer = require('natural').SentimentAnalyzer;\nvar stemmer = require('natural').PorterStemmer;\nvar analyzer = new Analyzer(\"English\", stemmer, \"afinn\");\n// getSentiment expects an array of strings\nconsole.log(analyzer.getSentiment([\"I\", \"like\", \"cherries\"]));\n// 0.6666666666666666\n\n",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Project function, natural",
      "display": "const getTokens = async (inputDir: string, counter: TopTokenCounter) => {\n  // const tokenizer = tokenizerZh\n  // const tokenizer = new natural.TokenizerJa()\n  const tokenizer = new natural.AggressiveTokenizerRu()\n  let lines = 0\n  let filesProcessedCounter = 0\n  const files: string[] = fs.globSync(`${inputDir}/**/wiki_*`)\n  for (const filePath of files) {\n    const readInterface = readline.createInterface({\n      input: fs.createReadStream(filePath),\n      terminal: false,\n    })\n    await readLinePromise(readInterface, (line: string) => {\n      const tokens = tokenizer.tokenize(line) ?? []\n      counter.addTokens(tokens)\n      lines += 1\n      if (lines % SENTENCES_PER_BATCH === 0) {\n        counter.batchPrune()\n        console.info(counter.getStats(), `processing: ${filePath}`)\n      }\n    })\n    filesProcessedCounter += 1\n    console.info(\n      counter.getStats(),\n      `processed: ${filePath} ${filesProcessedCounter}/${files.length} `,\n    )\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function reference, natural",
      "display": "index.ts · getTokens()",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project repository, natural",
      "display": "zxcvbn-ts/zxcvbn",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project stars, zxcvbn-ts/zxcvbn",
      "display": "1.2K",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project push date, zxcvbn-ts/zxcvbn",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F25": {
      "label": "Library name, compromise",
      "display": "compromise",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Monthly downloads, compromise",
      "display": "5.5M",
      "asOf": "2026-11-15"
    },
    "F27": {
      "label": "License, compromise",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Package release, compromise",
      "display": "14.20.0",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Undated package release, compromise",
      "display": "v14.20.0",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Repository stars, compromise",
      "display": "12.2K",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Tokenization, compromise",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "POS tagging, compromise",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Entity extraction, compromise",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Install, compromise",
      "display": "npm install compromise",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "What it does, compromise",
      "display": "Provides rule-based English text tagging, selection, and transformation.",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "strengths lead, compromise",
      "display": "Selects and transforms text",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths, compromise",
      "display": "Find matching text spans and change their grammar through chained methods.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, compromise",
      "display": "Supports custom words and tags",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, compromise",
      "display": "Add domain vocabulary at parse time or through global lexicon methods.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "limitations lead, compromise",
      "display": "Transforms mutate the shared document",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations, compromise",
      "display": "Call clone before transforming a copy that must preserve the original.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, compromise",
      "display": "Matches stay within sentence boundaries",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, compromise",
      "display": "Use the paragraphs plugin when a match must cross sentences.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "Quickstart, compromise",
      "display": "import nlp from 'compromise'\n\nlet doc = nlp('she sells seashells by the seashore.')\ndoc.verbs().toPastTense()\ndoc.text()\n// 'she sold seashells by the seashore.'\n",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Project function, compromise",
      "display": "export function createCompletenessScorer() {\n  return createScorer({\n    id: 'completeness-scorer',\n    name: 'Completeness Scorer',\n    description:\n      'Leverage the nlp method from \"compromise\" to extract elements from the input and output and calculate the coverage.',\n    type: 'agent',\n  })\n    .preprocess(async ({ run }) => {\n      const isInputInvalid =\n        !run.input ||\n        run.input.inputMessages.some((i: MastraDBMessage) => {\n          const content = getTextContentFromMastraDBMessage(i);\n          return content === null || content === undefined;\n        });\n\n      const isOutputInvalid =\n        !run.output ||\n        run.output.some((i: MastraDBMessage) => {\n          const content = getTextContentFromMastraDBMessage(i);\n          return content === null || content === undefined;\n        });\n\n      if (isInputInvalid || isOutputInvalid) {\n        throw new Error('Inputs cannot be null or undefined');\n      }\n\n      const input = run.input?.inputMessages.map(i => getTextContentFromMastraDBMessage(i)).join(', ') || '';\n      const output = run.output?.map(i => getTextContentFromMastraDBMessage(i)).join(', ') || '';\n\n      const inputToProcess = input;\n      const outputToProcess = output;\n\n      const inputDoc = nlp(inputToProcess.trim());\n      const outputDoc = nlp(outputToProcess.trim());\n\n      // Extract and log elements\n      const inputElements = extractElements(inputDoc);\n      const outputElements = extractElements(outputDoc);\n\n      return {\n        inputElements,\n        outputElements,\n        missingElements: inputElements.filter(e => !outputElements.includes(e)),\n        elementCounts: {\n          input: inputElements.length,\n          output: outputElements.length,\n        },\n      };\n    })\n    .generateScore(({ results }) => {\n      const inputElements = results.preprocessStepResult?.inputElements;\n      const outputElements = results.preprocessStepResult?.outputElements;\n\n      return calculateCoverage({\n        original: inputElements,\n        simplified: outputElements,\n      });\n    });\n}\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function reference, compromise",
      "display": "index.ts · createCompletenessScorer()",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project repository, compromise",
      "display": "mastra-ai/mastra",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project stars, mastra-ai/mastra",
      "display": "29.6K",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project push date, mastra-ai/mastra",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F50": {
      "label": "Library name, wink-nlp",
      "display": "winkNLP",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Monthly downloads, wink-nlp",
      "display": "1.5M",
      "asOf": "2026-11-15"
    },
    "F52": {
      "label": "License, wink-nlp",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Package release, wink-nlp",
      "display": "2.4.0",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Undated package release, wink-nlp",
      "display": "v2.4.0",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Repository stars, wink-nlp",
      "display": "1.4K",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Tokenization, wink-nlp",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "POS tagging, wink-nlp",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Entity extraction, wink-nlp",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Sentiment, wink-nlp",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Install, wink-nlp",
      "display": "npm install wink-nlp wink-eng-lite-web-model",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "What it does, wink-nlp",
      "display": "Provides document, sentence, token, and entity APIs with installable language models.",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths lead, wink-nlp",
      "display": "Returns structured text collections",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths, wink-nlp",
      "display": "Use readDoc to access tokens, sentences, and entities from one document.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, wink-nlp",
      "display": "Combines model annotation stages",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, wink-nlp",
      "display": "Select a model pipeline with tagging, entities, negation, and sentiment annotations.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations lead, wink-nlp",
      "display": "Language models install separately",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations, wink-nlp",
      "display": "Install a compatible model package before creating the NLP pipeline.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "Quickstart, wink-nlp",
      "display": "// Load wink-nlp package.\nconst winkNLP = require( 'wink-nlp' );\n// Load english language model.\nconst model = require( 'wink-eng-lite-web-model' );\n// Instantiate winkNLP.\nconst nlp = winkNLP( model );\n// Obtain \"its\" helper to extract item properties.\nconst its = nlp.its;\n// Obtain \"as\" reducer helper to reduce a collection.\nconst as = nlp.as;\n \n// NLP Code.\nconst text = 'Hello   World🌎! How are you?';\nconst doc = nlp.readDoc( text );\n \nconsole.log( doc.out() );\n// -> Hello   World🌎! How are you?\n \nconsole.log( doc.sentences().out() );\n// -> [ 'Hello   World🌎!', 'How are you?' ]\n \nconsole.log( doc.entities().out( its.detail ) );\n// -> [ { value: '🌎', type: 'EMOJI' } ]\n \nconsole.log( doc.tokens().out() );\n// -> [ 'Hello', 'World', '🌎', '!', 'How', 'are', 'you', '?' ]\n \nconsole.log( doc.tokens().out( its.type, as.freqTable ) );\n// -> [ [ 'word', 5 ], [ 'punctuation', 2 ], [ 'emoji', 1 ] ]\n",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Project function, wink-nlp",
      "display": "export function extractKeyword(text: string): string | undefined {\n  const doc = nlp.readDoc(text)\n\n  const candidates: string[] = []\n  doc.tokens().each((t) => {\n    const pos = t.out(its.pos) // e.g. \"NOUN\", \"PROPN\"\n    const value = t.out(its.normal)\n    if ((pos === 'NOUN' || pos === 'PROPN') && !stopTerms.has(value)) {\n      candidates.push(value)\n    }\n  })\n\n  return candidates[0]\n}\n",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Project function reference, wink-nlp",
      "display": "extractKeyword.ts · extractKeyword()",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project repository, wink-nlp",
      "display": "regenrek/deepwiki-mcp",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project stars, regenrek/deepwiki-mcp",
      "display": "1.4K",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project push date, regenrek/deepwiki-mcp",
      "display": "Mar 2026",
      "asOf": "2026-03-20"
    },
    "F74": {
      "label": "Library name, node-nlp",
      "display": "NLP.js",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Monthly downloads, node-nlp",
      "display": "144.3K",
      "asOf": "2026-11-15"
    },
    "F76": {
      "label": "License, node-nlp",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Package release, node-nlp",
      "display": "5.0.0-alpha.5",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Undated package release, node-nlp",
      "display": "v5.0.0-alpha.5",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Repository stars, node-nlp",
      "display": "6.6K",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Tokenization, node-nlp",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Entity extraction, node-nlp",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Sentiment, node-nlp",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Output formats, node-nlp",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Install, node-nlp",
      "display": "npm install node-nlp",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "What it does, node-nlp",
      "display": "Provides intent classification, entity extraction, and sentiment processing for conversational applications.",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths lead, node-nlp",
      "display": "Trains intent classifiers",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "strengths, node-nlp",
      "display": "Provide labeled utterances, then train and process user messages.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, node-nlp",
      "display": "Combines entities and sentiment",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, node-nlp",
      "display": "Process an utterance to return intent, entity, and sentiment results.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "limitations lead, node-nlp",
      "display": "Unknown words favor fallback intents",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "limitations, node-nlp",
      "display": "Unseen training words increase the weight of the None intent.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, node-nlp",
      "display": "Entity variables exclude periods",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, node-nlp",
      "display": "Use matching underscore-based entity names in intents and answers.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Quickstart, node-nlp",
      "display": "const { NlpManager } = require('node-nlp');\n\nconst manager = new NlpManager({ languages: ['en'], forceNER: true });\n// Adds the utterances and intents for the NLP\nmanager.addDocument('en', 'goodbye for now', 'greetings.bye');\nmanager.addDocument('en', 'bye bye take care', 'greetings.bye');\nmanager.addDocument('en', 'okay see you later', 'greetings.bye');\nmanager.addDocument('en', 'bye for now', 'greetings.bye');\nmanager.addDocument('en', 'i must go', 'greetings.bye');\nmanager.addDocument('en', 'hello', 'greetings.hello');\nmanager.addDocument('en', 'hi', 'greetings.hello');\nmanager.addDocument('en', 'howdy', 'greetings.hello');\n\n// Train also the NLG\nmanager.addAnswer('en', 'greetings.bye', 'Till next time');\nmanager.addAnswer('en', 'greetings.bye', 'see you soon!');\nmanager.addAnswer('en', 'greetings.hello', 'Hey there!');\nmanager.addAnswer('en', 'greetings.hello', 'Greetings!');\n\n// Train and save the model.\n(async() => {\n    await manager.train();\n    manager.save();\n    const response = await manager.process('en', 'I should go now');\n    console.log(response);\n})();\n",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Developer need",
      "display": "Finding and transforming English phrases",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Why choose compromise",
      "display": "rule-based text selection and transformations",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Developer need in introduction",
      "display": "finding and transforming English phrases",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Developer need",
      "display": "Training a text classifier",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Why choose natural",
      "display": "labeled-document classifier training",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need in introduction",
      "display": "training a text classifier",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "When to consider node-nlp",
      "display": "intent, entity, and sentiment processing should be combined",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need",
      "display": "Reading annotated document collections",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Why choose wink-nlp",
      "display": "token, sentence, and entity collection APIs",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need in introduction",
      "display": "reading annotated document collections",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "When to consider compromise",
      "display": "transforming matched English phrases matters more",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need",
      "display": "Processing conversational intents",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose node-nlp",
      "display": "combined intent, entity, and sentiment output",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "processing conversational intents",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Page introduction",
      "display": "JavaScript NLP libraries let text-processing developers analyze and process natural-language text.",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "FAQ: Which library directly transforms matched English phrases?",
      "display": "compromise supports finding text spans and transforming them through its rule-based API.",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "FAQ: Does selecting a text view isolate later mutations?",
      "display": "compromise views share a document; transform a clone to preserve the original.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Can a compromise match cross sentence boundaries?",
      "display": "Default matching stays within a sentence; the paragraphs plugin supports multi-sentence matching.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Are all compromise import tiers equivalent?",
      "display": "The full build includes named selections, while the smallest build provides tokenization without tags.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Can token boundaries be selected explicitly?",
      "display": "Natural provides word, regular-expression, and Treebank tokenizers.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: What does JSON output mean in this comparison?",
      "display": "Natural saves a trained classifier to classifier.json.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: What does JSON output mean in this comparison?",
      "display": "NLP.js exports and imports a model in JSON format; these are model artifacts.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: What does the Natural sentiment score represent?",
      "display": "The analyzer sums vocabulary word polarities, normalizes by sentence length, and handles negation.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Does installing winkNLP include a ready model?",
      "display": "Its installation instructions require a separate compatible language model.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: What does winkNLP readDoc return?",
      "display": "It returns a document containing tokens, sentences, and entities.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Does part-of-speech tagging imply a dependency tree?",
      "display": "compromise tags words but explicitly excludes dependency/parse trees.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Why can NLP.js return the fallback intent for unfamiliar wording?",
      "display": "Unseen training words contribute weight to its None intent by default.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Can NLP.js entity variables use periods?",
      "display": "Use underscore-based names and match variable names between intents and answers.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "Library name, openai",
      "display": "openai",
      "asOf": "2026-11-20"
    },
    "F124": {
      "label": "Monthly downloads, openai",
      "display": "223.6M",
      "asOf": "2026-11-20"
    },
    "F125": {
      "label": "License, openai",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F126": {
      "label": "Package release, openai",
      "display": "7.60.0",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Package release date, openai",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Install, openai",
      "display": "npm install openai",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Quickstart, openai",
      "display": "import OpenAI from 'openai'\n\nconst client = new OpenAI()\nconst result = await client.moderations.create({ input: 'Hello, world!' })\n",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Official description, openai",
      "display": "Provides the official TypeScript library for the OpenAI API.",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Quickstart source file, openai",
      "display": "src/resources/moderations.ts",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Repository stars, openai",
      "display": "11.3K",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Local processing, openai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Tag words, openai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Native NLP operation, openai",
      "display": "Hosted predefined moderation classification through official Node API client; generic SDK counter covers far more than NLP moderation.",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "First-call prerequisites, openai",
      "display": "Server-side SDK setup with configured authorized API key/network access. Default constructor uses configured environment only if user executes it; none was read here. Moderation model is optional per current API. Browser-secret exposure is not required or recommended by this recipe.",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Original project API contract, openai",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole LangChain OpenAIModerationChain._call method. Actual constructor binds this.client=new OpenAIClient(clientConfig); the integration package runtime index reexports OpenAI as OpenAIClient directly from openai. Current7.60 ModerationCreateParams accepts input text and optional model. Method deliberately omits model rather than hard-coding a retired text-moderation identifier. Local AsyncCaller retry wrapper is not counted as a second native operation.\", \"return_shape\": \"Native response has results array of Moderation,including flagged,categories,and category_scores. Host uses first result.flagged to pass text or return/throw its original policy message,then returns all results. Scores are provider/model outputs,not interchangeable task accuracy or calibrated linguistic probabilities. This performs hosted moderation if executed; no service request,API key,or environment secret was accessed.\"}",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Project function, openai",
      "display": "async _call(values: ChainValues): Promise<ChainValues> {\n  const text = values[this.inputKey];\n  const moderationRequest: OpenAIClient.ModerationCreateParams = {\n    input: text,\n  };\n  let mod;\n  try {\n    mod = await this.caller.call(() =>\n      this.client.moderations.create(moderationRequest)\n    );\n  } catch (error) {\n    // eslint-disable-next-line no-instanceof/no-instanceof\n    if (error instanceof Error) {\n      throw error;\n    } else {\n      throw new Error(error as string);\n    }\n  }\n  const output = this._moderate(text, mod.results[0]);\n  return {\n    [this.outputKey]: output,\n    results: mod.results,\n  };\n}\n",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Project source file, openai",
      "display": "langchain/src/chains/openai_moderation.ts",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Project full_name, openai",
      "display": "langchain-ai/langchainjs",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project stargazers_count, openai",
      "display": "18.4K",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Library name, ai",
      "display": "AI SDK",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Monthly downloads, ai",
      "display": "172.3M",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "License, ai",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Package release, ai",
      "display": "7.0.177",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Package release date, ai",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Install, ai",
      "display": "npm install ai @ai-sdk/cohere",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Quickstart, ai",
      "display": "import { rerank } from 'ai'\nimport { cohere } from '@ai-sdk/cohere'\n\nconst result = await rerank({ model: cohere.reranking('rerank-v4.0-pro'), query: 'rain', documents: ['a rainy day', 'a sunny day'] })\n",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Official description, ai",
      "display": "Builds AI apps with a single interface for any model provider.",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Quickstart source file, ai",
      "display": "reranking",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Repository stars, ai",
      "display": "28.1K",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Local processing, ai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Tag words, ai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Native NLP operation, ai",
      "display": "Provider-neutral trained query-document reranking through native rerank API plus named provider model; broad SDK installations are not reranker adoption.",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "First-call prerequisites, ai",
      "display": "Install official provider companion and configure provider authorization/network access. Inputs are literal sample documents; this is semantic relevance scoring,not language tagging or generic text generation. No service request executed.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Original project API contract, ai",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole25-line Scira rerankResults helper. Generic caller items are converted to text documents through the supplied application mapper. Current AI SDK7 accepts a named provider RerankingModel,query string,document array,and topN. Official @ai-sdk/cohere.reranking model factory is a separate companion-provider API,not counted as another ai package method. Empty items return before invoking the model; original topN||items.length chooses full length for zero/undefined.\", \"return_shape\": \"ranking contains originalIndex,score,and document; function maps original indices back to original item objects. Provider/model errors return original order through unchanged catch branch. It does not promise successful ranking or probability calibration. Named Cohere model and paid/authorized provider access are host requirements; no credential,search,or provider request ran.\"}",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Project function, ai",
      "display": "async function rerankResults<T>(\n  items: T[],\n  query: string,\n  createDocument: (item: T) => string,\n  topN?: number,\n): Promise<T[]> {\n  if (items.length === 0) return items;\n\n  try {\n    const documents = items.map(createDocument);\n    const { ranking } = await rerank({\n      model: cohere.reranking('rerank-v4.0-pro'),\n      query,\n      documents,\n      topN: topN || items.length,\n    });\n\n    return ranking.map((r) => items[r.originalIndex]);\n  } catch (error) {\n    console.error('Reranking failed, returning original order:', error);\n    return items;\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Project source file, ai",
      "display": "lib/tools/spotify-search.ts",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project full_name, ai",
      "display": "zaidmukaddam/scira",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project stargazers_count, ai",
      "display": "12.0K",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Library name, js-tiktoken",
      "display": "js-tiktoken",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Monthly downloads, js-tiktoken",
      "display": "49.4M",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "License, js-tiktoken",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Package release, js-tiktoken",
      "display": "1.0.21",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Package release date, js-tiktoken",
      "display": "Aug 2025",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Install, js-tiktoken",
      "display": "npm install js-tiktoken",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Quickstart, js-tiktoken",
      "display": "import { getEncoding } from 'js-tiktoken'\n\nconst encoder = getEncoding('gpt2')\nconst tokenIds = encoder.encode('hello world')\n",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Official description, js-tiktoken",
      "display": "Ports the tiktoken tokenizer to JavaScript.",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Quickstart source file, js-tiktoken",
      "display": "js/README.md",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Repository stars, js-tiktoken",
      "display": "1.1K",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Local processing, js-tiktoken",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Tag words, js-tiktoken",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Native NLP operation, js-tiktoken",
      "display": "Pure-JS reversible BPE text/token-ID encoder,not word/POS/language analysis. Same maintained tokenizer family has a separate WASM backend with different APIs/lifecycle.",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "First-call prerequisites, js-tiktoken",
      "display": "Local pure-JS BPE encoding with the literal documented gpt2 encoding. Select the actual model/encoding for an application; this is not every model’s chat-token overhead. No WASM lifecycle/free method needed.",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "JS vs WASM family boundary, js-tiktoken",
      "display": "js-tiktoken is the pure-JS port; tiktoken is the same maintained family’s WASM binding with snake_case helpers and explicit free(). They have distinct implementations/runtime contracts and separate own counters,not summed or presented as two independent tokenizer frameworks. @dqbd/tiktoken is the former package name.",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Two-part original code grant, js-tiktoken",
      "display": "{\"kind\": \"explicit_same_commit_incorporation_plus_independent_full_canonical_terms\", \"notice_path\": \"LICENSE.md\", \"notice_git_blob\": \"e1b6e4b6455a882dbbf66ee0b13101ec584d5e63\", \"canonical_terms_are_git_blob\": false, \"scope\": \"Selected authored consumer source outside ee/;same-commit publisher scope/copyright and referenced Apache2 full canonical body retained separately. Incorporated third-party restrictions preserved;no fabricated repository LICENSE/full-text Git object.\"}",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Library name, @huggingface/transformers",
      "display": "@huggingface/transformers",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Monthly downloads, @huggingface/transformers",
      "display": "19.1M",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "License, @huggingface/transformers",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Package release, @huggingface/transformers",
      "display": "4.3.2",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Package release date, @huggingface/transformers",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Install, @huggingface/transformers",
      "display": "npm install @huggingface/transformers",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Quickstart, @huggingface/transformers",
      "display": "import { pipeline } from '@huggingface/transformers'\n\nconst classifier = await pipeline('sentiment-analysis')\nconst result = await classifier('I love transformers!')\n",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Official description, @huggingface/transformers",
      "display": "Runs Transformers models directly in the browser, with no server.",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Quickstart source file, @huggingface/transformers",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Repository stars, @huggingface/transformers",
      "display": "16.4K",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Local processing, @huggingface/transformers",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Tag words, @huggingface/transformers",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Native NLP operation, @huggingface/transformers",
      "display": "Local pretrained NLP pipelines and tokenizers with model-dependent tasks/languages,including translation and token classification; no generic all-model support implied.",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "First-call prerequisites, @huggingface/transformers",
      "display": "First call downloads model/tokenizer artifacts unless already cached; requires a supported browser/Node ONNX backend and model-appropriate resources. Inference then runs locally. Model-weight licenses/availability are separate from SDK Apache2. No download or inference through SDK executed.",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Original project API contract, @huggingface/transformers",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole original react-translator worker callback receives text plus NLLB src_lang/tgt_lang FLORES codes,loads the real translation pipeline through same-file MyTranslationPipeline.getInstance,and constructs TextStreamer(translator.tokenizer,{skip_prompt:true,skip_special_tokens:true,callback_function}). Published4.3.2 TranslationPipeline example uses the same NLLB model and source/target options; streamer is a supported GenerationFunctionParameters option. Current public TextStreamer accepts the actual tokenizer and all three options. The helper factory uses dtype:q8 and progress_callback; it is not counted as an additional native invocation inside this callback.\", \"used_return_shapes\": \"Native translator returns an array of {translation_text:string}; callback posts that array unchanged as complete output. TextStreamer calls callback_function with decoded string fragments; partial UI messages are not complete translation objects. Native constructors and translator invocation are two separate SDK operations; Worker.postMessage is browser host API,not counted. Model download/storage and available language codes are prerequisites; no inference executed.\"}",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project function, @huggingface/transformers",
      "display": "async (event) => {\n  // Retrieve the translation pipeline. When called for the first time,\n  // this will load the pipeline and save it for future use.\n  const translator = await MyTranslationPipeline.getInstance((x) => {\n    // We also add a progress callback to the pipeline so that we can\n    // track model loading.\n    self.postMessage(x);\n  });\n\n  // Capture partial output as it streams from the pipeline\n  const streamer = new TextStreamer(translator.tokenizer, {\n    skip_prompt: true,\n    skip_special_tokens: true,\n    callback_function: function (text) {\n      self.postMessage({\n        status: \"update\",\n        output: text,\n      });\n    },\n  });\n\n  // Actually perform the translation\n  const output = await translator(event.data.text, {\n    tgt_lang: event.data.tgt_lang,\n    src_lang: event.data.src_lang,\n\n    // Allows for partial output\n    streamer,\n  });\n\n  // Send the output back to the main thread\n  self.postMessage({\n    status: \"complete\",\n    output,\n  });\n}\n",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project source file, @huggingface/transformers",
      "display": "react-translator/src/worker.js",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Project full_name, @huggingface/transformers",
      "display": "huggingface/transformers.js-examples",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Project stargazers_count, @huggingface/transformers",
      "display": "2.1K",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Library name, gpt-tokenizer",
      "display": "gpt-tokenizer",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Monthly downloads, gpt-tokenizer",
      "display": "10.6M",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "License, gpt-tokenizer",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Package release, gpt-tokenizer",
      "display": "4.1.2",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Package release date, gpt-tokenizer",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Install, gpt-tokenizer",
      "display": "npm install gpt-tokenizer",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Quickstart, gpt-tokenizer",
      "display": "import { encode } from 'gpt-tokenizer'\n\nconst tokenIds = encode('Hello, world!')\n",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Official description, gpt-tokenizer",
      "display": "Encodes text as BPE tokens for OpenAI models in pure JavaScript.",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Quickstart source file, gpt-tokenizer",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Repository stars, gpt-tokenizer",
      "display": "862",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Local processing, gpt-tokenizer",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Tag words, gpt-tokenizer",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Native NLP operation, gpt-tokenizer",
      "display": "Independent TypeScript BPE implementation with encoding/model import variants; token IDs and model metadata are not linguistic document tags.",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "First-call prerequisites, gpt-tokenizer",
      "display": "Local encoding with selected release default configuration. For a specific model,choose its documented model import; no universal cross-model token count or billing guarantee.",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Project function, gpt-tokenizer",
      "display": "export async function countTokensWithRoles(messages: ChatMessage[]): Promise<number> {\n    const perMessageExtra = 4; // ~role + metadata tokens (OpenAI chat format)\n    const perReplyExtra = 2; // for assistant reply priming\n    let total = 0;\n    for (const m of messages) {\n        const content = m.parts\n            .map((p) => {\n                if (p.type === 'text') {\n                    return (p as TextUIPart).text;\n                } else if (p.type.startsWith('tool-')) {\n                    return JSON.stringify((p as ToolUIPart).input); // TODO: check if this is correct\n                }\n                return '';\n            })\n            .join('');\n        total += encode(content).length + perMessageExtra;\n    }\n    return total + perReplyExtra;\n}\n",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Project source file, gpt-tokenizer",
      "display": "packages/ai/src/tokens/index.ts",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Project full_name, gpt-tokenizer",
      "display": "onlook-dev/onlook",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Project stargazers_count, gpt-tokenizer",
      "display": "27.3K",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Project function, gpt-tokenizer",
      "display": "function countToolCallFunctionTokens(\n  toolCallFunction: { name?: string; arguments?: string } | undefined,\n): number {\n  if (!toolCallFunction) {\n    return 0;\n  }\n\n  let tokenCount = 0;\n  tokenCount += encode(toolCallFunction.name ?? \"\").length + 10; // Function name and structure overhead\n  tokenCount += encode(toolCallFunction.arguments ?? \"\").length; // Arguments\n  return tokenCount;\n}\n",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Project source file, gpt-tokenizer",
      "display": "extensions/cli/src/util/tokenizer.ts",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Project full_name, gpt-tokenizer",
      "display": "continuedev/continue",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Project stargazers_count, gpt-tokenizer",
      "display": "36.5K",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Library name, natural",
      "display": "Natural",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Monthly downloads, natural",
      "display": "7.6M",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "License, natural",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Package release, natural",
      "display": "8.2.6",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Package release date, natural",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Install, natural",
      "display": "npm install natural",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Quickstart, natural",
      "display": "import natural from 'natural'\n\nconst tokenizer = new natural.WordTokenizer()\nconst words = tokenizer.tokenize('your dog has fleas.')\n",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Repository stars, natural",
      "display": "10.9K",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Local processing, natural",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Tag words, natural",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Native NLP operation, natural",
      "display": "Lexical/statistical NLP toolbox with tokenizers,stemmers,POS tagger,and classifiers; methods and language-specific models differ.",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "First-call prerequisites, natural",
      "display": "Node-compatible module environment with default CJS interop as in actual consumer. WordTokenizer is the basic lexical first call; selected larger Russian corpus workflow uses a different documented tokenizer.",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Original project API contract, natural",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole original zxcvbn-ts corpus-extraction getTokens function. It explicitly chooses native Russian AggressiveTokenizerRu,not a generic WordTokenizer inferred from comments. Current8.2.6 own tokenizer documentation lists the Russian class and shared tokenize interface. Input is text lines from caller-provided wiki_* files. node:fs globSync/read streams and local corpus counters are host prerequisites,not extra Natural operations.\", \"return_shape\": \"Native tokenize returns tokens consumed as string array,with original nullish fallback to empty list. Local counter further normalizes/transliterates/prunes and changes the eventual corpus; those transformations are not promises of the tokenizer. Modern Node with fs.globSync and existing public corpus extracts are required. No corpus/file was read or generated through this application.\"}",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Project function, natural",
      "display": "const getTokens = async (inputDir: string, counter: TopTokenCounter) => {\n  // const tokenizer = tokenizerZh\n  // const tokenizer = new natural.TokenizerJa()\n  const tokenizer = new natural.AggressiveTokenizerRu()\n  let lines = 0\n  let filesProcessedCounter = 0\n  const files: string[] = fs.globSync(`${inputDir}/**/wiki_*`)\n  for (const filePath of files) {\n    const readInterface = readline.createInterface({\n      input: fs.createReadStream(filePath),\n      terminal: false,\n    })\n    await readLinePromise(readInterface, (line: string) => {\n      const tokens = tokenizer.tokenize(line) ?? []\n      counter.addTokens(tokens)\n      lines += 1\n      if (lines % SENTENCES_PER_BATCH === 0) {\n        counter.batchPrune()\n        console.info(counter.getStats(), `processing: ${filePath}`)\n      }\n    })\n    filesProcessedCounter += 1\n    console.info(\n      counter.getStats(),\n      `processed: ${filePath} ${filesProcessedCounter}/${files.length} `,\n    )\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Project source file, natural",
      "display": "data-scripts/wikiExtractor/index.ts",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Project full_name, natural",
      "display": "zxcvbn-ts/zxcvbn",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Project stargazers_count, natural",
      "display": "1.2K",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Library name, franc-min",
      "display": "franc-min",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Monthly downloads, franc-min",
      "display": "7.0M",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "License, franc-min",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Package release, franc-min",
      "display": "6.2.0",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Package release date, franc-min",
      "display": "Jan 2024",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Install, franc-min",
      "display": "npm install franc-min",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Quickstart, franc-min",
      "display": "import { franc } from 'franc-min'\n\nconst language = franc('All human beings are born free and equal in dignity and rights.')\n",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Official description, franc-min",
      "display": "Detects the language of a text.",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Quickstart source file, franc-min",
      "display": "readme.md",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Repository stars, franc-min",
      "display": "4.4K",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Local processing, franc-min",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Tag words, franc-min",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Native NLP operation, franc-min",
      "display": "Small language-identification model variant using whole-text statistical evidence; not a word tagger or a probability-calibrated classifier.",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "First-call prerequisites, franc-min",
      "display": "Native ESM runtime; use enough natural-language text for meaningful inference and choose a package whose language model includes the target languages. A short/unsupported sample can return und. This explicitly uses the smaller model variant,not full franc data.",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Original project API contract, franc-min",
      "display": "{\"status\": \"verified\", \"arguments\": \"Whole original Folo checkLanguage helper. Current6.2 native ESM named franc accepts string plus only whitelist of language identifiers. Host removes HTML/URLs and repeats short sanitized content before calling the detector. Shared mapping codes must be supported ISO639-3 identifiers; exact application mapping values were not captured,so no all-locale coverage claim is made. Local parseHtml and duplicateIfLengthLessThan are not counted as detector operations.\", \"return_shape\": \"Returns true for originally empty content,otherwise compares native best-code string against the requested mapped code. Current detector can return und,including short/unsupported inputs. Repeating short text and whitelist restriction are original application heuristics,not calibrated confidence,script detection,or a proof every locale is recognized.\"}",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Small model and short text, franc-min",
      "display": "Selected franc-min is a smaller language-model variant than franc/franc-all; counters kept separate. Original Folo helper removes URLs,duplicates short sanitized text,and checks ISO639-3 result against its supported-language mapping. Repeating a short input is an application heuristic,not confidence or accuracy proof.",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Project function, franc-min",
      "display": "export const checkLanguage = ({\n  content,\n  language,\n}: {\n  content: string\n  language: SupportedActionLanguage\n}) => {\n  if (!content) return true\n  const pureContent = parseHtml(content)\n    .toText()\n    .replaceAll(/https?:\\/\\/\\S+|www\\.\\S+/g, \" \")\n  const { code } = ACTION_LANGUAGE_MAP[language]\n  if (!code) {\n    return false\n  }\n\n  const sourceLanguage = franc(duplicateIfLengthLessThan(pureContent, 20), {\n    only: detectableLanguageCodes,\n  })\n\n  return sourceLanguage === code\n}\n",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Project source file, franc-min",
      "display": "packages/internal/utils/src/language.ts",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Project full_name, franc-min",
      "display": "RSSNext/Folo",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Project stargazers_count, franc-min",
      "display": "39.3K",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Library name, compromise",
      "display": "compromise",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Monthly downloads, compromise",
      "display": "5.7M",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "License, compromise",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Package release, compromise",
      "display": "14.20.0",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Package release date, compromise",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Install, compromise",
      "display": "npm install compromise",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Quickstart, compromise",
      "display": "import nlp from 'compromise'\n\nconst doc = nlp('she sells seashells by the seashore.')\nconst past = doc.verbs().toPastTense().text()\n",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Repository stars, compromise",
      "display": "12.2K",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Local processing, compromise",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Tag words, compromise",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Native NLP operation, compromise",
      "display": "Rule-based English document tagging,matching,and grammar transformations; shared-document mutation differs from read-only views.",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "First-call prerequisites, compromise",
      "display": "Local rule-based English document. Transform methods mutate the shared document; clone it first when original text must be retained. No neural model,remote service,or SDK execution involved.",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Two-part original code grant, compromise",
      "display": "{\"kind\": \"explicit_same_commit_incorporation_plus_independent_full_canonical_terms\", \"notice_path\": \"LICENSE.md\", \"notice_git_blob\": \"e1b6e4b6455a882dbbf66ee0b13101ec584d5e63\", \"canonical_terms_are_git_blob\": false, \"scope\": \"Selected authored consumer source outside ee/;same-commit publisher scope/copyright and referenced Apache2 full canonical body retained separately. Incorporated third-party restrictions preserved;no fabricated repository LICENSE/full-text Git object.\"}",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript NLP libraries compromise Natural winkNLP NLP.js code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
