[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10778":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":45,"readmeContent":46,"aiSummary":47,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":48,"discoverSource":49},10778,"wink-nlp","winkjs\u002Fwink-nlp","winkjs","Developer friendly Natural Language Processing ✨","https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002F",null,"JavaScript",1380,64,13,1,0,2,7,4,18.44,"MIT License",false,"master",true,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,5,44],"bm25","chatbot","custom-entity-detection","hacktoberfest","named-entity-extraction","natural-language-processing","negation-handling","ner","nlp","pattern-matching","pos-tagging","sbd","sentence-boundary-detection","sentiment-analysis","tokenize","vectorizer","visualization","wink","word-vectors","2026-06-12 02:02:26","# winkNLP\n\n### [![Build Status](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Factions\u002Fworkflows\u002Fnode.js.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Factions\u002Fworkflows\u002Fnode.js.yml\u002F) [![Coverage Status](https:\u002F\u002Fcoveralls.io\u002Frepos\u002Fgithub\u002Fwinkjs\u002Fwink-nlp\u002Fbadge.svg?branch=master)](https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fwinkjs\u002Fwink-nlp?branch=master) [![Known Vulnerabilities](https:\u002F\u002Fsnyk.io\u002Ftest\u002Fgithub\u002Fwinkjs\u002Fwink-nlp\u002Fbadge.svg)](https:\u002F\u002Fsnyk.io\u002Ftest\u002Fgithub\u002Fwinkjs\u002Fwink-nlp) [![CII Best Practices](https:\u002F\u002Fbestpractices.coreinfrastructure.org\u002Fprojects\u002F6035\u002Fbadge)](https:\u002F\u002Fbestpractices.coreinfrastructure.org\u002Fprojects\u002F6035) [![Gitter](https:\u002F\u002Fimg.shields.io\u002Fgitter\u002Froom\u002Fnwjs\u002Fnw.js.svg)](https:\u002F\u002Fgitter.im\u002Fwinkjs\u002FLobby) [![Follow on Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fwinkjs_org?style=social)](https:\u002F\u002Ftwitter.com\u002Fwinkjs_org)\n\n## Developer friendly Natural Language Processing ✨\n[\u003Cimg align=\"right\" src=\"https:\u002F\u002Fdecisively.github.io\u002Fwink-logos\u002Flogo-title.png\" width=\"100px\" >](https:\u002F\u002Fwinkjs.org\u002F)\n\nWinkNLP is a JavaScript library for Natural Language Processing (NLP). Designed specifically to make development of NLP applications **easier** and **faster**, winkNLP is optimized for the right balance of performance and accuracy. \n\nIts [word embedding](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-embeddings-sg-100d?tab=readme-ov-file#wink-embeddings-sg-100d) support unlocks deeper text analysis. Represent words and text as numerical vectors with ease, bringing higher accuracy in tasks like semantic similarity, text classification, and beyond – even within a **[browser](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-use-word-embedding-with-winknlp)**.\n\nIt is built ground up with [no external dependency](https:\u002F\u002Fsnyk.io\u002Ftest\u002Fgithub\u002Fwinkjs\u002Fwink-nlp?tab=dependencies) and has a [lean code base of ~10Kb minified & gzipped](https:\u002F\u002Fbundlephobia.com\u002Fpackage\u002Fwink-nlp). A test coverage of [~100%](https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fwinkjs\u002Fwink-nlp?branch=master) and compliance with the [Open Source Security Foundation best practices](https:\u002F\u002Fbestpractices.coreinfrastructure.org\u002Fen\u002Fprojects\u002F6035) make winkNLP the ideal tool for building production grade systems with confidence.\n\nWinkNLP with full [Typescript support](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Fblob\u002Fmaster\u002Ftypes\u002Findex.d.ts), runs on Node.js, [web browsers](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp#how-to-install-for-web-browser) and [Deno](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp#how-to-run-on-deno).\n\n## Build amazing apps quickly\n| [Wikipedia article timeline](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-visualize-timeline-of-a-wiki-article) | [Context aware word cloud](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-create-a-context-aware-word-cloud) | [Key sentences detection](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-visualize-key-sentences-in-a-document) |\n| --- | --- | --- |\n| [\u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F29990\u002F202497363-19c30578-8146-4f36-9c4b-4de613610837.png\">](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-visualize-timeline-of-a-wiki-article)| [\u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F29990\u002F202506181-1a926ee0-788f-4aa1-aeac-a097f09fe747.png\">](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-create-a-context-aware-word-cloud)|[\u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F29990\u002F202506490-7f999d12-8319-4969-b92b-0649559ffbe6.png\">](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-visualize-key-sentences-in-a-document)|\n\nHead to  [live examples](https:\u002F\u002Fwinkjs.org\u002Fexamples.html) to explore further.\n\n## Blazing fast\nWinkNLP can easily process large amount of raw text at speeds over **650,000 tokens\u002Fsecond**&nbsp; on a M1 Macbook Pro in both browser and Node.js environments. It even runs smoothly on a low-end smartphone's browser.\n\n| Environment | Benchmarking Command |\n|--- | --- |\n| Node.js | [node benchmark\u002Frun](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Ftree\u002Fmaster\u002Fbenchmark) |\n| Browser | [How to measure winkNLP's speed on browsers?](https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-measure-winknlps-speed-on-browsers) |\n\n## Features\nWinkNLP has a [comprehensive natural language processing (NLP) pipeline](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fprocessing-pipeline.html) covering tokenization, sentence boundary detection (sbd), negation handling, sentiment analysis, part-of-speech (pos) tagging, named entity recognition (ner), custom entities recognition (cer). It offers a rich feature set:\n\n\u003Ctable>\n\u003Ctr>\u003Ctd width=\"330px;\">🐎 Fast, lossless & multilingual tokenizer \u003C\u002Ftd>\u003Ctd>For example, the multilingual text string \u003Cb>\u003Ccode style=\"font-size: 0.9em\">\"¡Hola! नमस्कार! Hi! Bonjour chéri\"\u003C\u002Fcode>\u003C\u002Fb>  is tokenized as \u003Ccode style=\"font-size: 0.9em\">[\"¡\", \"Hola\", \"!\", \"नमस्कार\", \"!\", \"Hi\", \"!\", \"Bonjour\", \"chéri\"]\u003C\u002Fcode>.  The tokenizer processes text at a speed close to \u003Cb>4 million\u003C\u002Fb> tokens\u002Fsecond on a M1 MBP's browser.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>✨ Developer friendly and intuitive \u003Ca href=\"https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fgetting-started.html\">API\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>With winkNLP, process any text using a simple, declarative syntax; most \u003Ca href=\"https:\u002F\u002Fobservablehq.com\u002F@winkjs\u002Fhow-to-build-a-naive-wikification-tool?collection=@winkjs\u002Fwinknlp-recipes\">live examples\u003C\u002Fa> have \u003Cb>30-40\u003C\u002Fb> lines of code.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>🖼 Best-in-class \u003Ca href=\"https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fvisualizing-markup.html\">text visualization\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Programmatically \u003Cb>\u003Ca href=\"https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fmarkup.html\">mark\u003C\u002Fa>\u003C\u002Fb> tokens, sentences, entities, etc. using HTML mark or any other tag of your choice.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>♻️ Extensive text processing features\u003C\u002Ftd>\u003Ctd>Remove and\u002For retain tokens with specific attributes such as part-of-speech, named entity type, token type, stop word, shape and many more; compute Flesch reading ease score; generate n-grams; normalize, lemmatise or stem. Checkout how with the right kind of text preprocessing, even \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-naive-bayes-text-classifier#readme\">Naive Bayes classifier\u003C\u002Fa> achieves \u003Cb>impressive (≥90%)\u003C\u002Fb> accuracy in sentiment analysis and chatbot intent classification tasks.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>🔠 Pre-trained \u003Ca href=\"https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Flanguage-models.html\">language models\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>Compact sizes starting from \u003Ca href=\"https:\u002F\u002Fbundlephobia.com\u002Fpackage\u002Fwink-eng-lite-web-model\">~1MB (minified & gzipped)\u003C\u002Fa> – reduce model loading time drastically down to ~1 second on a 4G network.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003Ctr>\u003Ctd>↗️ \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-embeddings-sg-100d?tab=readme-ov-file#wink-embeddings-sg-100d\">Word vectors\u003C\u002Fa>\u003C\u002Ftd>\u003Ctd>100-dimensional English word embeddings for over 350K English words, which are optimized for winkNLP. Allows easy computation of sentence or document embeddings.\u003C\u002Ftd>\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n### Utilities & Tools 💼\n- [BM25 Vectorizer](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fbm25-vectorizer.html)\n- [Similarity methods](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fsimilarity.html) – Cosine, Tversky, Sørensen-Dice, Otsuka-Ochiai\n- [its & as helpers](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fits-as-helper.html) to get Bag of Words, Frequency table, Lemma, Stem, Stop word removal, Negation handling and many more.\n\n\n## Documentation\n- [Concepts](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fgetting-started.html) — everything you need to know to get started.\n- [API Reference](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fread-doc.html) — explains usage of APIs with examples.\n- [Change log](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Fblob\u002Fmaster\u002FCHANGELOG.md) — version history along with the details of breaking changes, if any.\n- [Examples](https:\u002F\u002Fwinkjs.org\u002Fexamples.html) — live examples with code to give you a head start.\n\n## Installation\n\nUse [npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fwink-nlp) install:\n\n```shell\nnpm install wink-nlp --save\n```\n\nIn order to use winkNLP after its installation, you also need to install a language model according to the node version used. The table below outlines the version specific installation command:\n\n| Node.js Version |Installation |\n| --- | --- |\n| 16 or 18 | `npm install wink-eng-lite-web-model --save` |\n| 14 or 12 | `node -e \"require('wink-nlp\u002Fmodels\u002Finstall')\"` |\n\nThe [wink-eng-lite-web-model](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-eng-lite-web-model) is designed to work with Node.js version 16 or 18. It can also work on browsers as described in the next section. This is the **recommended** model.\n\nThe second command installs the [wink-eng-lite-model](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-eng-lite-model), which works with Node.js version 14 or 12. \n\n### How to configure TypeScript project\n\nEnable [`esModuleInterop`](https:\u002F\u002Fwww.typescriptlang.org\u002Ftsconfig#esModuleInterop) and [`allowSyntheticDefaultImports`](https:\u002F\u002Fwww.typescriptlang.org\u002Ftsconfig#allowSyntheticDefaultImports) in the `tsconfig.json` file:\n\n```\n\"compilerOptions\": {\n    \"esModuleInterop\": true,\n    \"allowSyntheticDefaultImports\": true,\n    ...\n}\n```\n\n### How to install for Web Browser\nIf you’re using winkNLP in the browser use the [wink-eng-lite-web-model](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fwink-eng-lite-web-model). Learn about its installation and usage in our [guide to using winkNLP in the browser](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002Fwink-nlp-in-browsers.html). Explore **[winkNLP recipes](https:\u002F\u002Fobservablehq.com\u002Fcollection\u002F@winkjs\u002Fwinknlp-recipes)** on [Observable](https:\u002F\u002Fobservablehq.com\u002F) for live browser based examples.\n\n### How to run on [Deno](https:\u002F\u002Fdeno.land\u002F)\nFollow the [example on replit](https:\u002F\u002Freplit.com\u002F@sanjayaksaxena\u002Fwink-nlp-deno-example#index.ts).\n\n### Get started\nHere is the \"Hello World!\" of winkNLP:\n\n```javascript\n\u002F\u002F Load wink-nlp package.\nconst winkNLP = require( 'wink-nlp' );\n\u002F\u002F Load english language model.\nconst model = require( 'wink-eng-lite-web-model' );\n\u002F\u002F Instantiate winkNLP.\nconst nlp = winkNLP( model );\n\u002F\u002F Obtain \"its\" helper to extract item properties.\nconst its = nlp.its;\n\u002F\u002F Obtain \"as\" reducer helper to reduce a collection.\nconst as = nlp.as;\n \n\u002F\u002F NLP Code.\nconst text = 'Hello   World🌎! How are you?';\nconst doc = nlp.readDoc( text );\n \nconsole.log( doc.out() );\n\u002F\u002F -> Hello   World🌎! How are you?\n \nconsole.log( doc.sentences().out() );\n\u002F\u002F -> [ 'Hello   World🌎!', 'How are you?' ]\n \nconsole.log( doc.entities().out( its.detail ) );\n\u002F\u002F -> [ { value: '🌎', type: 'EMOJI' } ]\n \nconsole.log( doc.tokens().out() );\n\u002F\u002F -> [ 'Hello', 'World', '🌎', '!', 'How', 'are', 'you', '?' ]\n \nconsole.log( doc.tokens().out( its.type, as.freqTable ) );\n\u002F\u002F -> [ [ 'word', 5 ], [ 'punctuation', 2 ], [ 'emoji', 1 ] ]\n```\nExperiment with winkNLP on [RunKit](https:\u002F\u002Fnpm.runkit.com\u002Fwink-nlp).\n\n## Speed & Accuracy\nThe [winkNLP](https:\u002F\u002Fwinkjs.org\u002Fwink-nlp\u002F) processes raw text at **~650,000 tokens per second** with its [wink-eng-lite-web-model](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-eng-lite-web-model), when [benchmarked](https:\u002F\u002Fgithub.com\u002Fbestiejs\u002Fbenchmark.js) using \"Ch 13 of Ulysses by James Joyce\" on a M1 Macbook Pro machine with 16GB RAM. The processing included the entire NLP pipeline — tokenization, sentence boundary detection, negation handling, sentiment analysis, part-of-speech tagging, and named entity extraction. This speed is way ahead of the prevailing speed benchmarks.\n\nThe benchmark was conducted on [Node.js versions 16, and 18](https:\u002F\u002Fnodejs.org\u002Fen\u002Fabout\u002Freleases\u002F).\n\nIt pos tags a subset of WSJ corpus with an accuracy of **~95%** — this includes *tokenization of raw text prior to pos tagging*. The present state-of-the-art is at ~97% accuracy but at lower speeds and is generally computed using gold standard pre-tokenized corpus.\n\nIts general purpose sentiment analysis delivers a [f-score](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FF1_score) of **~84.5%**, when validated using Amazon Product Review [Sentiment Labelled Sentences Data Set](https:\u002F\u002Farchive.ics.uci.edu\u002Fml\u002Fmachine-learning-databases\u002F00331\u002F) at [UCI Machine Learning Repository](https:\u002F\u002Farchive.ics.uci.edu\u002Fml\u002Findex.php). The current benchmark accuracy for **specifically trained** models can range around 95%.\n\n## Memory Requirement\nWink NLP delivers this performance with the minimal load on RAM. For example, it processes the entire [History of India Volume I](https:\u002F\u002Fen.wikisource.org\u002Fwiki\u002FHistory_of_India\u002FVolume_1) with a total peak memory requirement of under **80MB**. The book has around 350 pages which translates to over 125,000 tokens.\n\n\n## Need Help?\n\n### Usage query 👩🏽‍💻\nPlease ask at [Stack Overflow](https:\u002F\u002Fstackoverflow.com\u002F) or discuss at [Wink JS GitHub Discussions](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Fdiscussions) or chat with us at [Wink JS Gitter Lobby](https:\u002F\u002Fgitter.im\u002Fwinkjs\u002FLobby).\n\n### Bug report 🐛\nIf you spot a bug and the same has not yet been reported, raise a new [issue](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Fissues) or consider fixing it and sending a PR.\n\n### New feature 🌟\nLooking for a new feature, request it via the [new features & ideas](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Fdiscussions\u002Fcategories\u002Fnew-features-ideas) discussion forum  or consider becoming a [contributor](https:\u002F\u002Fgithub.com\u002Fwinkjs\u002Fwink-nlp\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md).\n\n\n## About winkJS\n[WinkJS](https:\u002F\u002Fwinkjs.org\u002F) is a family of open source packages for **Natural Language Processing**, **Machine Learning**, and **Statistical Analysis** in NodeJS. The code is **thoroughly documented** for easy human comprehension and has a **test coverage of ~100%** for reliability to build production grade solutions.\n\n## Copyright & License\n\n**Wink NLP** is copyright 2017-25 [GRAYPE Systems Private Limited](https:\u002F\u002Fgraype.in\u002F).\n\nIt is licensed under the terms of the MIT License.\n","winkNLP 是一个面向开发者的自然语言处理（NLP）JavaScript 库。它支持词嵌入，能够将文本转化为数值向量，从而在语义相似度分析、文本分类等任务中实现更高的准确性。该库具有无外部依赖、代码体积小（约10Kb minified & gzipped）、测试覆盖率接近100%的特点，并且遵循开源安全基金会的最佳实践标准，确保了其在构建生产级系统时的稳定性和安全性。winkNLP 支持 TypeScript，可在 Node.js、Web 浏览器以及 Deno 环境下运行，非常适合需要快速开发高质量NLP应用的场景，如聊天机器人、情感分析、实体识别等。","2026-06-11 03:30:08","top_topic"]