{"_id":"@cadriva/greek-stemmer-ts","_rev":"2-3bac7c6b9beb4005861cfe47f0a752b9","name":"@cadriva/greek-stemmer-ts","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@cadriva/greek-stemmer-ts","version":"0.1.0","keywords":["greek","stemmer","nlp","tokenizer","greek-language","snowball-style","ntais","greek-stemmer-plus"],"license":"MIT","_id":"@cadriva/greek-stemmer-ts@0.1.0","maintainers":[{"name":"vpapaloukas","email":"vpapaloukas.codes@gmail.com"}],"homepage":"https://github.com/cadriva/greek-stemmer-ts#readme","bugs":{"url":"https://github.com/cadriva/greek-stemmer-ts/issues"},"dist":{"shasum":"4f7ceec0f6543eb0d7e49428ff3d4c4c7887d491","tarball":"https://registry.npmjs.org/@cadriva/greek-stemmer-ts/-/greek-stemmer-ts-0.1.0.tgz","fileCount":7,"integrity":"sha512-1FJgHNxrkPBEdWxh1vLnGaaWvUEowTCM2NTuzB85TLGKf5tNZsspcTxmbHlgf7hWgBJZEBiu8MoEN1KIlwuF/A==","signatures":[{"sig":"MEYCIQDPXiL6aG6s3XQjaG1qbW7sJ3JMNdCPLhiMAhwPYHgKnAIhAK0RwsDLG6V52IABZvmsTQU0FgVLJzBGRSvqDxOz1yo0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cadriva%2fgreek-stemmer-ts@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47577},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"129884b6bf5dddd504c04b835a6c220988481ac3","scripts":{"lint":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","test":"vitest run","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"vpapaloukas","email":"vpapaloukas.codes@gmail.com"},"repository":{"url":"git+ssh://git@github.com/cadriva/greek-stemmer-ts.git","type":"git"},"_npmVersion":"11.11.0","description":"Cadriva fork of greek-stemmer@0.1.4 (Apmats, MIT) — TypeScript Greek stemmer (Ntais 2006)","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.5","prettier":"^3.3.3","typescript":"^5.5.0","@types/node":"^24.0.0"},"_npmOperationalInternal":{"tmp":"tmp/greek-stemmer-ts_0.1.0_1777246711374_0.8468537786249863","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@cadriva/greek-stemmer-ts","version":"0.1.1","description":"TypeScript implementation of the Ntais (2006) Greek stemmer (fork of greek-stemmer@0.1.4 by Apmats, MIT)","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"engines":{"node":">=24.0.0"},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"vitest run","lint":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\""},"keywords":["greek","stemmer","nlp","tokenizer","greek-language","snowball-style","ntais"],"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/cadriva/greek-stemmer-ts.git"},"bugs":{"url":"https://github.com/cadriva/greek-stemmer-ts/issues"},"homepage":"https://github.com/cadriva/greek-stemmer-ts#readme","devDependencies":{"@types/node":"^24.0.0","prettier":"^3.3.3","typescript":"^5.5.0","vitest":"^4.1.5"},"gitHead":"c0bff1d6f37c24c3223e064215d235b5765b1701","_id":"@cadriva/greek-stemmer-ts@0.1.1","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-WotzgM4taqHe98yfEITuA9ly3J98jMNPomCOixHj/+tU5cNMC0KMD6miT9JUpfGqgO3pKbmkVptEdZzpz5EF9Q==","shasum":"b55ebfb8624bc84bcf56a12a7be2e6dcaf4277ca","tarball":"https://registry.npmjs.org/@cadriva/greek-stemmer-ts/-/greek-stemmer-ts-0.1.1.tgz","fileCount":7,"unpackedSize":43888,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cadriva%2fgreek-stemmer-ts@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCVUMtf78WmoHnd1DaUlzXNyZqpeoDQ1JlfxQdtuUqNoAIhAKGQuuMUYfMVJlv2cVDEShWstkqhe909A25q7LXP2//i"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e27110b2-a478-4e73-97ce-7c69ab1ff319"}},"directories":{},"maintainers":[{"name":"vpapaloukas","email":"vpapaloukas.codes@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/greek-stemmer-ts_0.1.1_1778443063599_0.4499416047214404"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-26T23:38:31.319Z","modified":"2026-05-10T19:57:44.000Z","0.1.0":"2026-04-26T23:38:31.519Z","0.1.1":"2026-05-10T19:57:43.739Z"},"bugs":{"url":"https://github.com/cadriva/greek-stemmer-ts/issues"},"license":"MIT","homepage":"https://github.com/cadriva/greek-stemmer-ts#readme","keywords":["greek","stemmer","nlp","tokenizer","greek-language","snowball-style","ntais"],"repository":{"type":"git","url":"git+ssh://git@github.com/cadriva/greek-stemmer-ts.git"},"description":"TypeScript implementation of the Ntais (2006) Greek stemmer (fork of greek-stemmer@0.1.4 by Apmats, MIT)","maintainers":[{"name":"vpapaloukas","email":"vpapaloukas.codes@gmail.com"}],"readme":"# greek-stemmer-ts\n\n[![npm](https://img.shields.io/npm/v/@cadriva/greek-stemmer-ts)](https://www.npmjs.com/package/@cadriva/greek-stemmer-ts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n\nA dependency-free TypeScript implementation of the Ntais (2006) Greek stemmer. Fork of [`greek-stemmer@0.1.4`](https://github.com/Apmats/greekstemmerjs) by Apmats (2015) — MIT License.\n\n## Install\n\n```sh\nnpm install @cadriva/greek-stemmer-ts\n```\n\n## Usage\n\n```ts\nimport { stem } from \"@cadriva/greek-stemmer-ts\";\n\n// Greek input must be pre-normalised: NFD + strip combining marks + uppercase.\nconst result = stem(\"ΤΙΜΟΛΟΓ\"); // => 'ΤΙΜΟΛΟΓ'\n\nfunction normaliseGreek(word: string): string {\n  return word\n    .normalize(\"NFD\")\n    .replace(/[̀-ͯ]/g, \"\")\n    .replace(/ς/g, \"σ\")\n    .toUpperCase();\n}\n\nconsole.log(stem(normaliseGreek(\"τιμολόγια\"))); // => 'ΤΙΜΟΛΟΓ'\nconsole.log(stem(\"invoice\")); // => 'invoice' (non-Greek passes through)\nconsole.log(stem(\"\")); // => ''\n```\n\n## Notes\n\n- Operates on monotonic uppercase Greek text only.\n- Polytonic Greek is not supported — normalise polytonic input to monotonic before calling `stem()`.\n- No language detection, tokenisation, or normalisation: callers pre-normalise. Non-Greek inputs (Latin, numbers, etc.) pass through unchanged.\n\n## Algorithm\n\nNtais (2006) Greek stemmer, implemented as a Snowball-style cascade of regex-based suffix-stripping rules. Pure TypeScript, zero runtime dependencies, zero network/disk/eval surface.\n\nTwo rule differences from `greek-stemmer@0.1.4` upstream:\n\n| Step    | Rule                             | Upstream                                           | This package                    |\n| ------- | -------------------------------- | -------------------------------------------------- | ------------------------------- |\n| Step 2a | `ΑΔΕΣ/ΑΔΩΝ` exception list       | includes `ΓΑΛΑΤ`, `ΦΑΦΛΑΤ`                          | does not include them           |\n| Step 5h | `ΟΥΣΑ/ΟΥΣΕΣ/ΟΥΣΕ` retention list | missing `ΔΕ`, `ΔΕΥΤΕΡΕΥ`, `ΚΑΘΑΡΕΥ`, `ΠΛΕ`, `ΤΣΑ` | includes all five               |\n\nSee `src/index.ts` comments for source citations.\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","readmeFilename":"README.md"}