https://github.com/dundalek/czech-stemmer
This is a port of stemmer for Czech language to Javascript, for both node.js and browser.
https://github.com/dundalek/czech-stemmer
Last synced: 2 months ago
JSON representation
This is a port of stemmer for Czech language to Javascript, for both node.js and browser.
- Host: GitHub
- URL: https://github.com/dundalek/czech-stemmer
- Owner: dundalek
- License: bsd-2-clause
- Created: 2013-04-13T13:30:07.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2021-01-14T20:29:37.000Z (over 4 years ago)
- Last Synced: 2025-04-01T17:10:06.845Z (3 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Czech stemmer
This is a port of stemmer for Czech language to Javascript, for both node.js and browser.
Original code is a Java program by [Jacques Savoy](http://members.unine.ch/jacques.savoy/clef/) released under BSD license.
To get stemmer for other languages, check out [Snowball](http://snowball.tartarus.org/) and its javascript port [snowball-js](https://github.com/fortnightlabs/snowball-js).
## Usage
Use it in node:
```javascript
// using default agressive stemmer
var stem = require('czech-stemmer');
stem('nejneobhospodařovávatelnějšími'); // => 'nejneobhospodařováva'// using lighter version of stemmer
var stem_light = require('czech-stemmer/light.js');
stem_light('nejneobhospodařovávatelnějšími'); // => 'nejneobhospodařovávatelnějš'
```Use it in browser:
```html
czech_stem('nejneobhospodařovávatelnějšími');
```
## Technical details
To reuse Java code as much as possible, limited version of StringBuffer was implemented as a shim and only few code replacements were performed:
- class definition -> function constructor
- 'private void' -> 'function'
- 'int ' -> 'var '
- 'StringBuffer ' -> ''## License
BSD