Skip to main content
Glama

Deepwiki MCP Server

by regenrek
extractKeyword.ts874 B
import winkNLP from 'wink-nlp' import model from 'wink-eng-lite-web-model' const nlp = winkNLP(model) const its = nlp.its // Very small list of words we never want as a "library keyword”. const stopTerms = new Set([ 'how', 'what', 'when', 'where', 'upgrade', 'update', 'new', 'latest', 'can', 'i', 'to', 'in', 'for', 'with', 'the', 'a', 'an', ]) /** * Pull the most likely tech/library word from free-form user input. * Returns `undefined` if nothing useful is found. */ export function extractKeyword(text: string): string | undefined { const doc = nlp.readDoc(text) const candidates: string[] = [] doc.tokens().each((t) => { const pos = t.out(its.pos) // e.g. "NOUN", "PROPN" const value = t.out(its.normal) if ((pos === 'NOUN' || pos === 'PROPN') && !stopTerms.has(value)) { candidates.push(value) } }) return candidates[0] }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/regenrek/deepwiki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server