Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arve0/lunr-no
norwegian stemming for lunr - fork of lunr-languages
https://github.com/arve0/lunr-no
Last synced: 8 days ago
JSON representation
norwegian stemming for lunr - fork of lunr-languages
- Host: GitHub
- URL: https://github.com/arve0/lunr-no
- Owner: arve0
- License: other
- Created: 2015-06-30T17:56:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T11:47:10.000Z (about 3 years ago)
- Last Synced: 2024-11-07T00:38:19.503Z (14 days ago)
- Language: JavaScript
- Homepage:
- Size: 256 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Norwegian lunr
==============[lunr-no](https://github.com/arve0/lunr-no) features a Norwegian trimmer,
language stemmer and stopword filter for [Lunr.js](http://lunrjs.com/) (a js
full text search engine).# How to use
lunr-no supports AMD and CommonJS. Check out the examples below:## In a web browser
Add the following JS files to the page:```html
```
then, use the language in when initializing lunr:
```js
var index = lunr(function () {
// use the language
this.use(lunr.no);
// then, the normal lunr index initialization
this.field('title', { boost: 10 });
this.field('body');
});
```That's it. Just add the documents and you're done.
## With node.js (or with browserify)
```js
var lunr = require('lunr');
require('lunr-no/lunr.stemmer.support.js')(lunr);
require('lunr-no')(lunr);var index = lunr(function () {
// use the language
this.use(lunr.no);
// then, the normal lunr index initialization
this.field('title', { boost: 10 })
this.field('body')
});
```# Building your own files
See [lunr-languages][build].[build]: https://github.com/MihaiValentin/lunr-languages#building-your-own-files
# Technical details & Credits
This is a fork of [lunr-languages](https://github.com/MihaiValentin/lunr-languages).
The code is identical, except the added trimmer.