feat: add search functionality (#250)

main
Óscar 1 year ago committed by GitHub
parent fcd0c34d19
commit 906bc9dec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,6 +24,7 @@ tabi has a perfect score on Google's Lighthouse audit:
- [X] [Comprehensive multi-language support](https://welpo.github.io/tabi/blog/faq-languages/#how-does-tabi-handle-multilingual-support). Add as many languages as you wish.
- [X] Support for [comments using giscus, utterances, Hyvor Talk, or Isso](https://welpo.github.io/tabi/blog/comments/).
- [X] Code syntax highlighting with colours based on [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé.
- [X] [Local search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) with an accessible, multi-lingual interface.
- [X] [KaTeX](https://katex.org/) support for mathematical notation.
- [X] [Stylized and human readable Atom feed](https://welpo.github.io/tabi/atom.xml).
- [X] [Stylized and human readable sitemap](https://welpo.github.io/tabi/sitemap.xml).

@ -5,6 +5,7 @@ author = "welpo"
generate_feed = true
compile_sass = true
minify_html = true
build_search_index = true
# To translate the entire theme, there must be a file with the same ISO 639-1
# (or IETF BCP 47) Code in the `i18n` folder of your site or the tabi theme
@ -15,6 +16,22 @@ default_language = "en"
taxonomies = [{name = "tags", feed = true}]
[search]
# Whether to include the title of the page/section in the index.
include_title = true
# Whether to include the description of the page/section in the index.
include_description = true
# Whether to include the path of the page/section in the index.
include_path = true
# Whether to include the rendered content of the page/section in the index.
include_content = true
# At which character to truncate the content to. Useful if you have a lot of pages and the index would
# become too big to load on the site. Defaults to not being set.
# truncate_content_length = 100
# Wether to produce the search index as a javascript file or as a JSON file.
# Accepted value "elasticlunr_javascript" or "elasticlunr_json".
index_format = "elasticlunr_json"
[markdown]
highlight_code = true
highlight_theme = "css"
@ -30,6 +47,7 @@ generate_feed = true
compile_sass = true
minify_html = true
taxonomies = [{name = "tags", feed = true}]
build_search_index = true
[languages.ca]
title = "~/tabi"
@ -43,6 +61,13 @@ taxonomies = [{name = "tags", feed = true}]
# Check out the documentation (or the comments below) to learn how to customise tabi:
# https://welpo.github.io/tabi/blog/mastering-tabi-settings/
# Search index format.
# For Zola 0.17.X users only.
# This MUST MATCH the setting in [search].index_format.
# Example: If [search].index_format is "elasticlunr_javascript", set:
# index_format = "elasticlunr_javascript"
# index_format = ""
# Enable JavaScript theme toggler to allow users to switch between dark/light mode.
# If disabled, your site will only use the theme specified in the `default_theme` variable.
theme_switcher = true

@ -1,7 +1,7 @@
+++
title = "Sense JavaScript obligatori"
date = 2023-01-06
updated = 2023-10-06
updated = 2024-01-07
description = "JavaScript només s'utilitza quan HTML i CSS no són suficients."
[taxonomies]
@ -16,6 +16,8 @@ Aquest tema no requereix JavaScript obligatori. Opcionalment, pot carregar una q
## Opcions habilitades globalment
- [**Cerca**](@/blog/mastering-tabi-settings/index.ca.md#cerca). Activada establint un idioma per defecte i `build_search_index = true` a la secció principal de `config.toml`. (~23KB de JavaScript)
- L'**interruptor de mode clar/fosc** es pot habilitar configurant `theme_switcher = true` a la secció `[extra]` del teu `config.toml` (~1KB de JavaScript).
- **Decodificació de correu electrònic** (~400 bytes). Per protegir contra robots de correu brossa, pots configurar `encode_plaintext_email = true`. Si el teu lloc web està en un repositori públic, considera utilitzar el teu `email` com una cadena codificada en base64[^1].

@ -1,7 +1,7 @@
+++
title = "Sin JavaScript obligatorio"
date = 2023-01-06
updated = 2023-10-06
updated = 2024-01-07
description = "JavaScript solo se utiliza cuando HTML y CSS no son suficientes."
[taxonomies]
@ -16,6 +16,8 @@ Este tema no requiere JavaScript de manera obligatoria. Opcionalmente, puede car
## Opciones habilitadas globalmente
- [**Búsqueda**](@/blog/mastering-tabi-settings/index.es.md#busqueda). Habilitada estableciendo un idioma por defecto y `build_search_index = true` en la sección principal de `config.toml`. (~23KB de JavaScript)
- El **interruptor de modo claro/oscuro** puede habilitarse configurando `theme_switcher = true` en la sección `[extra]` de tu `config.toml` (~1KB de JavaScript).
- **Descodificación de correo electrónico** (~400 bytes). Para proteger contra bots que recopilan correos electrónicos desde tu sitio web, puedes configurar `encode_plaintext_email = true`. Si tu sitio está en un repositorio público, para mayor protección, considera configurar tu `email` como una cadena codificada en base64[^1].

@ -1,7 +1,7 @@
+++
title = "No mandatory JavaScript"
date = 2023-01-06
updated = 2023-10-06
updated = 2024-01-07
description = "JavaScript is only used when HTML and CSS aren't enough."
[taxonomies]
@ -16,6 +16,8 @@ This theme has no mandatory JavaScript. Optionally, it can load a minimal amount
## Globally enabled settings
- [**Search**](@/blog/mastering-tabi-settings/index.md#search). Enabled by setting a default language and `build_search_index = true` on the main section of `config.toml`. (~23KB of JavaScript)
- The **light/dark mode switch** can be enabled by setting `theme_switcher = true` in the `[extra]` section of your `config.toml` (~1KB of JavaScript).
- **E-mail decoding** (~400 bytes). To protect against spambots scraping your e-mail from your website, you can set `encode_plaintext_email = true`. If your site is on a public repository, for extra protection, consider setting your `email` as a base64-encoded string[^1] directly.

@ -1,7 +1,7 @@
+++
title = "Domina la configuració de tabi: guia completa"
date = 2023-09-18
updated = 2024-01-05
updated = 2024-01-07
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."
[taxonomies]
@ -34,6 +34,57 @@ Per a les configuracions que segueixen aquesta jerarquia, el valor establert a u
---
## Cerca
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|:------:|:------:|:-------------:|:--------------------:|:--------------------:|
| ❌ | ❌ | ✅ | ❌ | ✅ |
tabi permet cerca local accessible i multilingüe amb [Elasticlunr](http://elasticlunr.com/). Per activar-la, necessites:
1. Establir un `default_language` a `config.toml`.
2. Establir `build_search_index = true`.
3. Opcionalment, configurar la secció `[search]`.
Per exemple:
```toml
base_url = "https://example.com"
default_language = "en"
build_search_index = true
[search]
index_format = "elasticlunr_json" # O el menys eficient "elasticlunr_javascript".
include_title = true
include_description = true
include_path = true
include_content = true
```
**Nota**: per suport de cerca en Xinès/Japonès, necessites utilitzar una [build personalitzada de Zola](https://github.com/getzola/zola/blob/master/Cargo.toml#L54-L55). Addicionalment, actualment no hi ha suport per a la cerca en català.
### Consideracions per a usuaris de Zola 0.17.X
Zola 0.17.X no proporciona accés a la variable `search.index_format` ([informe del bug](https://github.com/getzola/zola/issues/2165)). En utilitzar tabi, s'assumeix l'ús de l'índex JSON, que és més eficient. No obstant això, a causa d'[un altre bug](https://github.com/getzola/zola/issues/2193) solucionat en 0.18.0, l'índex JSON per a llocs multilingües no es genera correctament.
Els usuaris amb versions de Zola anteriors a 0.18.0 que vulguin utilitzar l'índex JavaScript necessiten establir la variable `index_format` a dos llocs:
```toml
[search]
index_format = "elasticlunr_javascript"
[extra]
index_format = "elasticlunr_javascript"
```
Això assegura que tabi carregui els arxius correctes. Recomanem actualitzar a Zola 0.18.0 o posterior per a una funcionalitat òptima.
### Detalls d'implementació
Per a detalls tècnics sobre la implementació de la cerca, incloent quan es carrega l'índex, característiques d'accessibilitat i altres detalls, consulta el [Pull Request #250](https://github.com/welpo/tabi/pull/250).
---
## Suport multilingüe
tabi ofereix suport multilingüe complet per al teu lloc Zola, des de configurar un idioma predeterminat fins a afegir tots els que vulguis. Consulta les [preguntes freqüents sobre idiomes](/ca/blog/faq-languages/) per a més informació.

@ -1,7 +1,7 @@
+++
title = "Domina la configuración de tabi: guía completa"
date = 2023-09-18
updated = 2024-01-05
updated = 2024-01-07
description = "Descubre las múltiples maneras en que puedes personalizar tabi."
[taxonomies]
@ -32,6 +32,59 @@ En todos los casos, las opciones de tabi se establecen en la sección `[extra]`.
Para las configuraciones que siguen esta jerarquía, el valor establecido en una página reemplaza el valor de una sección, que a su vez reemplaza el valor global. En resumen: cuanto más específica sea la configuración, mayor prioridad tendrá, o `página > sección > config.toml`.
---
## Búsqueda
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|:------:|:-------:|:-------------:|:---------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ✅ |
tabi soporta búsqueda local accesible y multilingüe con [Elasticlunr](http://elasticlunr.com/). Para activarla, necesitas:
1. Establecer un `default_language` en `config.toml`.
2. Establecer `build_search_index = true`.
3. Opcionalmente, configurar la sección `[search]`.
Por ejemplo:
```toml
base_url = "https://example.com"
default_language = "en"
build_search_index = true
[search]
index_format = "elasticlunr_json" # O el menos eficiente "elasticlunr_javascript".
include_title = true
include_description = true
include_path = true
include_content = true
```
**Nota**: para soporte de búsqueda en Chino/Japonés, necesitas usar una [build personalizada de Zola](https://github.com/getzola/zola/blob/master/Cargo.toml#L54-L55).
### Consideraciones para usuarios de Zola 0.17.X
Zola 0.17.X no proporciona acceso a la variable `search.index_format` ([reporte del bug](https://github.com/getzola/zola/issues/2165)). Al usar tabi, se asume el uso del índice JSON, que es más eficiente. Sin embargo, debido a [otro bug](https://github.com/getzola/zola/issues/2193) solucionado en 0.18.0, el índice JSON para sitios multilingües no se genera correctamente.
Los usuarios con versiones de Zola anteriores a 0.18.0 que quieran usar el índice JavaScript necesitan establecer la variable `index_format` en dos lugares:
```toml
[search]
index_format = "elasticlunr_javascript"
[extra]
index_format = "elasticlunr_javascript"
```
Esto asegura que tabi cargue los archivos correctos. Recomendamos actualizar a Zola 0.18.0 o posterior para una funcionalidad óptima.
### Detalles de implementación
Para detalles técnicos sobre la implementación de la búsqueda en tabi, incluyendo cuándo se carga el índice, características de accesibilidad y otros detalles, consulta el [Pull Request #250](https://github.com/welpo/tabi/pull/250).
---
## Soporte multilingüe
tabi ofrece soporte multilingüe completo para tu sitio Zola, desde configurar un idioma predeterminado hasta añadir todos los que desees. Consulta la [preguntas frecuentes sobre idiomas](/es/blog/faq-languages/) para más información.

@ -1,7 +1,7 @@
+++
title = "Mastering tabi Settings: A Comprehensive Guide"
date = 2023-09-18
updated = 2024-01-05
updated = 2024-01-07
description = "Discover the many ways you can customise your tabi site."
[taxonomies]
@ -34,6 +34,57 @@ For settings which follow this hierarchy, the value set on a page overrides the
---
## Search
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
| ❌ | ❌ | ✅ | ❌ | ✅ |
tabi supports accessible, local multi-lingual search with [Elasticlunr](http://elasticlunr.com/). To enable it, you need to:
1. Set a `default_language` in `config.toml`.
2. Set `build_search_index = true`.
3. Optionally, configure the `[search]`.
Here's an example configuration:
```toml
base_url = "https://example.com"
default_language = "en"
build_search_index = true
[search]
index_format = "elasticlunr_json" # Or the less efficient "elasticlunr_javascript".
include_title = true
include_description = true
include_path = true
include_content = true
```
**Note**: for Chinese/Japanese search support, you need to use a [custom Zola build](https://github.com/getzola/zola/blob/master/Cargo.toml#L54-L55).
### Considerations for Zola 0.17.X Users
Zola 0.17.X doesn't provide access to the `search.index_format` variable ([bug report](https://github.com/getzola/zola/issues/2165)). When using tabi, this variable defaults to the more efficient JSON index. However, due to [another bug](https://github.com/getzola/zola/issues/2193) fixed in 0.18.0, the JSON index for multi-language sites is not generated correctly.
Users with Zola versions prior to 0.18.0 who want to use the JavaScript index need to set the `index_format` variable in two places:
```toml
[search]
index_format = "elasticlunr_javascript"
[extra]
index_format = "elasticlunr_javascript"
```
This ensures tabi loads the right files. We recommend upgrading to Zola 0.18.0 or later for optimal functionality.
### Implementation Details
For technical details about the search implementation in tabi, including when the index loads, accessibility features, and other specifics, see the [Pull Request #250](https://github.com/welpo/tabi/pull/250).
---
## Multilingual Support
tabi offers comprehensive multilingual support for your Zola site, from setting a default language to adding as many as you wish. Refer to the [multilingual FAQ](blog/faq-languages/) for more information.

@ -24,6 +24,7 @@ social_media_card = "social_cards/ca_projects_tabi.jpg"
- Puntuació perfecta en Lighthouse (Rendiment, Accessibilitat, Millors Pràctiques i SEO).
- Ressaltat de sintaxi de codi amb colors basats en [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé.
- Suport per a [comentaris usant giscus, utterances, Hyvor Talk o Isso](https://welpo.github.io/tabi/ca/blog/comments/).
- [Cerca local](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#cerca) amb una interfície accessible i multilingüe.
- Tot el JavaScript es pot [deshabilitar completament](https://welpo.github.io/tabi/ca/blog/javascript/).
- [Codificació de correu](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#correu-electronic-codificat) per a protecció contra spam.
- [Mapa del lloc estilitzat i llegible per humans](https://welpo.github.io/tabi/sitemap.xml).

@ -25,6 +25,7 @@ social_media_card = "social_cards/es_projects_tabi.jpg"
- Resaltado de sintaxis de código con colores basados en [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé.
- Soporte para [comentarios usando giscus, utterances, Hyvor Talk o Isso](https://welpo.github.io/tabi/es/blog/comments/).
- Todo el JavaScript se puede [deshabilitar completamente](https://welpo.github.io/tabi/es/blog/javascript/).
- [Búsqueda local](https://welpo.github.io/tabi/es/blog/mastering-tabi-settings/#busqueda) con una interfaz accesible y multilingüe.
- [Codificación de correo](https://welpo.github.io/tabi/es/blog/mastering-tabi-settings/#encoded-email) para protección contra spam.
- [Mapa de sitio web estilizado y legible por humanos](https://welpo.github.io/tabi/sitemap.xml).
- [Feed de Atom estilizado y legible por humanos](https://welpo.github.io/tabi/es/atom.xml).

@ -25,6 +25,7 @@ social_media_card = "social_cards/projects_tabi.jpg"
- [Comprehensive multi-language support](https://welpo.github.io/tabi/blog/faq-languages/#how-does-tabi-handle-multilingual-support). Add as many languages as you wish.
- Support for [comments using giscus, utterances, Hyvor Talk, or Isso](https://welpo.github.io/tabi/blog/comments/).
- Code syntax highlighting with colours based on [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé.
- [Local search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) with an accessible, multi-lingual interface.
- [KaTeX](https://katex.org/) support for mathematical notation.
- [Stylized and human readable Atom feed](https://welpo.github.io/tabi/atom.xml).
- [Stylized and human readable sitemap](https://welpo.github.io/tabi/sitemap.xml).

@ -14,6 +14,13 @@ privacy = "política de privadesa"
site_statistics = "estadístiques del lloc"
sitemap = "mapa del lloc"
# Search.
search = "Cercar"
search_icon_title = "Fes clic o prem $SHORTCUT per obrir la cerca" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Esborrar cerca" # Title of the X icon next to search input.
result = "resultat" # "1 result"
results = "resultats" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Llegir més"
post = "entrada"

@ -18,6 +18,13 @@ privacy = "datenschutzrichtlinie"
site_statistics = "seitenstatistiken"
sitemap = "seitenübersicht"
# Search.
search = "Suchen"
search_icon_title = "Klicken oder $SHORTCUT drücken, um die Suche zu öffnen" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Suche löschen" # Title of the X icon next to search input.
result = "ergebnis" # "1 result"
results = "ergebnisse" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Weiterlesen"
post = "beitrag"

@ -14,6 +14,13 @@ privacy = "privacy policy"
site_statistics = "site statistics"
sitemap = "sitemap"
# Search.
search = "Search"
search_icon_title = "Click or press $SHORTCUT to open search" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Clear search" # Title of the X icon next to search input.
result = "result" # "1 result"
results = "results" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Read more"
post = "post"

@ -14,6 +14,13 @@ privacy = "política de privacidad"
site_statistics = "estadísticas del sitio"
sitemap = "mapa del sitio"
# Search.
search = "Buscar"
search_icon_title = "Haz clic o usa $SHORTCUT para abrir la búsqueda" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Borrar búsqueda" # Title of the X icon next to search input.
result = "resultado" # "1 result"
results = "resultados" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Leer más"
post = "entrada"

@ -18,6 +18,13 @@ privacy = "politique de confidentialité"
site_statistics = "statistiques du site"
sitemap = "plan du site"
# Search.
search = "Rechercher"
search_icon_title = "Cliquez ou appuyez sur $SHORTCUT pour ouvrir la recherche" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Effacer la recherche" # Title of the X icon next to search input.
result = "résultat" # "1 result"
results = "résultats" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Lire plus"
post = "article"

@ -16,6 +16,13 @@ privacy = "गोपनीयता नीति"
site_statistics = "साइट सांख्यिकी"
sitemap = "साइटमैप"
# Search.
search = "खोजें"
search_icon_title = "$SHORTCUT दबाएँ या क्लिक करें खोज खोलने के लिए" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "खोज साफ करें" # Title of the X icon next to search input.
result = "परिणाम" # "1 result"
results = "परिणाम" # "3 results" (also used for 0 results).
# Navigation.
read_more = "और पढ़ें"
post = "पोस्ट"

@ -14,6 +14,13 @@ privacy = "politica sulla privacy"
site_statistics = "statistiche del sito"
sitemap = "mappa del sito"
# Search.
search = "Cerca"
search_icon_title = "Clicca o premi $SHORTCUT per aprire la ricerca" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Cancella ricerca" # Title of the X icon next to search input.
result = "risultato" # "1 result"
results = "risultati" # "3 result" (also used for 0 results).
# Navigation.
read_more = "Leggi di più"
post = "post"

@ -18,6 +18,13 @@ privacy = "プライバシーポリシー"
site_statistics = "サイト統計"
sitemap = "サイトマップ"
# Search.
search = "検索"
search_icon_title = "$SHORTCUTを押すか、クリックして検索を開く" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "検索をクリア" # Title of the X icon next to search input.
result = "結果" # "1 result"
results = "結果" # "3 results" (also used for 0 results).
# Navigation.
read_more = "続きを読む"
post = "投稿"

@ -18,6 +18,13 @@ privacy = "개인정보 처리방침"
site_statistics = "사이트 통계"
sitemap = "사이트맵"
# Search.
search = "검색"
search_icon_title = "클릭하거나 $SHORTCUT을 눌러 검색 열기" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "검색 지우기" # Title of the X icon next to search input.
result = "결과" # "1 result"
results = "결과" # "3 results" (also used for 0 results).
# Navigation.
read_more = "더 읽기"
post = "게시물"

@ -14,6 +14,13 @@ privacy = "política de privacidade"
site_statistics = "estatísticas do site"
sitemap = "mapa do site"
# Search.
search = "Pesquisar"
search_icon_title = "Clique ou pressione $SHORTCUT para abrir a pesquisa" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Limpar pesquisa" # Title of the X icon next to search input.
result = "resultado" # "1 result"
results = "resultados" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Ler mais"
post = "publicação"

@ -14,6 +14,13 @@ privacy = "политика конфиденциальности"
site_statistics = "статистика сайта"
sitemap = "карта сайта"
# Search.
search = "Поиск"
search_icon_title = "Нажмите или используйте $SHORTCUT для открытия поиска" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Очистить поиск" # Title of the X icon next to search input.
result = "результат" # "1 result"
results = "результаты" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Читать далее"
post = "пост"

@ -18,6 +18,13 @@ privacy = "політика конфіденційності"
site_statistics = "статистика сайту"
sitemap = "карта сайту"
# Search.
search = "Пошук"
search_icon_title = "Натисніть або використовуйте $SHORTCUT, щоб відкрити пошук" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "Очистити пошук" # Title of the X icon next to search input.
result = "результат" # "1 result"
results = "результати" # "3 results" (also used for 0 results).
# Navigation.
read_more = "Читати далі"
post = "пост"

@ -14,6 +14,13 @@ privacy = "隐私政策" # Machine translated.
site_statistics = "网站统计" # Machine translated.
sitemap = "站点地图" # Machine translated.
# Search.
search = "搜索"
search_icon_title = "点击或按 $SHORTCUT 开启搜索" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "清除搜索" # Title of the X icon next to search input.
result = "结果" # "1 result"
results = "结果" # "3 results" (also used for 0 results).
# Navigation.
read_more = "阅读全文"
post = "文章"

@ -14,6 +14,13 @@ privacy = "隱私政策" # Machine translated.
site_statistics = "網站統計" # Machine translated.
sitemap = "網站地圖" # Machine translated.
# Search.
search = "搜尋"
search_icon_title = "點擊或按 $SHORTCUT 來開啟搜尋" # $SHORTCUT will be replaced with the actual keyboard shortcut.
clear_search = "清除搜尋" # Title of the X icon next to search input.
result = "結果" # "1 result"
results = "結果" # "3 results" (also used for 0 results).
# Navigation.
read_more = "閱讀全文"
post = "文章"

@ -14,6 +14,7 @@
@use 'parts/_pagination.scss';
@use 'parts/_posts_list.scss';
@use 'parts/_quick_navigation_buttons.scss';
@use 'parts/_search.scss';
@use 'parts/_spoiler.scss';
@use 'parts/_syntax_theme.scss';
@use 'parts/_table.scss';

@ -168,6 +168,18 @@ details summary {
cursor: pointer;
}
.interactive-icon {
cursor: pointer;
path {
fill: var(--text-color);
}
:hover path {
fill: var(--meta-color);
}
}
.article-navigation {
display: flex;
margin-top: 2rem;

@ -0,0 +1,157 @@
$icon-size: 1.3rem;
#searchModal {
background: color-mix(in srgb, var(--primary-color) 5%, transparent);
text-align: left;
#searchContainer {
padding: 1rem;
}
#searchBar {
display: flex;
position: relative;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: 1rem;
.search-icon {
position: absolute;
left: 1rem;
width: $icon-size;
height: $icon-size;
path {
fill: var(--text-color);
}
}
.close-icon {
position: absolute;
right: $icon-size;
margin-right: 0.5rem;
margin-left: 1rem;
width: $icon-size;
height: $icon-size;
}
#searchInput {
flex: 1;
border: 1px solid var(--divider-color);
border-radius: 20px;
background-color: var(--input-background-color);
padding: 0.75rem 1rem 0.75rem 3rem;
width: calc(100% - 2rem);
color: var(--text-color);
font-size: 1rem;
}
}
#results-container {
display: none;
border-top: var(--divider-color) solid 0.5px;
border-bottom-right-radius: 1rem;
border-bottom-left-radius: 1rem;
overflow: hidden;
#results-info {
padding: 0.5rem;
color: var(--meta-color);
font-size: 0.8rem;
text-align: center;
}
#results {
display: flex;
flex-direction: column;
max-height: 50vh;
overflow-y: auto;
b {
font-weight: 590;
}
a {
display: block;
&:hover {
background-color: inherit;
}
}
> div {
cursor: pointer;
padding: 0.5rem 1rem;
&[aria-selected="true"] {
background-color: var(--primary-color);
color: var(--hover-color);
a,
span {
color: inherit;
}
}
}
span:first-child {
display: block;
color: var(--primary-color);
font-weight: 590;
}
span:nth-child(2) {
color: var(--text-color);
}
}
}
}
.search-icon {
display: block;
position: relative;
align-self: center;
margin-right: 0.5rem;
margin-left: 1rem;
width: $icon-size;
height: $icon-size;
}
.search-modal {
-webkit-backdrop-filter: blur(8px);
display: none;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
backdrop-filter: blur(8px);
background-color: rgba(0, 0, 0, 0.1);
width: 100%;
height: 100%;
overflow: auto;
#modal-content {
position: relative;
margin: 8% auto;
border: var(--divider-color) solid 0.5px;
border-radius: 1rem;
background-color: var(--background-color);
width: 80%;
max-width: 28rem;
}
}
@media only screen and (max-width: 600px) {
.search-modal {
#modal-content {
top: 3.5rem;
width: 92%;
#results {
max-height: 70vh;
}
}
}
}

@ -0,0 +1,280 @@
/*!
* Lunr languages, `Danish` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.da = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.da.trimmer,
lunr.da.stopWordFilter,
lunr.da.stemmer
);
};
/* lunr trimmer function */
lunr.da.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.da.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.da.wordCharacters);
lunr.Pipeline.registerFunction(lunr.da.trimmer, 'trimmer-da');
/* lunr stemmer function */
lunr.da.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function DanishStemmer() {
var a_0 = [new Among("hed", -1, 1), new Among("ethed", 0, 1),
new Among("ered", -1, 1), new Among("e", -1, 1),
new Among("erede", 3, 1), new Among("ende", 3, 1),
new Among("erende", 5, 1), new Among("ene", 3, 1),
new Among("erne", 3, 1), new Among("ere", 3, 1),
new Among("en", -1, 1), new Among("heden", 10, 1),
new Among("eren", 10, 1), new Among("er", -1, 1),
new Among("heder", 13, 1), new Among("erer", 13, 1),
new Among("s", -1, 2), new Among("heds", 16, 1),
new Among("es", 16, 1), new Among("endes", 18, 1),
new Among("erendes", 19, 1), new Among("enes", 18, 1),
new Among("ernes", 18, 1), new Among("eres", 18, 1),
new Among("ens", 16, 1), new Among("hedens", 24, 1),
new Among("erens", 24, 1), new Among("ers", 16, 1),
new Among("ets", 16, 1), new Among("erets", 28, 1),
new Among("et", -1, 1), new Among("eret", 30, 1)
],
a_1 = [
new Among("gd", -1, -1), new Among("dt", -1, -1),
new Among("gt", -1, -1), new Among("kt", -1, -1)
],
a_2 = [
new Among("ig", -1, 1), new Among("lig", 0, 1),
new Among("elig", 1, 1), new Among("els", -1, 1),
new Among("l\u00F8st", -1, 2)
],
g_v = [17, 65, 16, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128
],
g_s_ending = [239, 254, 42, 3,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16
],
I_x, I_p1, S_ch, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function r_mark_regions() {
var v_1, c = sbp.cursor + 3;
I_p1 = sbp.limit;
if (0 <= c && c <= sbp.limit) {
I_x = c;
while (true) {
v_1 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 248)) {
sbp.cursor = v_1;
break;
}
sbp.cursor = v_1;
if (v_1 >= sbp.limit)
return;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 248)) {
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
I_p1 = sbp.cursor;
if (I_p1 < I_x)
I_p1 = I_x;
}
}
function r_main_suffix() {
var among_var, v_1;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_0, 32);
sbp.limit_backward = v_1;
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
if (sbp.in_grouping_b(g_s_ending, 97, 229))
sbp.slice_del();
break;
}
}
}
}
function r_consonant_pair() {
var v_1 = sbp.limit - sbp.cursor,
v_2;
if (sbp.cursor >= I_p1) {
v_2 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
if (sbp.find_among_b(a_1, 4)) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_2;
sbp.cursor = sbp.limit - v_1;
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.bra = sbp.cursor;
sbp.slice_del();
}
} else
sbp.limit_backward = v_2;
}
}
function r_other_suffix() {
var among_var, v_1 = sbp.limit - sbp.cursor,
v_2, v_3;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "st")) {
sbp.bra = sbp.cursor;
if (sbp.eq_s_b(2, "ig"))
sbp.slice_del();
}
sbp.cursor = sbp.limit - v_1;
if (sbp.cursor >= I_p1) {
v_2 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_2, 5);
sbp.limit_backward = v_2;
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_del();
v_3 = sbp.limit - sbp.cursor;
r_consonant_pair();
sbp.cursor = sbp.limit - v_3;
break;
case 2:
sbp.slice_from("l\u00F8s");
break;
}
}
}
}
function r_undouble() {
var v_1;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
if (sbp.out_grouping_b(g_v, 97, 248)) {
sbp.bra = sbp.cursor;
S_ch = sbp.slice_to(S_ch);
sbp.limit_backward = v_1;
if (sbp.eq_v_b(S_ch))
sbp.slice_del();
} else
sbp.limit_backward = v_1;
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_main_suffix();
sbp.cursor = sbp.limit;
r_consonant_pair();
sbp.cursor = sbp.limit;
r_other_suffix();
sbp.cursor = sbp.limit;
r_undouble();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.da.stemmer, 'stemmer-da');
/* stop word filter function */
lunr.da.stopWordFilter = function(token) {
if (lunr.da.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.da.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.da.stopWordFilter.stopWords.length = 95;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.da.stopWordFilter.stopWords.elements = ' ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været'.split(' ');
lunr.Pipeline.registerFunction(lunr.da.stopWordFilter, 'stopWordFilter-da');
};
}))

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,t,i;r.da=function(){this.pipeline.reset(),this.pipeline.add(r.da.trimmer,r.da.stopWordFilter,r.da.stemmer)},r.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",r.da.trimmer=r.trimmerSupport.generateTrimmer(r.da.wordCharacters),r.Pipeline.registerFunction(r.da.trimmer,"trimmer-da"),r.da.stemmer=(e=r.stemmerSupport.Among,t=r.stemmerSupport.SnowballProgram,i=new function(){var n,s,o,d=[new e("hed",-1,1),new e("ethed",0,1),new e("ered",-1,1),new e("e",-1,1),new e("erede",3,1),new e("ende",3,1),new e("erende",5,1),new e("ene",3,1),new e("erne",3,1),new e("ere",3,1),new e("en",-1,1),new e("heden",10,1),new e("eren",10,1),new e("er",-1,1),new e("heder",13,1),new e("erer",13,1),new e("s",-1,2),new e("heds",16,1),new e("es",16,1),new e("endes",18,1),new e("erendes",19,1),new e("enes",18,1),new e("ernes",18,1),new e("eres",18,1),new e("ens",16,1),new e("hedens",24,1),new e("erens",24,1),new e("ers",16,1),new e("ets",16,1),new e("erets",28,1),new e("et",-1,1),new e("eret",30,1)],i=[new e("gd",-1,-1),new e("dt",-1,-1),new e("gt",-1,-1),new e("kt",-1,-1)],a=[new e("ig",-1,1),new e("lig",0,1),new e("elig",1,1),new e("els",-1,1),new e("løst",-1,2)],u=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],l=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],c=new t;function m(){var e,r=c.limit-c.cursor;c.cursor>=s&&(e=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,c.find_among_b(i,4)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e)}this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var e,r=c.cursor;if(function(){var e,r=c.cursor+3;if(s=c.limit,0<=r&&r<=c.limit){for(n=r;;){if(e=c.cursor,c.in_grouping(u,97,248)){c.cursor=e;break}if((c.cursor=e)>=c.limit)return;c.cursor++}for(;!c.out_grouping(u,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(s=c.cursor)<n&&(s=n)}}(),c.limit_backward=r,c.cursor=c.limit,c.cursor>=s&&(r=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,e=c.find_among_b(d,32),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:c.in_grouping_b(l,97,229)&&c.slice_del()}c.cursor=c.limit,m(),c.cursor=c.limit;var i,t,r=c.limit-c.cursor;if(c.ket=c.cursor,c.eq_s_b(2,"st")&&(c.bra=c.cursor,c.eq_s_b(2,"ig"))&&c.slice_del(),c.cursor=c.limit-r,c.cursor>=s&&(r=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,i=c.find_among_b(a,5),c.limit_backward=r,i))switch(c.bra=c.cursor,i){case 1:c.slice_del(),t=c.limit-c.cursor,m(),c.cursor=c.limit-t;break;case 2:c.slice_from("løs")}return c.cursor=c.limit,c.cursor>=s&&(e=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,c.out_grouping_b(u,97,248)?(c.bra=c.cursor,o=c.slice_to(o),c.limit_backward=e,c.eq_v_b(o)&&c.slice_del()):c.limit_backward=e),!0}},function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}),r.Pipeline.registerFunction(r.da.stemmer,"stemmer-da"),r.da.stopWordFilter=function(e){if(-1===r.da.stopWordFilter.stopWords.indexOf(e))return e},r.da.stopWordFilter.stopWords=new r.SortedSet,r.da.stopWordFilter.stopWords.length=95,r.da.stopWordFilter.stopWords.elements=" ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" "),r.Pipeline.registerFunction(r.da.stopWordFilter,"stopWordFilter-da")}});

@ -0,0 +1,380 @@
/*!
* Lunr languages, `German` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.de = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.de.trimmer,
lunr.de.stopWordFilter,
lunr.de.stemmer
);
};
/* lunr trimmer function */
lunr.de.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.de.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.de.wordCharacters);
lunr.Pipeline.registerFunction(lunr.de.trimmer, 'trimmer-de');
/* lunr stemmer function */
lunr.de.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function GermanStemmer() {
var a_0 = [new Among("", -1, 6), new Among("U", 0, 2),
new Among("Y", 0, 1), new Among("\u00E4", 0, 3),
new Among("\u00F6", 0, 4), new Among("\u00FC", 0, 5)
],
a_1 = [
new Among("e", -1, 2), new Among("em", -1, 1),
new Among("en", -1, 2), new Among("ern", -1, 1),
new Among("er", -1, 1), new Among("s", -1, 3),
new Among("es", 5, 2)
],
a_2 = [new Among("en", -1, 1),
new Among("er", -1, 1), new Among("st", -1, 2),
new Among("est", 2, 1)
],
a_3 = [new Among("ig", -1, 1),
new Among("lich", -1, 1)
],
a_4 = [new Among("end", -1, 1),
new Among("ig", -1, 2), new Among("ung", -1, 1),
new Among("lich", -1, 3), new Among("isch", -1, 2),
new Among("ik", -1, 2), new Among("heit", -1, 3),
new Among("keit", -1, 4)
],
g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 8, 0, 32, 8
],
g_s_ending = [117, 30, 5],
g_st_ending = [
117, 30, 4
],
I_x, I_p2, I_p1, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function habr1(c1, c2, v_1) {
if (sbp.eq_s(1, c1)) {
sbp.ket = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 252)) {
sbp.slice_from(c2);
sbp.cursor = v_1;
return true;
}
}
return false;
}
function r_prelude() {
var v_1 = sbp.cursor,
v_2, v_3, v_4, v_5;
while (true) {
v_2 = sbp.cursor;
sbp.bra = v_2;
if (sbp.eq_s(1, "\u00DF")) {
sbp.ket = sbp.cursor;
sbp.slice_from("ss");
} else {
if (v_2 >= sbp.limit)
break;
sbp.cursor = v_2 + 1;
}
}
sbp.cursor = v_1;
while (true) {
v_3 = sbp.cursor;
while (true) {
v_4 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 252)) {
v_5 = sbp.cursor;
sbp.bra = v_5;
if (habr1("u", "U", v_4))
break;
sbp.cursor = v_5;
if (habr1("y", "Y", v_4))
break;
}
if (v_4 >= sbp.limit) {
sbp.cursor = v_3;
return;
}
sbp.cursor = v_4 + 1;
}
}
}
function habr2() {
while (!sbp.in_grouping(g_v, 97, 252)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 252)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
return false;
}
function r_mark_regions() {
I_p1 = sbp.limit;
I_p2 = I_p1;
var c = sbp.cursor + 3;
if (0 <= c && c <= sbp.limit) {
I_x = c;
if (!habr2()) {
I_p1 = sbp.cursor;
if (I_p1 < I_x)
I_p1 = I_x;
if (!habr2())
I_p2 = sbp.cursor;
}
}
}
function r_postlude() {
var among_var, v_1;
while (true) {
v_1 = sbp.cursor;
sbp.bra = v_1;
among_var = sbp.find_among(a_0, 6);
if (!among_var)
return;
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("y");
break;
case 2:
case 5:
sbp.slice_from("u");
break;
case 3:
sbp.slice_from("a");
break;
case 4:
sbp.slice_from("o");
break;
case 6:
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
break;
}
}
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_standard_suffix() {
var among_var, v_1 = sbp.limit - sbp.cursor,
v_2, v_3, v_4;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_1, 7);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "s")) {
sbp.bra = sbp.cursor;
if (sbp.eq_s_b(3, "nis"))
sbp.slice_del();
}
break;
case 3:
if (sbp.in_grouping_b(g_s_ending, 98, 116))
sbp.slice_del();
break;
}
}
}
sbp.cursor = sbp.limit - v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_2, 4);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
if (sbp.in_grouping_b(g_st_ending, 98, 116)) {
var c = sbp.cursor - 3;
if (sbp.limit_backward <= c && c <= sbp.limit) {
sbp.cursor = c;
sbp.slice_del();
}
}
break;
}
}
}
sbp.cursor = sbp.limit - v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 8);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R2()) {
switch (among_var) {
case 1:
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "ig")) {
sbp.bra = sbp.cursor;
v_2 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "e")) {
sbp.cursor = sbp.limit - v_2;
if (r_R2())
sbp.slice_del();
}
}
break;
case 2:
v_3 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "e")) {
sbp.cursor = sbp.limit - v_3;
sbp.slice_del();
}
break;
case 3:
sbp.slice_del();
sbp.ket = sbp.cursor;
v_4 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(2, "er")) {
sbp.cursor = sbp.limit - v_4;
if (!sbp.eq_s_b(2, "en"))
break;
}
sbp.bra = sbp.cursor;
if (r_R1())
sbp.slice_del();
break;
case 4:
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 2);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R2() && among_var == 1)
sbp.slice_del();
}
break;
}
}
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_prelude();
sbp.cursor = v_1;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_standard_suffix();
sbp.cursor = sbp.limit_backward;
r_postlude();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.de.stemmer, 'stemmer-de');
/* stop word filter function */
lunr.de.stopWordFilter = function(token) {
if (lunr.de.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.de.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.de.stopWordFilter.stopWords.length = 232;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.de.stopWordFilter.stopWords.elements = ' aber alle allem allen aller alles als also am an ander andere anderem anderen anderer anderes anderm andern anderr anders auch auf aus bei bin bis bist da damit dann das dasselbe dazu daß dein deine deinem deinen deiner deines dem demselben den denn denselben der derer derselbe derselben des desselben dessen dich die dies diese dieselbe dieselben diesem diesen dieser dieses dir doch dort du durch ein eine einem einen einer eines einig einige einigem einigen einiger einiges einmal er es etwas euch euer eure eurem euren eurer eures für gegen gewesen hab habe haben hat hatte hatten hier hin hinter ich ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres im in indem ins ist jede jedem jeden jeder jedes jene jenem jenen jener jenes jetzt kann kein keine keinem keinen keiner keines können könnte machen man manche manchem manchen mancher manches mein meine meinem meinen meiner meines mich mir mit muss musste nach nicht nichts noch nun nur ob oder ohne sehr sein seine seinem seinen seiner seines selbst sich sie sind so solche solchem solchen solcher solches soll sollte sondern sonst um und uns unse unsem unsen unser unses unter viel vom von vor war waren warst was weg weil weiter welche welchem welchen welcher welches wenn werde werden wie wieder will wir wird wirst wo wollen wollte während würde würden zu zum zur zwar zwischen über'.split(' ');
lunr.Pipeline.registerFunction(lunr.de.stopWordFilter, 'stopWordFilter-de');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,444 @@
/*!
* Lunr languages, `Dutch` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.du = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.du.trimmer,
lunr.du.stopWordFilter,
lunr.du.stemmer
);
};
/* lunr trimmer function */
lunr.du.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.du.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.du.wordCharacters);
lunr.Pipeline.registerFunction(lunr.du.trimmer, 'trimmer-du');
/* lunr stemmer function */
lunr.du.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function DutchStemmer() {
var a_0 = [new Among("", -1, 6), new Among("\u00E1", 0, 1),
new Among("\u00E4", 0, 1), new Among("\u00E9", 0, 2),
new Among("\u00EB", 0, 2), new Among("\u00ED", 0, 3),
new Among("\u00EF", 0, 3), new Among("\u00F3", 0, 4),
new Among("\u00F6", 0, 4), new Among("\u00FA", 0, 5),
new Among("\u00FC", 0, 5)
],
a_1 = [new Among("", -1, 3),
new Among("I", 0, 2), new Among("Y", 0, 1)
],
a_2 = [
new Among("dd", -1, -1), new Among("kk", -1, -1),
new Among("tt", -1, -1)
],
a_3 = [new Among("ene", -1, 2),
new Among("se", -1, 3), new Among("en", -1, 2),
new Among("heden", 2, 1), new Among("s", -1, 3)
],
a_4 = [
new Among("end", -1, 1), new Among("ig", -1, 2),
new Among("ing", -1, 1), new Among("lijk", -1, 3),
new Among("baar", -1, 4), new Among("bar", -1, 5)
],
a_5 = [
new Among("aa", -1, -1), new Among("ee", -1, -1),
new Among("oo", -1, -1), new Among("uu", -1, -1)
],
g_v = [17, 65,
16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128
],
g_v_I = [1, 0, 0,
17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128
],
g_v_j = [
17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128
],
I_p2, I_p1, B_e_found, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function r_prelude() {
var among_var, v_1 = sbp.cursor,
v_2, v_3;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_0, 11);
if (among_var) {
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("a");
continue;
case 2:
sbp.slice_from("e");
continue;
case 3:
sbp.slice_from("i");
continue;
case 4:
sbp.slice_from("o");
continue;
case 5:
sbp.slice_from("u");
continue;
case 6:
if (sbp.cursor >= sbp.limit)
break;
sbp.cursor++;
continue;
}
}
break;
}
sbp.cursor = v_1;
sbp.bra = v_1;
if (sbp.eq_s(1, "y")) {
sbp.ket = sbp.cursor;
sbp.slice_from("Y");
} else
sbp.cursor = v_1;
while (true) {
v_2 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 232)) {
v_3 = sbp.cursor;
sbp.bra = v_3;
if (sbp.eq_s(1, "i")) {
sbp.ket = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 232)) {
sbp.slice_from("I");
sbp.cursor = v_2;
}
} else {
sbp.cursor = v_3;
if (sbp.eq_s(1, "y")) {
sbp.ket = sbp.cursor;
sbp.slice_from("Y");
sbp.cursor = v_2;
} else if (habr1(v_2))
break;
}
} else if (habr1(v_2))
break;
}
}
function habr1(v_1) {
sbp.cursor = v_1;
if (v_1 >= sbp.limit)
return true;
sbp.cursor++;
return false;
}
function r_mark_regions() {
I_p1 = sbp.limit;
I_p2 = I_p1;
if (!habr2()) {
I_p1 = sbp.cursor;
if (I_p1 < 3)
I_p1 = 3;
if (!habr2())
I_p2 = sbp.cursor;
}
}
function habr2() {
while (!sbp.in_grouping(g_v, 97, 232)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 232)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
return false;
}
function r_postlude() {
var among_var;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_1, 3);
if (among_var) {
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("y");
break;
case 2:
sbp.slice_from("i");
break;
case 3:
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
break;
}
}
}
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_undouble() {
var v_1 = sbp.limit - sbp.cursor;
if (sbp.find_among_b(a_2, 3)) {
sbp.cursor = sbp.limit - v_1;
sbp.ket = sbp.cursor;
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.bra = sbp.cursor;
sbp.slice_del();
}
}
}
function r_e_ending() {
var v_1;
B_e_found = false;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "e")) {
sbp.bra = sbp.cursor;
if (r_R1()) {
v_1 = sbp.limit - sbp.cursor;
if (sbp.out_grouping_b(g_v, 97, 232)) {
sbp.cursor = sbp.limit - v_1;
sbp.slice_del();
B_e_found = true;
r_undouble();
}
}
}
}
function r_en_ending() {
var v_1;
if (r_R1()) {
v_1 = sbp.limit - sbp.cursor;
if (sbp.out_grouping_b(g_v, 97, 232)) {
sbp.cursor = sbp.limit - v_1;
if (!sbp.eq_s_b(3, "gem")) {
sbp.cursor = sbp.limit - v_1;
sbp.slice_del();
r_undouble();
}
}
}
}
function r_standard_suffix() {
var among_var, v_1 = sbp.limit - sbp.cursor,
v_2, v_3, v_4, v_5, v_6;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 5);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (r_R1())
sbp.slice_from("heid");
break;
case 2:
r_en_ending();
break;
case 3:
if (r_R1() && sbp.out_grouping_b(g_v_j, 97, 232))
sbp.slice_del();
break;
}
}
sbp.cursor = sbp.limit - v_1;
r_e_ending();
sbp.cursor = sbp.limit - v_1;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(4, "heid")) {
sbp.bra = sbp.cursor;
if (r_R2()) {
v_2 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "c")) {
sbp.cursor = sbp.limit - v_2;
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "en")) {
sbp.bra = sbp.cursor;
r_en_ending();
}
}
}
}
sbp.cursor = sbp.limit - v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 6);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (r_R2()) {
sbp.slice_del();
v_3 = sbp.limit - sbp.cursor;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "ig")) {
sbp.bra = sbp.cursor;
if (r_R2()) {
v_4 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "e")) {
sbp.cursor = sbp.limit - v_4;
sbp.slice_del();
break;
}
}
}
sbp.cursor = sbp.limit - v_3;
r_undouble();
}
break;
case 2:
if (r_R2()) {
v_5 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "e")) {
sbp.cursor = sbp.limit - v_5;
sbp.slice_del();
}
}
break;
case 3:
if (r_R2()) {
sbp.slice_del();
r_e_ending();
}
break;
case 4:
if (r_R2())
sbp.slice_del();
break;
case 5:
if (r_R2() && B_e_found)
sbp.slice_del();
break;
}
}
sbp.cursor = sbp.limit - v_1;
if (sbp.out_grouping_b(g_v_I, 73, 232)) {
v_6 = sbp.limit - sbp.cursor;
if (sbp.find_among_b(a_5, 4) && sbp.out_grouping_b(g_v, 97, 232)) {
sbp.cursor = sbp.limit - v_6;
sbp.ket = sbp.cursor;
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.bra = sbp.cursor;
sbp.slice_del();
}
}
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_prelude();
sbp.cursor = v_1;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_standard_suffix();
sbp.cursor = sbp.limit_backward;
r_postlude();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.du.stemmer, 'stemmer-du');
/* stop word filter function */
lunr.du.stopWordFilter = function(token) {
if (lunr.du.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.du.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.du.stopWordFilter.stopWords.length = 103;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.du.stopWordFilter.stopWords.elements = ' aan al alles als altijd andere ben bij daar dan dat de der deze die dit doch doen door dus een eens en er ge geen geweest haar had heb hebben heeft hem het hier hij hoe hun iemand iets ik in is ja je kan kon kunnen maar me meer men met mij mijn moet na naar niet niets nog nu of om omdat onder ons ook op over reeds te tegen toch toen tot u uit uw van veel voor want waren was wat werd wezen wie wil worden wordt zal ze zelf zich zij zijn zo zonder zou'.split(' ');
lunr.Pipeline.registerFunction(lunr.du.stopWordFilter, 'stopWordFilter-du');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,595 @@
/*!
* Lunr languages, `Spanish` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.es = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.es.trimmer,
lunr.es.stopWordFilter,
lunr.es.stemmer
);
};
/* lunr trimmer function */
lunr.es.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.es.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.es.wordCharacters);
lunr.Pipeline.registerFunction(lunr.es.trimmer, 'trimmer-es');
/* lunr stemmer function */
lunr.es.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function SpanishStemmer() {
var a_0 = [new Among("", -1, 6), new Among("\u00E1", 0, 1),
new Among("\u00E9", 0, 2), new Among("\u00ED", 0, 3),
new Among("\u00F3", 0, 4), new Among("\u00FA", 0, 5)
],
a_1 = [
new Among("la", -1, -1), new Among("sela", 0, -1),
new Among("le", -1, -1), new Among("me", -1, -1),
new Among("se", -1, -1), new Among("lo", -1, -1),
new Among("selo", 5, -1), new Among("las", -1, -1),
new Among("selas", 7, -1), new Among("les", -1, -1),
new Among("los", -1, -1), new Among("selos", 10, -1),
new Among("nos", -1, -1)
],
a_2 = [new Among("ando", -1, 6),
new Among("iendo", -1, 6), new Among("yendo", -1, 7),
new Among("\u00E1ndo", -1, 2), new Among("i\u00E9ndo", -1, 1),
new Among("ar", -1, 6), new Among("er", -1, 6),
new Among("ir", -1, 6), new Among("\u00E1r", -1, 3),
new Among("\u00E9r", -1, 4), new Among("\u00EDr", -1, 5)
],
a_3 = [
new Among("ic", -1, -1), new Among("ad", -1, -1),
new Among("os", -1, -1), new Among("iv", -1, 1)
],
a_4 = [
new Among("able", -1, 1), new Among("ible", -1, 1),
new Among("ante", -1, 1)
],
a_5 = [new Among("ic", -1, 1),
new Among("abil", -1, 1), new Among("iv", -1, 1)
],
a_6 = [
new Among("ica", -1, 1), new Among("ancia", -1, 2),
new Among("encia", -1, 5), new Among("adora", -1, 2),
new Among("osa", -1, 1), new Among("ista", -1, 1),
new Among("iva", -1, 9), new Among("anza", -1, 1),
new Among("log\u00EDa", -1, 3), new Among("idad", -1, 8),
new Among("able", -1, 1), new Among("ible", -1, 1),
new Among("ante", -1, 2), new Among("mente", -1, 7),
new Among("amente", 13, 6), new Among("aci\u00F3n", -1, 2),
new Among("uci\u00F3n", -1, 4), new Among("ico", -1, 1),
new Among("ismo", -1, 1), new Among("oso", -1, 1),
new Among("amiento", -1, 1), new Among("imiento", -1, 1),
new Among("ivo", -1, 9), new Among("ador", -1, 2),
new Among("icas", -1, 1), new Among("ancias", -1, 2),
new Among("encias", -1, 5), new Among("adoras", -1, 2),
new Among("osas", -1, 1), new Among("istas", -1, 1),
new Among("ivas", -1, 9), new Among("anzas", -1, 1),
new Among("log\u00EDas", -1, 3), new Among("idades", -1, 8),
new Among("ables", -1, 1), new Among("ibles", -1, 1),
new Among("aciones", -1, 2), new Among("uciones", -1, 4),
new Among("adores", -1, 2), new Among("antes", -1, 2),
new Among("icos", -1, 1), new Among("ismos", -1, 1),
new Among("osos", -1, 1), new Among("amientos", -1, 1),
new Among("imientos", -1, 1), new Among("ivos", -1, 9)
],
a_7 = [
new Among("ya", -1, 1), new Among("ye", -1, 1),
new Among("yan", -1, 1), new Among("yen", -1, 1),
new Among("yeron", -1, 1), new Among("yendo", -1, 1),
new Among("yo", -1, 1), new Among("yas", -1, 1),
new Among("yes", -1, 1), new Among("yais", -1, 1),
new Among("yamos", -1, 1), new Among("y\u00F3", -1, 1)
],
a_8 = [
new Among("aba", -1, 2), new Among("ada", -1, 2),
new Among("ida", -1, 2), new Among("ara", -1, 2),
new Among("iera", -1, 2), new Among("\u00EDa", -1, 2),
new Among("ar\u00EDa", 5, 2), new Among("er\u00EDa", 5, 2),
new Among("ir\u00EDa", 5, 2), new Among("ad", -1, 2),
new Among("ed", -1, 2), new Among("id", -1, 2),
new Among("ase", -1, 2), new Among("iese", -1, 2),
new Among("aste", -1, 2), new Among("iste", -1, 2),
new Among("an", -1, 2), new Among("aban", 16, 2),
new Among("aran", 16, 2), new Among("ieran", 16, 2),
new Among("\u00EDan", 16, 2), new Among("ar\u00EDan", 20, 2),
new Among("er\u00EDan", 20, 2), new Among("ir\u00EDan", 20, 2),
new Among("en", -1, 1), new Among("asen", 24, 2),
new Among("iesen", 24, 2), new Among("aron", -1, 2),
new Among("ieron", -1, 2), new Among("ar\u00E1n", -1, 2),
new Among("er\u00E1n", -1, 2), new Among("ir\u00E1n", -1, 2),
new Among("ado", -1, 2), new Among("ido", -1, 2),
new Among("ando", -1, 2), new Among("iendo", -1, 2),
new Among("ar", -1, 2), new Among("er", -1, 2),
new Among("ir", -1, 2), new Among("as", -1, 2),
new Among("abas", 39, 2), new Among("adas", 39, 2),
new Among("idas", 39, 2), new Among("aras", 39, 2),
new Among("ieras", 39, 2), new Among("\u00EDas", 39, 2),
new Among("ar\u00EDas", 45, 2), new Among("er\u00EDas", 45, 2),
new Among("ir\u00EDas", 45, 2), new Among("es", -1, 1),
new Among("ases", 49, 2), new Among("ieses", 49, 2),
new Among("abais", -1, 2), new Among("arais", -1, 2),
new Among("ierais", -1, 2), new Among("\u00EDais", -1, 2),
new Among("ar\u00EDais", 55, 2), new Among("er\u00EDais", 55, 2),
new Among("ir\u00EDais", 55, 2), new Among("aseis", -1, 2),
new Among("ieseis", -1, 2), new Among("asteis", -1, 2),
new Among("isteis", -1, 2), new Among("\u00E1is", -1, 2),
new Among("\u00E9is", -1, 1), new Among("ar\u00E9is", 64, 2),
new Among("er\u00E9is", 64, 2), new Among("ir\u00E9is", 64, 2),
new Among("ados", -1, 2), new Among("idos", -1, 2),
new Among("amos", -1, 2), new Among("\u00E1bamos", 70, 2),
new Among("\u00E1ramos", 70, 2), new Among("i\u00E9ramos", 70, 2),
new Among("\u00EDamos", 70, 2), new Among("ar\u00EDamos", 74, 2),
new Among("er\u00EDamos", 74, 2), new Among("ir\u00EDamos", 74, 2),
new Among("emos", -1, 1), new Among("aremos", 78, 2),
new Among("eremos", 78, 2), new Among("iremos", 78, 2),
new Among("\u00E1semos", 78, 2), new Among("i\u00E9semos", 78, 2),
new Among("imos", -1, 2), new Among("ar\u00E1s", -1, 2),
new Among("er\u00E1s", -1, 2), new Among("ir\u00E1s", -1, 2),
new Among("\u00EDs", -1, 2), new Among("ar\u00E1", -1, 2),
new Among("er\u00E1", -1, 2), new Among("ir\u00E1", -1, 2),
new Among("ar\u00E9", -1, 2), new Among("er\u00E9", -1, 2),
new Among("ir\u00E9", -1, 2), new Among("i\u00F3", -1, 2)
],
a_9 = [
new Among("a", -1, 1), new Among("e", -1, 2),
new Among("o", -1, 1), new Among("os", -1, 1),
new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2),
new Among("\u00ED", -1, 1), new Among("\u00F3", -1, 1)
],
g_v = [17,
65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10
],
I_p2, I_p1, I_pV, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function habr1() {
if (sbp.out_grouping(g_v, 97, 252)) {
while (!sbp.in_grouping(g_v, 97, 252)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
return false;
}
return true;
}
function habr2() {
if (sbp.in_grouping(g_v, 97, 252)) {
var v_1 = sbp.cursor;
if (habr1()) {
sbp.cursor = v_1;
if (!sbp.in_grouping(g_v, 97, 252))
return true;
while (!sbp.out_grouping(g_v, 97, 252)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
}
return false;
}
return true;
}
function habr3() {
var v_1 = sbp.cursor,
v_2;
if (habr2()) {
sbp.cursor = v_1;
if (!sbp.out_grouping(g_v, 97, 252))
return;
v_2 = sbp.cursor;
if (habr1()) {
sbp.cursor = v_2;
if (!sbp.in_grouping(g_v, 97, 252) || sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
}
I_pV = sbp.cursor;
}
function habr4() {
while (!sbp.in_grouping(g_v, 97, 252)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 252)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
return true;
}
function r_mark_regions() {
var v_1 = sbp.cursor;
I_pV = sbp.limit;
I_p1 = I_pV;
I_p2 = I_pV;
habr3();
sbp.cursor = v_1;
if (habr4()) {
I_p1 = sbp.cursor;
if (habr4())
I_p2 = sbp.cursor;
}
}
function r_postlude() {
var among_var;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_0, 6);
if (among_var) {
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("a");
continue;
case 2:
sbp.slice_from("e");
continue;
case 3:
sbp.slice_from("i");
continue;
case 4:
sbp.slice_from("o");
continue;
case 5:
sbp.slice_from("u");
continue;
case 6:
if (sbp.cursor >= sbp.limit)
break;
sbp.cursor++;
continue;
}
}
break;
}
}
function r_RV() {
return I_pV <= sbp.cursor;
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_attached_pronoun() {
var among_var;
sbp.ket = sbp.cursor;
if (sbp.find_among_b(a_1, 13)) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among_b(a_2, 11);
if (among_var && r_RV())
switch (among_var) {
case 1:
sbp.bra = sbp.cursor;
sbp.slice_from("iendo");
break;
case 2:
sbp.bra = sbp.cursor;
sbp.slice_from("ando");
break;
case 3:
sbp.bra = sbp.cursor;
sbp.slice_from("ar");
break;
case 4:
sbp.bra = sbp.cursor;
sbp.slice_from("er");
break;
case 5:
sbp.bra = sbp.cursor;
sbp.slice_from("ir");
break;
case 6:
sbp.slice_del();
break;
case 7:
if (sbp.eq_s_b(1, "u"))
sbp.slice_del();
break;
}
}
}
function habr5(a, n) {
if (!r_R2())
return true;
sbp.slice_del();
sbp.ket = sbp.cursor;
var among_var = sbp.find_among_b(a, n);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1 && r_R2())
sbp.slice_del();
}
return false;
}
function habr6(c1) {
if (!r_R2())
return true;
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, c1)) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
return false;
}
function r_standard_suffix() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_6, 46);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (!r_R2())
return false;
sbp.slice_del();
break;
case 2:
if (habr6("ic"))
return false;
break;
case 3:
if (!r_R2())
return false;
sbp.slice_from("log");
break;
case 4:
if (!r_R2())
return false;
sbp.slice_from("u");
break;
case 5:
if (!r_R2())
return false;
sbp.slice_from("ente");
break;
case 6:
if (!r_R1())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 4);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R2()) {
sbp.slice_del();
if (among_var == 1) {
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "at")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
}
}
}
break;
case 7:
if (habr5(a_4, 3))
return false;
break;
case 8:
if (habr5(a_5, 3))
return false;
break;
case 9:
if (habr6("at"))
return false;
break;
}
return true;
}
return false;
}
function r_y_verb_suffix() {
var among_var, v_1;
if (sbp.cursor >= I_pV) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_7, 12);
sbp.limit_backward = v_1;
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1) {
if (!sbp.eq_s_b(1, "u"))
return false;
sbp.slice_del();
}
return true;
}
}
return false;
}
function r_verb_suffix() {
var among_var, v_1, v_2, v_3;
if (sbp.cursor >= I_pV) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_8, 96);
sbp.limit_backward = v_1;
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
v_2 = sbp.limit - sbp.cursor;
if (sbp.eq_s_b(1, "u")) {
v_3 = sbp.limit - sbp.cursor;
if (sbp.eq_s_b(1, "g"))
sbp.cursor = sbp.limit - v_3;
else
sbp.cursor = sbp.limit - v_2;
} else
sbp.cursor = sbp.limit - v_2;
sbp.bra = sbp.cursor;
case 2:
sbp.slice_del();
break;
}
}
}
}
function r_residual_suffix() {
var among_var, v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_9, 8);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (r_RV())
sbp.slice_del();
break;
case 2:
if (r_RV()) {
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "u")) {
sbp.bra = sbp.cursor;
v_1 = sbp.limit - sbp.cursor;
if (sbp.eq_s_b(1, "g")) {
sbp.cursor = sbp.limit - v_1;
if (r_RV())
sbp.slice_del();
}
}
}
break;
}
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_attached_pronoun();
sbp.cursor = sbp.limit;
if (!r_standard_suffix()) {
sbp.cursor = sbp.limit;
if (!r_y_verb_suffix()) {
sbp.cursor = sbp.limit;
r_verb_suffix();
}
}
sbp.cursor = sbp.limit;
r_residual_suffix();
sbp.cursor = sbp.limit_backward;
r_postlude();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.es.stemmer, 'stemmer-es');
/* stop word filter function */
lunr.es.stopWordFilter = function(token) {
if (lunr.es.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.es.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.es.stopWordFilter.stopWords.length = 309;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.es.stopWordFilter.stopWords.elements = ' a al algo algunas algunos ante antes como con contra cual cuando de del desde donde durante e el ella ellas ellos en entre era erais eran eras eres es esa esas ese eso esos esta estaba estabais estaban estabas estad estada estadas estado estados estamos estando estar estaremos estará estarán estarás estaré estaréis estaría estaríais estaríamos estarían estarías estas este estemos esto estos estoy estuve estuviera estuvierais estuvieran estuvieras estuvieron estuviese estuvieseis estuviesen estuvieses estuvimos estuviste estuvisteis estuviéramos estuviésemos estuvo está estábamos estáis están estás esté estéis estén estés fue fuera fuerais fueran fueras fueron fuese fueseis fuesen fueses fui fuimos fuiste fuisteis fuéramos fuésemos ha habida habidas habido habidos habiendo habremos habrá habrán habrás habré habréis habría habríais habríamos habrían habrías habéis había habíais habíamos habían habías han has hasta hay haya hayamos hayan hayas hayáis he hemos hube hubiera hubierais hubieran hubieras hubieron hubiese hubieseis hubiesen hubieses hubimos hubiste hubisteis hubiéramos hubiésemos hubo la las le les lo los me mi mis mucho muchos muy más mí mía mías mío míos nada ni no nos nosotras nosotros nuestra nuestras nuestro nuestros o os otra otras otro otros para pero poco por porque que quien quienes qué se sea seamos sean seas seremos será serán serás seré seréis sería seríais seríamos serían serías seáis sido siendo sin sobre sois somos son soy su sus suya suyas suyo suyos sí también tanto te tendremos tendrá tendrán tendrás tendré tendréis tendría tendríais tendríamos tendrían tendrías tened tenemos tenga tengamos tengan tengas tengo tengáis tenida tenidas tenido tenidos teniendo tenéis tenía teníais teníamos tenían tenías ti tiene tienen tienes todo todos tu tus tuve tuviera tuvierais tuvieran tuvieras tuvieron tuviese tuvieseis tuviesen tuvieses tuvimos tuviste tuvisteis tuviéramos tuviésemos tuvo tuya tuyas tuyo tuyos tú un una uno unos vosotras vosotros vuestra vuestras vuestro vuestros y ya yo él éramos'.split(' ');
lunr.Pipeline.registerFunction(lunr.es.stopWordFilter, 'stopWordFilter-es');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,536 @@
/*!
* Lunr languages, `Finnish` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.fi = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.fi.trimmer,
lunr.fi.stopWordFilter,
lunr.fi.stemmer
);
};
/* lunr trimmer function */
lunr.fi.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.fi.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.fi.wordCharacters);
lunr.Pipeline.registerFunction(lunr.fi.trimmer, 'trimmer-fi');
/* lunr stemmer function */
lunr.fi.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function FinnishStemmer() {
var a_0 = [new Among("pa", -1, 1), new Among("sti", -1, 2),
new Among("kaan", -1, 1), new Among("han", -1, 1),
new Among("kin", -1, 1), new Among("h\u00E4n", -1, 1),
new Among("k\u00E4\u00E4n", -1, 1), new Among("ko", -1, 1),
new Among("p\u00E4", -1, 1), new Among("k\u00F6", -1, 1)
],
a_1 = [
new Among("lla", -1, -1), new Among("na", -1, -1),
new Among("ssa", -1, -1), new Among("ta", -1, -1),
new Among("lta", 3, -1), new Among("sta", 3, -1)
],
a_2 = [
new Among("ll\u00E4", -1, -1), new Among("n\u00E4", -1, -1),
new Among("ss\u00E4", -1, -1), new Among("t\u00E4", -1, -1),
new Among("lt\u00E4", 3, -1), new Among("st\u00E4", 3, -1)
],
a_3 = [
new Among("lle", -1, -1), new Among("ine", -1, -1)
],
a_4 = [
new Among("nsa", -1, 3), new Among("mme", -1, 3),
new Among("nne", -1, 3), new Among("ni", -1, 2),
new Among("si", -1, 1), new Among("an", -1, 4),
new Among("en", -1, 6), new Among("\u00E4n", -1, 5),
new Among("ns\u00E4", -1, 3)
],
a_5 = [new Among("aa", -1, -1),
new Among("ee", -1, -1), new Among("ii", -1, -1),
new Among("oo", -1, -1), new Among("uu", -1, -1),
new Among("\u00E4\u00E4", -1, -1),
new Among("\u00F6\u00F6", -1, -1)
],
a_6 = [new Among("a", -1, 8),
new Among("lla", 0, -1), new Among("na", 0, -1),
new Among("ssa", 0, -1), new Among("ta", 0, -1),
new Among("lta", 4, -1), new Among("sta", 4, -1),
new Among("tta", 4, 9), new Among("lle", -1, -1),
new Among("ine", -1, -1), new Among("ksi", -1, -1),
new Among("n", -1, 7), new Among("han", 11, 1),
new Among("den", 11, -1, r_VI), new Among("seen", 11, -1, r_LONG),
new Among("hen", 11, 2), new Among("tten", 11, -1, r_VI),
new Among("hin", 11, 3), new Among("siin", 11, -1, r_VI),
new Among("hon", 11, 4), new Among("h\u00E4n", 11, 5),
new Among("h\u00F6n", 11, 6), new Among("\u00E4", -1, 8),
new Among("ll\u00E4", 22, -1), new Among("n\u00E4", 22, -1),
new Among("ss\u00E4", 22, -1), new Among("t\u00E4", 22, -1),
new Among("lt\u00E4", 26, -1), new Among("st\u00E4", 26, -1),
new Among("tt\u00E4", 26, 9)
],
a_7 = [new Among("eja", -1, -1),
new Among("mma", -1, 1), new Among("imma", 1, -1),
new Among("mpa", -1, 1), new Among("impa", 3, -1),
new Among("mmi", -1, 1), new Among("immi", 5, -1),
new Among("mpi", -1, 1), new Among("impi", 7, -1),
new Among("ej\u00E4", -1, -1), new Among("mm\u00E4", -1, 1),
new Among("imm\u00E4", 10, -1), new Among("mp\u00E4", -1, 1),
new Among("imp\u00E4", 12, -1)
],
a_8 = [new Among("i", -1, -1),
new Among("j", -1, -1)
],
a_9 = [new Among("mma", -1, 1),
new Among("imma", 0, -1)
],
g_AEI = [17, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 8
],
g_V1 = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 8, 0, 32
],
g_V2 = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 8, 0, 32
],
g_particle_end = [17, 97, 24, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32
],
B_ending_removed, S_x, I_p2, I_p1, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function r_mark_regions() {
I_p1 = sbp.limit;
I_p2 = I_p1;
if (!habr1()) {
I_p1 = sbp.cursor;
if (!habr1())
I_p2 = sbp.cursor;
}
}
function habr1() {
var v_1;
while (true) {
v_1 = sbp.cursor;
if (sbp.in_grouping(g_V1, 97, 246))
break;
sbp.cursor = v_1;
if (v_1 >= sbp.limit)
return true;
sbp.cursor++;
}
sbp.cursor = v_1;
while (!sbp.out_grouping(g_V1, 97, 246)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
return false;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_particle_etc() {
var among_var, v_1;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_0, 10);
if (among_var) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_1;
switch (among_var) {
case 1:
if (!sbp.in_grouping_b(g_particle_end, 97, 246))
return;
break;
case 2:
if (!r_R2())
return;
break;
}
sbp.slice_del();
} else
sbp.limit_backward = v_1;
}
}
function r_possessive() {
var among_var, v_1, v_2;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 9);
if (among_var) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_1;
switch (among_var) {
case 1:
v_2 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "k")) {
sbp.cursor = sbp.limit - v_2;
sbp.slice_del();
}
break;
case 2:
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(3, "kse")) {
sbp.bra = sbp.cursor;
sbp.slice_from("ksi");
}
break;
case 3:
sbp.slice_del();
break;
case 4:
if (sbp.find_among_b(a_1, 6))
sbp.slice_del();
break;
case 5:
if (sbp.find_among_b(a_2, 6))
sbp.slice_del();
break;
case 6:
if (sbp.find_among_b(a_3, 2))
sbp.slice_del();
break;
}
} else
sbp.limit_backward = v_1;
}
}
function r_LONG() {
return sbp.find_among_b(a_5, 7);
}
function r_VI() {
return sbp.eq_s_b(1, "i") && sbp.in_grouping_b(g_V2, 97, 246);
}
function r_case_ending() {
var among_var, v_1, v_2;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_6, 30);
if (among_var) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_1;
switch (among_var) {
case 1:
if (!sbp.eq_s_b(1, "a"))
return;
break;
case 2:
case 9:
if (!sbp.eq_s_b(1, "e"))
return;
break;
case 3:
if (!sbp.eq_s_b(1, "i"))
return;
break;
case 4:
if (!sbp.eq_s_b(1, "o"))
return;
break;
case 5:
if (!sbp.eq_s_b(1, "\u00E4"))
return;
break;
case 6:
if (!sbp.eq_s_b(1, "\u00F6"))
return;
break;
case 7:
v_2 = sbp.limit - sbp.cursor;
if (!r_LONG()) {
sbp.cursor = sbp.limit - v_2;
if (!sbp.eq_s_b(2, "ie")) {
sbp.cursor = sbp.limit - v_2;
break;
}
}
sbp.cursor = sbp.limit - v_2;
if (sbp.cursor <= sbp.limit_backward) {
sbp.cursor = sbp.limit - v_2;
break;
}
sbp.cursor--;
sbp.bra = sbp.cursor;
break;
case 8:
if (!sbp.in_grouping_b(g_V1, 97, 246) || !sbp.out_grouping_b(g_V1, 97, 246))
return;
break;
}
sbp.slice_del();
B_ending_removed = true;
} else
sbp.limit_backward = v_1;
}
}
function r_other_endings() {
var among_var, v_1, v_2;
if (sbp.cursor >= I_p2) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p2;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_7, 14);
if (among_var) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_1;
if (among_var == 1) {
v_2 = sbp.limit - sbp.cursor;
if (sbp.eq_s_b(2, "po"))
return;
sbp.cursor = sbp.limit - v_2;
}
sbp.slice_del();
} else
sbp.limit_backward = v_1;
}
}
function r_i_plural() {
var v_1;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
if (sbp.find_among_b(a_8, 2)) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_1;
sbp.slice_del();
} else
sbp.limit_backward = v_1;
}
}
function r_t_plural() {
var among_var, v_1, v_2, v_3, v_4, v_5;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "t")) {
sbp.bra = sbp.cursor;
v_2 = sbp.limit - sbp.cursor;
if (sbp.in_grouping_b(g_V1, 97, 246)) {
sbp.cursor = sbp.limit - v_2;
sbp.slice_del();
sbp.limit_backward = v_1;
v_3 = sbp.limit - sbp.cursor;
if (sbp.cursor >= I_p2) {
sbp.cursor = I_p2;
v_4 = sbp.limit_backward;
sbp.limit_backward = sbp.cursor;
sbp.cursor = sbp.limit - v_3;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_9, 2);
if (among_var) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_4;
if (among_var == 1) {
v_5 = sbp.limit - sbp.cursor;
if (sbp.eq_s_b(2, "po"))
return;
sbp.cursor = sbp.limit - v_5;
}
sbp.slice_del();
return;
}
}
}
}
sbp.limit_backward = v_1;
}
}
function r_tidy() {
var v_1, v_2, v_3, v_4;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
v_2 = sbp.limit - sbp.cursor;
if (r_LONG()) {
sbp.cursor = sbp.limit - v_2;
sbp.ket = sbp.cursor;
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.bra = sbp.cursor;
sbp.slice_del();
}
}
sbp.cursor = sbp.limit - v_2;
sbp.ket = sbp.cursor;
if (sbp.in_grouping_b(g_AEI, 97, 228)) {
sbp.bra = sbp.cursor;
if (sbp.out_grouping_b(g_V1, 97, 246))
sbp.slice_del();
}
sbp.cursor = sbp.limit - v_2;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "j")) {
sbp.bra = sbp.cursor;
v_3 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "o")) {
sbp.cursor = sbp.limit - v_3;
if (sbp.eq_s_b(1, "u"))
sbp.slice_del();
} else
sbp.slice_del();
}
sbp.cursor = sbp.limit - v_2;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "o")) {
sbp.bra = sbp.cursor;
if (sbp.eq_s_b(1, "j"))
sbp.slice_del();
}
sbp.cursor = sbp.limit - v_2;
sbp.limit_backward = v_1;
while (true) {
v_4 = sbp.limit - sbp.cursor;
if (sbp.out_grouping_b(g_V1, 97, 246)) {
sbp.cursor = sbp.limit - v_4;
break;
}
sbp.cursor = sbp.limit - v_4;
if (sbp.cursor <= sbp.limit_backward)
return;
sbp.cursor--;
}
sbp.ket = sbp.cursor;
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.bra = sbp.cursor;
S_x = sbp.slice_to();
if (sbp.eq_v_b(S_x))
sbp.slice_del();
}
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_mark_regions();
B_ending_removed = false;
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_particle_etc();
sbp.cursor = sbp.limit;
r_possessive();
sbp.cursor = sbp.limit;
r_case_ending();
sbp.cursor = sbp.limit;
r_other_endings();
sbp.cursor = sbp.limit;
if (B_ending_removed) {
r_i_plural();
sbp.cursor = sbp.limit;
} else {
sbp.cursor = sbp.limit;
r_t_plural();
sbp.cursor = sbp.limit;
}
r_tidy();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.fi.stemmer, 'stemmer-fi');
/* stop word filter function */
lunr.fi.stopWordFilter = function(token) {
if (lunr.fi.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.fi.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.fi.stopWordFilter.stopWords.length = 236;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.fi.stopWordFilter.stopWords.elements = ' ei eivät emme en et ette että he heidän heidät heihin heille heillä heiltä heissä heistä heitä hän häneen hänelle hänellä häneltä hänen hänessä hänestä hänet häntä itse ja johon joiden joihin joiksi joilla joille joilta joina joissa joista joita joka joksi jolla jolle jolta jona jonka jos jossa josta jota jotka kanssa keiden keihin keiksi keille keillä keiltä keinä keissä keistä keitä keneen keneksi kenelle kenellä keneltä kenen kenenä kenessä kenestä kenet ketkä ketkä ketä koska kuin kuka kun me meidän meidät meihin meille meillä meiltä meissä meistä meitä mihin miksi mikä mille millä miltä minkä minkä minua minulla minulle minulta minun minussa minusta minut minuun minä minä missä mistä mitkä mitä mukaan mutta ne niiden niihin niiksi niille niillä niiltä niin niin niinä niissä niistä niitä noiden noihin noiksi noilla noille noilta noin noina noissa noista noita nuo nyt näiden näihin näiksi näille näillä näiltä näinä näissä näistä näitä nämä ole olemme olen olet olette oli olimme olin olisi olisimme olisin olisit olisitte olisivat olit olitte olivat olla olleet ollut on ovat poikki se sekä sen siihen siinä siitä siksi sille sillä sillä siltä sinua sinulla sinulle sinulta sinun sinussa sinusta sinut sinuun sinä sinä sitä tai te teidän teidät teihin teille teillä teiltä teissä teistä teitä tuo tuohon tuoksi tuolla tuolle tuolta tuon tuona tuossa tuosta tuota tähän täksi tälle tällä tältä tämä tämän tänä tässä tästä tätä vaan vai vaikka yli'.split(' ');
lunr.Pipeline.registerFunction(lunr.fi.stopWordFilter, 'stopWordFilter-fi');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,698 @@
/*!
* Lunr languages, `French` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.fr = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.fr.trimmer,
lunr.fr.stopWordFilter,
lunr.fr.stemmer
);
};
/* lunr trimmer function */
lunr.fr.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.fr.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.fr.wordCharacters);
lunr.Pipeline.registerFunction(lunr.fr.trimmer, 'trimmer-fr');
/* lunr stemmer function */
lunr.fr.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function FrenchStemmer() {
var a_0 = [new Among("col", -1, -1), new Among("par", -1, -1),
new Among("tap", -1, -1)
],
a_1 = [new Among("", -1, 4),
new Among("I", 0, 1), new Among("U", 0, 2), new Among("Y", 0, 3)
],
a_2 = [
new Among("iqU", -1, 3), new Among("abl", -1, 3),
new Among("I\u00E8r", -1, 4), new Among("i\u00E8r", -1, 4),
new Among("eus", -1, 2), new Among("iv", -1, 1)
],
a_3 = [
new Among("ic", -1, 2), new Among("abil", -1, 1),
new Among("iv", -1, 3)
],
a_4 = [new Among("iqUe", -1, 1),
new Among("atrice", -1, 2), new Among("ance", -1, 1),
new Among("ence", -1, 5), new Among("logie", -1, 3),
new Among("able", -1, 1), new Among("isme", -1, 1),
new Among("euse", -1, 11), new Among("iste", -1, 1),
new Among("ive", -1, 8), new Among("if", -1, 8),
new Among("usion", -1, 4), new Among("ation", -1, 2),
new Among("ution", -1, 4), new Among("ateur", -1, 2),
new Among("iqUes", -1, 1), new Among("atrices", -1, 2),
new Among("ances", -1, 1), new Among("ences", -1, 5),
new Among("logies", -1, 3), new Among("ables", -1, 1),
new Among("ismes", -1, 1), new Among("euses", -1, 11),
new Among("istes", -1, 1), new Among("ives", -1, 8),
new Among("ifs", -1, 8), new Among("usions", -1, 4),
new Among("ations", -1, 2), new Among("utions", -1, 4),
new Among("ateurs", -1, 2), new Among("ments", -1, 15),
new Among("ements", 30, 6), new Among("issements", 31, 12),
new Among("it\u00E9s", -1, 7), new Among("ment", -1, 15),
new Among("ement", 34, 6), new Among("issement", 35, 12),
new Among("amment", 34, 13), new Among("emment", 34, 14),
new Among("aux", -1, 10), new Among("eaux", 39, 9),
new Among("eux", -1, 1), new Among("it\u00E9", -1, 7)
],
a_5 = [
new Among("ira", -1, 1), new Among("ie", -1, 1),
new Among("isse", -1, 1), new Among("issante", -1, 1),
new Among("i", -1, 1), new Among("irai", 4, 1),
new Among("ir", -1, 1), new Among("iras", -1, 1),
new Among("ies", -1, 1), new Among("\u00EEmes", -1, 1),
new Among("isses", -1, 1), new Among("issantes", -1, 1),
new Among("\u00EEtes", -1, 1), new Among("is", -1, 1),
new Among("irais", 13, 1), new Among("issais", 13, 1),
new Among("irions", -1, 1), new Among("issions", -1, 1),
new Among("irons", -1, 1), new Among("issons", -1, 1),
new Among("issants", -1, 1), new Among("it", -1, 1),
new Among("irait", 21, 1), new Among("issait", 21, 1),
new Among("issant", -1, 1), new Among("iraIent", -1, 1),
new Among("issaIent", -1, 1), new Among("irent", -1, 1),
new Among("issent", -1, 1), new Among("iront", -1, 1),
new Among("\u00EEt", -1, 1), new Among("iriez", -1, 1),
new Among("issiez", -1, 1), new Among("irez", -1, 1),
new Among("issez", -1, 1)
],
a_6 = [new Among("a", -1, 3),
new Among("era", 0, 2), new Among("asse", -1, 3),
new Among("ante", -1, 3), new Among("\u00E9e", -1, 2),
new Among("ai", -1, 3), new Among("erai", 5, 2),
new Among("er", -1, 2), new Among("as", -1, 3),
new Among("eras", 8, 2), new Among("\u00E2mes", -1, 3),
new Among("asses", -1, 3), new Among("antes", -1, 3),
new Among("\u00E2tes", -1, 3), new Among("\u00E9es", -1, 2),
new Among("ais", -1, 3), new Among("erais", 15, 2),
new Among("ions", -1, 1), new Among("erions", 17, 2),
new Among("assions", 17, 3), new Among("erons", -1, 2),
new Among("ants", -1, 3), new Among("\u00E9s", -1, 2),
new Among("ait", -1, 3), new Among("erait", 23, 2),
new Among("ant", -1, 3), new Among("aIent", -1, 3),
new Among("eraIent", 26, 2), new Among("\u00E8rent", -1, 2),
new Among("assent", -1, 3), new Among("eront", -1, 2),
new Among("\u00E2t", -1, 3), new Among("ez", -1, 2),
new Among("iez", 32, 2), new Among("eriez", 33, 2),
new Among("assiez", 33, 3), new Among("erez", 32, 2),
new Among("\u00E9", -1, 2)
],
a_7 = [new Among("e", -1, 3),
new Among("I\u00E8re", 0, 2), new Among("i\u00E8re", 0, 2),
new Among("ion", -1, 1), new Among("Ier", -1, 2),
new Among("ier", -1, 2), new Among("\u00EB", -1, 4)
],
a_8 = [
new Among("ell", -1, -1), new Among("eill", -1, -1),
new Among("enn", -1, -1), new Among("onn", -1, -1),
new Among("ett", -1, -1)
],
g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 128, 130, 103, 8, 5
],
g_keep_with_s = [1, 65, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128
],
I_p2, I_p1, I_pV, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function habr1(c1, c2, v_1) {
if (sbp.eq_s(1, c1)) {
sbp.ket = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 251)) {
sbp.slice_from(c2);
sbp.cursor = v_1;
return true;
}
}
return false;
}
function habr2(c1, c2, v_1) {
if (sbp.eq_s(1, c1)) {
sbp.ket = sbp.cursor;
sbp.slice_from(c2);
sbp.cursor = v_1;
return true;
}
return false;
}
function r_prelude() {
var v_1, v_2;
while (true) {
v_1 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 251)) {
sbp.bra = sbp.cursor;
v_2 = sbp.cursor;
if (habr1("u", "U", v_1))
continue;
sbp.cursor = v_2;
if (habr1("i", "I", v_1))
continue;
sbp.cursor = v_2;
if (habr2("y", "Y", v_1))
continue;
}
sbp.cursor = v_1;
sbp.bra = v_1;
if (!habr1("y", "Y", v_1)) {
sbp.cursor = v_1;
if (sbp.eq_s(1, "q")) {
sbp.bra = sbp.cursor;
if (habr2("u", "U", v_1))
continue;
}
sbp.cursor = v_1;
if (v_1 >= sbp.limit)
return;
sbp.cursor++;
}
}
}
function habr3() {
while (!sbp.in_grouping(g_v, 97, 251)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 251)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
return false;
}
function r_mark_regions() {
var v_1 = sbp.cursor;
I_pV = sbp.limit;
I_p1 = I_pV;
I_p2 = I_pV;
if (sbp.in_grouping(g_v, 97, 251) && sbp.in_grouping(g_v, 97, 251) && sbp.cursor < sbp.limit)
sbp.cursor++;
else {
sbp.cursor = v_1;
if (!sbp.find_among(a_0, 3)) {
sbp.cursor = v_1;
do {
if (sbp.cursor >= sbp.limit) {
sbp.cursor = I_pV;
break;
}
sbp.cursor++;
} while (!sbp.in_grouping(g_v, 97, 251));
}
}
I_pV = sbp.cursor;
sbp.cursor = v_1;
if (!habr3()) {
I_p1 = sbp.cursor;
if (!habr3())
I_p2 = sbp.cursor;
}
}
function r_postlude() {
var among_var, v_1;
while (true) {
v_1 = sbp.cursor;
sbp.bra = v_1;
among_var = sbp.find_among(a_1, 4);
if (!among_var)
break;
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("i");
break;
case 2:
sbp.slice_from("u");
break;
case 3:
sbp.slice_from("y");
break;
case 4:
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
break;
}
}
}
function r_RV() {
return I_pV <= sbp.cursor;
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_standard_suffix() {
var among_var, v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 43);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (!r_R2())
return false;
sbp.slice_del();
break;
case 2:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "ic")) {
sbp.bra = sbp.cursor;
if (!r_R2())
sbp.slice_from("iqU");
else
sbp.slice_del();
}
break;
case 3:
if (!r_R2())
return false;
sbp.slice_from("log");
break;
case 4:
if (!r_R2())
return false;
sbp.slice_from("u");
break;
case 5:
if (!r_R2())
return false;
sbp.slice_from("ent");
break;
case 6:
if (!r_RV())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_2, 6);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (r_R2()) {
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "at")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
}
break;
case 2:
if (r_R2())
sbp.slice_del();
else if (r_R1())
sbp.slice_from("eux");
break;
case 3:
if (r_R2())
sbp.slice_del();
break;
case 4:
if (r_RV())
sbp.slice_from("i");
break;
}
}
break;
case 7:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 3);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (r_R2())
sbp.slice_del();
else
sbp.slice_from("abl");
break;
case 2:
if (r_R2())
sbp.slice_del();
else
sbp.slice_from("iqU");
break;
case 3:
if (r_R2())
sbp.slice_del();
break;
}
}
break;
case 8:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "at")) {
sbp.bra = sbp.cursor;
if (r_R2()) {
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "ic")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
else
sbp.slice_from("iqU");
break;
}
}
}
break;
case 9:
sbp.slice_from("eau");
break;
case 10:
if (!r_R1())
return false;
sbp.slice_from("al");
break;
case 11:
if (r_R2())
sbp.slice_del();
else if (!r_R1())
return false;
else
sbp.slice_from("eux");
break;
case 12:
if (!r_R1() || !sbp.out_grouping_b(g_v, 97, 251))
return false;
sbp.slice_del();
break;
case 13:
if (r_RV())
sbp.slice_from("ant");
return false;
case 14:
if (r_RV())
sbp.slice_from("ent");
return false;
case 15:
v_1 = sbp.limit - sbp.cursor;
if (sbp.in_grouping_b(g_v, 97, 251) && r_RV()) {
sbp.cursor = sbp.limit - v_1;
sbp.slice_del();
}
return false;
}
return true;
}
return false;
}
function r_i_verb_suffix() {
var among_var, v_1;
if (sbp.cursor < I_pV)
return false;
v_1 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_5, 35);
if (!among_var) {
sbp.limit_backward = v_1;
return false;
}
sbp.bra = sbp.cursor;
if (among_var == 1) {
if (!sbp.out_grouping_b(g_v, 97, 251)) {
sbp.limit_backward = v_1;
return false;
}
sbp.slice_del();
}
sbp.limit_backward = v_1;
return true;
}
function r_verb_suffix() {
var among_var, v_2, v_3;
if (sbp.cursor < I_pV)
return false;
v_2 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_6, 38);
if (!among_var) {
sbp.limit_backward = v_2;
return false;
}
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (!r_R2()) {
sbp.limit_backward = v_2;
return false;
}
sbp.slice_del();
break;
case 2:
sbp.slice_del();
break;
case 3:
sbp.slice_del();
v_3 = sbp.limit - sbp.cursor;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "e")) {
sbp.bra = sbp.cursor;
sbp.slice_del();
} else
sbp.cursor = sbp.limit - v_3;
break;
}
sbp.limit_backward = v_2;
return true;
}
function r_residual_suffix() {
var among_var, v_1 = sbp.limit - sbp.cursor,
v_2, v_4, v_5;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "s")) {
sbp.bra = sbp.cursor;
v_2 = sbp.limit - sbp.cursor;
if (sbp.out_grouping_b(g_keep_with_s, 97, 232)) {
sbp.cursor = sbp.limit - v_2;
sbp.slice_del();
} else
sbp.cursor = sbp.limit - v_1;
} else
sbp.cursor = sbp.limit - v_1;
if (sbp.cursor >= I_pV) {
v_4 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_7, 7);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (r_R2()) {
v_5 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "s")) {
sbp.cursor = sbp.limit - v_5;
if (!sbp.eq_s_b(1, "t"))
break;
}
sbp.slice_del();
}
break;
case 2:
sbp.slice_from("i");
break;
case 3:
sbp.slice_del();
break;
case 4:
if (sbp.eq_s_b(2, "gu"))
sbp.slice_del();
break;
}
}
sbp.limit_backward = v_4;
}
}
function r_un_double() {
var v_1 = sbp.limit - sbp.cursor;
if (sbp.find_among_b(a_8, 5)) {
sbp.cursor = sbp.limit - v_1;
sbp.ket = sbp.cursor;
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.bra = sbp.cursor;
sbp.slice_del();
}
}
}
function r_un_accent() {
var v_1, v_2 = 1;
while (sbp.out_grouping_b(g_v, 97, 251))
v_2--;
if (v_2 <= 0) {
sbp.ket = sbp.cursor;
v_1 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "\u00E9")) {
sbp.cursor = sbp.limit - v_1;
if (!sbp.eq_s_b(1, "\u00E8"))
return;
}
sbp.bra = sbp.cursor;
sbp.slice_from("e");
}
}
function habr5() {
if (!r_standard_suffix()) {
sbp.cursor = sbp.limit;
if (!r_i_verb_suffix()) {
sbp.cursor = sbp.limit;
if (!r_verb_suffix()) {
sbp.cursor = sbp.limit;
r_residual_suffix();
return;
}
}
}
sbp.cursor = sbp.limit;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "Y")) {
sbp.bra = sbp.cursor;
sbp.slice_from("i");
} else {
sbp.cursor = sbp.limit;
if (sbp.eq_s_b(1, "\u00E7")) {
sbp.bra = sbp.cursor;
sbp.slice_from("c");
}
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_prelude();
sbp.cursor = v_1;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
habr5();
sbp.cursor = sbp.limit;
r_un_double();
sbp.cursor = sbp.limit;
r_un_accent();
sbp.cursor = sbp.limit_backward;
r_postlude();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.fr.stemmer, 'stemmer-fr');
/* stop word filter function */
lunr.fr.stopWordFilter = function(token) {
if (lunr.fr.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.fr.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.fr.stopWordFilter.stopWords.length = 164;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.fr.stopWordFilter.stopWords.elements = ' ai aie aient aies ait as au aura aurai auraient aurais aurait auras aurez auriez aurions aurons auront aux avaient avais avait avec avez aviez avions avons ayant ayez ayons c ce ceci celà ces cet cette d dans de des du elle en es est et eu eue eues eurent eus eusse eussent eusses eussiez eussions eut eux eûmes eût eûtes furent fus fusse fussent fusses fussiez fussions fut fûmes fût fûtes ici il ils j je l la le les leur leurs lui m ma mais me mes moi mon même n ne nos notre nous on ont ou par pas pour qu que quel quelle quelles quels qui s sa sans se sera serai seraient serais serait seras serez seriez serions serons seront ses soi soient sois soit sommes son sont soyez soyons suis sur t ta te tes toi ton tu un une vos votre vous y à étaient étais était étant étiez étions été étée étées étés êtes'.split(' ');
lunr.Pipeline.registerFunction(lunr.fr.stopWordFilter, 'stopWordFilter-fr');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,561 @@
/*!
* Lunr languages, `Hungarian` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.hu = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.hu.trimmer,
lunr.hu.stopWordFilter,
lunr.hu.stemmer
);
};
/* lunr trimmer function */
lunr.hu.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.hu.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.hu.wordCharacters);
lunr.Pipeline.registerFunction(lunr.hu.trimmer, 'trimmer-hu');
/* lunr stemmer function */
lunr.hu.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function HungarianStemmer() {
var a_0 = [new Among("cs", -1, -1), new Among("dzs", -1, -1),
new Among("gy", -1, -1), new Among("ly", -1, -1),
new Among("ny", -1, -1), new Among("sz", -1, -1),
new Among("ty", -1, -1), new Among("zs", -1, -1)
],
a_1 = [
new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2)
],
a_2 = [
new Among("bb", -1, -1), new Among("cc", -1, -1),
new Among("dd", -1, -1), new Among("ff", -1, -1),
new Among("gg", -1, -1), new Among("jj", -1, -1),
new Among("kk", -1, -1), new Among("ll", -1, -1),
new Among("mm", -1, -1), new Among("nn", -1, -1),
new Among("pp", -1, -1), new Among("rr", -1, -1),
new Among("ccs", -1, -1), new Among("ss", -1, -1),
new Among("zzs", -1, -1), new Among("tt", -1, -1),
new Among("vv", -1, -1), new Among("ggy", -1, -1),
new Among("lly", -1, -1), new Among("nny", -1, -1),
new Among("tty", -1, -1), new Among("ssz", -1, -1),
new Among("zz", -1, -1)
],
a_3 = [new Among("al", -1, 1),
new Among("el", -1, 2)
],
a_4 = [new Among("ba", -1, -1),
new Among("ra", -1, -1), new Among("be", -1, -1),
new Among("re", -1, -1), new Among("ig", -1, -1),
new Among("nak", -1, -1), new Among("nek", -1, -1),
new Among("val", -1, -1), new Among("vel", -1, -1),
new Among("ul", -1, -1), new Among("n\u00E1l", -1, -1),
new Among("n\u00E9l", -1, -1), new Among("b\u00F3l", -1, -1),
new Among("r\u00F3l", -1, -1), new Among("t\u00F3l", -1, -1),
new Among("b\u00F5l", -1, -1), new Among("r\u00F5l", -1, -1),
new Among("t\u00F5l", -1, -1), new Among("\u00FCl", -1, -1),
new Among("n", -1, -1), new Among("an", 19, -1),
new Among("ban", 20, -1), new Among("en", 19, -1),
new Among("ben", 22, -1), new Among("k\u00E9ppen", 22, -1),
new Among("on", 19, -1), new Among("\u00F6n", 19, -1),
new Among("k\u00E9pp", -1, -1), new Among("kor", -1, -1),
new Among("t", -1, -1), new Among("at", 29, -1),
new Among("et", 29, -1), new Among("k\u00E9nt", 29, -1),
new Among("ank\u00E9nt", 32, -1), new Among("enk\u00E9nt", 32, -1),
new Among("onk\u00E9nt", 32, -1), new Among("ot", 29, -1),
new Among("\u00E9rt", 29, -1), new Among("\u00F6t", 29, -1),
new Among("hez", -1, -1), new Among("hoz", -1, -1),
new Among("h\u00F6z", -1, -1), new Among("v\u00E1", -1, -1),
new Among("v\u00E9", -1, -1)
],
a_5 = [new Among("\u00E1n", -1, 2),
new Among("\u00E9n", -1, 1), new Among("\u00E1nk\u00E9nt", -1, 3)
],
a_6 = [
new Among("stul", -1, 2), new Among("astul", 0, 1),
new Among("\u00E1stul", 0, 3), new Among("st\u00FCl", -1, 2),
new Among("est\u00FCl", 3, 1), new Among("\u00E9st\u00FCl", 3, 4)
],
a_7 = [
new Among("\u00E1", -1, 1), new Among("\u00E9", -1, 2)
],
a_8 = [
new Among("k", -1, 7), new Among("ak", 0, 4),
new Among("ek", 0, 6), new Among("ok", 0, 5),
new Among("\u00E1k", 0, 1), new Among("\u00E9k", 0, 2),
new Among("\u00F6k", 0, 3)
],
a_9 = [new Among("\u00E9i", -1, 7),
new Among("\u00E1\u00E9i", 0, 6), new Among("\u00E9\u00E9i", 0, 5),
new Among("\u00E9", -1, 9), new Among("k\u00E9", 3, 4),
new Among("ak\u00E9", 4, 1), new Among("ek\u00E9", 4, 1),
new Among("ok\u00E9", 4, 1), new Among("\u00E1k\u00E9", 4, 3),
new Among("\u00E9k\u00E9", 4, 2), new Among("\u00F6k\u00E9", 4, 1),
new Among("\u00E9\u00E9", 3, 8)
],
a_10 = [new Among("a", -1, 18),
new Among("ja", 0, 17), new Among("d", -1, 16),
new Among("ad", 2, 13), new Among("ed", 2, 13),
new Among("od", 2, 13), new Among("\u00E1d", 2, 14),
new Among("\u00E9d", 2, 15), new Among("\u00F6d", 2, 13),
new Among("e", -1, 18), new Among("je", 9, 17),
new Among("nk", -1, 4), new Among("unk", 11, 1),
new Among("\u00E1nk", 11, 2), new Among("\u00E9nk", 11, 3),
new Among("\u00FCnk", 11, 1), new Among("uk", -1, 8),
new Among("juk", 16, 7), new Among("\u00E1juk", 17, 5),
new Among("\u00FCk", -1, 8), new Among("j\u00FCk", 19, 7),
new Among("\u00E9j\u00FCk", 20, 6), new Among("m", -1, 12),
new Among("am", 22, 9), new Among("em", 22, 9),
new Among("om", 22, 9), new Among("\u00E1m", 22, 10),
new Among("\u00E9m", 22, 11), new Among("o", -1, 18),
new Among("\u00E1", -1, 19), new Among("\u00E9", -1, 20)
],
a_11 = [
new Among("id", -1, 10), new Among("aid", 0, 9),
new Among("jaid", 1, 6), new Among("eid", 0, 9),
new Among("jeid", 3, 6), new Among("\u00E1id", 0, 7),
new Among("\u00E9id", 0, 8), new Among("i", -1, 15),
new Among("ai", 7, 14), new Among("jai", 8, 11),
new Among("ei", 7, 14), new Among("jei", 10, 11),
new Among("\u00E1i", 7, 12), new Among("\u00E9i", 7, 13),
new Among("itek", -1, 24), new Among("eitek", 14, 21),
new Among("jeitek", 15, 20), new Among("\u00E9itek", 14, 23),
new Among("ik", -1, 29), new Among("aik", 18, 26),
new Among("jaik", 19, 25), new Among("eik", 18, 26),
new Among("jeik", 21, 25), new Among("\u00E1ik", 18, 27),
new Among("\u00E9ik", 18, 28), new Among("ink", -1, 20),
new Among("aink", 25, 17), new Among("jaink", 26, 16),
new Among("eink", 25, 17), new Among("jeink", 28, 16),
new Among("\u00E1ink", 25, 18), new Among("\u00E9ink", 25, 19),
new Among("aitok", -1, 21), new Among("jaitok", 32, 20),
new Among("\u00E1itok", -1, 22), new Among("im", -1, 5),
new Among("aim", 35, 4), new Among("jaim", 36, 1),
new Among("eim", 35, 4), new Among("jeim", 38, 1),
new Among("\u00E1im", 35, 2), new Among("\u00E9im", 35, 3)
],
g_v = [
17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 52, 14
],
I_p1, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function r_mark_regions() {
var v_1 = sbp.cursor,
v_2;
I_p1 = sbp.limit;
if (sbp.in_grouping(g_v, 97, 252)) {
while (true) {
v_2 = sbp.cursor;
if (sbp.out_grouping(g_v, 97, 252)) {
sbp.cursor = v_2;
if (!sbp.find_among(a_0, 8)) {
sbp.cursor = v_2;
if (v_2 < sbp.limit)
sbp.cursor++;
}
I_p1 = sbp.cursor;
return;
}
sbp.cursor = v_2;
if (v_2 >= sbp.limit) {
I_p1 = v_2;
return;
}
sbp.cursor++;
}
}
sbp.cursor = v_1;
if (sbp.out_grouping(g_v, 97, 252)) {
while (!sbp.in_grouping(g_v, 97, 252)) {
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
I_p1 = sbp.cursor;
}
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_v_ending() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_1, 2);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
sbp.slice_from("a");
break;
case 2:
sbp.slice_from("e");
break;
}
}
}
}
function r_double() {
var v_1 = sbp.limit - sbp.cursor;
if (!sbp.find_among_b(a_2, 23))
return false;
sbp.cursor = sbp.limit - v_1;
return true;
}
function r_undouble() {
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.ket = sbp.cursor;
var c = sbp.cursor - 1;
if (sbp.limit_backward <= c && c <= sbp.limit) {
sbp.cursor = c;
sbp.bra = c;
sbp.slice_del();
}
}
}
function r_instrum() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 2);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
if (among_var == 1 || among_var == 2)
if (!r_double())
return;
sbp.slice_del();
r_undouble();
}
}
}
function r_case() {
sbp.ket = sbp.cursor;
if (sbp.find_among_b(a_4, 44)) {
sbp.bra = sbp.cursor;
if (r_R1()) {
sbp.slice_del();
r_v_ending();
}
}
}
function r_case_special() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_5, 3);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
sbp.slice_from("e");
break;
case 2:
case 3:
sbp.slice_from("a");
break;
}
}
}
}
function r_case_other() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_6, 6);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
case 2:
sbp.slice_del();
break;
case 3:
sbp.slice_from("a");
break;
case 4:
sbp.slice_from("e");
break;
}
}
}
}
function r_factive() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_7, 2);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
if (among_var == 1 || among_var == 2)
if (!r_double())
return;
sbp.slice_del();
r_undouble()
}
}
}
function r_plural() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_8, 7);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
sbp.slice_from("a");
break;
case 2:
sbp.slice_from("e");
break;
case 3:
case 4:
case 5:
case 6:
case 7:
sbp.slice_del();
break;
}
}
}
}
function r_owned() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_9, 12);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
case 4:
case 7:
case 9:
sbp.slice_del();
break;
case 2:
case 5:
case 8:
sbp.slice_from("e");
break;
case 3:
case 6:
sbp.slice_from("a");
break;
}
}
}
}
function r_sing_owner() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_10, 31);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
case 4:
case 7:
case 8:
case 9:
case 12:
case 13:
case 16:
case 17:
case 18:
sbp.slice_del();
break;
case 2:
case 5:
case 10:
case 14:
case 19:
sbp.slice_from("a");
break;
case 3:
case 6:
case 11:
case 15:
case 20:
sbp.slice_from("e");
break;
}
}
}
}
function r_plur_owner() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_11, 42);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
case 4:
case 5:
case 6:
case 9:
case 10:
case 11:
case 14:
case 15:
case 16:
case 17:
case 20:
case 21:
case 24:
case 25:
case 26:
case 29:
sbp.slice_del();
break;
case 2:
case 7:
case 12:
case 18:
case 22:
case 27:
sbp.slice_from("a");
break;
case 3:
case 8:
case 13:
case 19:
case 23:
case 28:
sbp.slice_from("e");
break;
}
}
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_instrum();
sbp.cursor = sbp.limit;
r_case();
sbp.cursor = sbp.limit;
r_case_special();
sbp.cursor = sbp.limit;
r_case_other();
sbp.cursor = sbp.limit;
r_factive();
sbp.cursor = sbp.limit;
r_owned();
sbp.cursor = sbp.limit;
r_sing_owner();
sbp.cursor = sbp.limit;
r_plur_owner();
sbp.cursor = sbp.limit;
r_plural();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.hu.stemmer, 'stemmer-hu');
/* stop word filter function */
lunr.hu.stopWordFilter = function(token) {
if (lunr.hu.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.hu.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.hu.stopWordFilter.stopWords.length = 200;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.hu.stopWordFilter.stopWords.elements = ' a abban ahhoz ahogy ahol aki akik akkor alatt amely amelyek amelyekben amelyeket amelyet amelynek ami amikor amit amolyan amíg annak arra arról az azok azon azonban azt aztán azután azzal azért be belül benne bár cikk cikkek cikkeket csak de e ebben eddig egy egyes egyetlen egyik egyre egyéb egész ehhez ekkor el ellen elsõ elég elõ elõször elõtt emilyen ennek erre ez ezek ezen ezt ezzel ezért fel felé hanem hiszen hogy hogyan igen ill ill. illetve ilyen ilyenkor ismét ison itt jobban jó jól kell kellett keressünk keresztül ki kívül között közül legalább legyen lehet lehetett lenne lenni lesz lett maga magát majd majd meg mellett mely melyek mert mi mikor milyen minden mindenki mindent mindig mint mintha mit mivel miért most már más másik még míg nagy nagyobb nagyon ne nekem neki nem nincs néha néhány nélkül olyan ott pedig persze rá s saját sem semmi sok sokat sokkal szemben szerint szinte számára talán tehát teljes tovább továbbá több ugyanis utolsó után utána vagy vagyis vagyok valaki valami valamint való van vannak vele vissza viszont volna volt voltak voltam voltunk által általában át én éppen és így õ õk õket össze úgy új újabb újra'.split(' ');
lunr.Pipeline.registerFunction(lunr.hu.stopWordFilter, 'stopWordFilter-hu');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,612 @@
/*!
* Lunr languages, `Italian` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.it = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.it.trimmer,
lunr.it.stopWordFilter,
lunr.it.stemmer
);
};
/* lunr trimmer function */
lunr.it.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.it.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.it.wordCharacters);
lunr.Pipeline.registerFunction(lunr.it.trimmer, 'trimmer-it');
/* lunr stemmer function */
lunr.it.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function ItalianStemmer() {
var a_0 = [new Among("", -1, 7), new Among("qu", 0, 6),
new Among("\u00E1", 0, 1), new Among("\u00E9", 0, 2),
new Among("\u00ED", 0, 3), new Among("\u00F3", 0, 4),
new Among("\u00FA", 0, 5)
],
a_1 = [new Among("", -1, 3),
new Among("I", 0, 1), new Among("U", 0, 2)
],
a_2 = [
new Among("la", -1, -1), new Among("cela", 0, -1),
new Among("gliela", 0, -1), new Among("mela", 0, -1),
new Among("tela", 0, -1), new Among("vela", 0, -1),
new Among("le", -1, -1), new Among("cele", 6, -1),
new Among("gliele", 6, -1), new Among("mele", 6, -1),
new Among("tele", 6, -1), new Among("vele", 6, -1),
new Among("ne", -1, -1), new Among("cene", 12, -1),
new Among("gliene", 12, -1), new Among("mene", 12, -1),
new Among("sene", 12, -1), new Among("tene", 12, -1),
new Among("vene", 12, -1), new Among("ci", -1, -1),
new Among("li", -1, -1), new Among("celi", 20, -1),
new Among("glieli", 20, -1), new Among("meli", 20, -1),
new Among("teli", 20, -1), new Among("veli", 20, -1),
new Among("gli", 20, -1), new Among("mi", -1, -1),
new Among("si", -1, -1), new Among("ti", -1, -1),
new Among("vi", -1, -1), new Among("lo", -1, -1),
new Among("celo", 31, -1), new Among("glielo", 31, -1),
new Among("melo", 31, -1), new Among("telo", 31, -1),
new Among("velo", 31, -1)
],
a_3 = [new Among("ando", -1, 1),
new Among("endo", -1, 1), new Among("ar", -1, 2),
new Among("er", -1, 2), new Among("ir", -1, 2)
],
a_4 = [
new Among("ic", -1, -1), new Among("abil", -1, -1),
new Among("os", -1, -1), new Among("iv", -1, 1)
],
a_5 = [
new Among("ic", -1, 1), new Among("abil", -1, 1),
new Among("iv", -1, 1)
],
a_6 = [new Among("ica", -1, 1),
new Among("logia", -1, 3), new Among("osa", -1, 1),
new Among("ista", -1, 1), new Among("iva", -1, 9),
new Among("anza", -1, 1), new Among("enza", -1, 5),
new Among("ice", -1, 1), new Among("atrice", 7, 1),
new Among("iche", -1, 1), new Among("logie", -1, 3),
new Among("abile", -1, 1), new Among("ibile", -1, 1),
new Among("usione", -1, 4), new Among("azione", -1, 2),
new Among("uzione", -1, 4), new Among("atore", -1, 2),
new Among("ose", -1, 1), new Among("ante", -1, 1),
new Among("mente", -1, 1), new Among("amente", 19, 7),
new Among("iste", -1, 1), new Among("ive", -1, 9),
new Among("anze", -1, 1), new Among("enze", -1, 5),
new Among("ici", -1, 1), new Among("atrici", 25, 1),
new Among("ichi", -1, 1), new Among("abili", -1, 1),
new Among("ibili", -1, 1), new Among("ismi", -1, 1),
new Among("usioni", -1, 4), new Among("azioni", -1, 2),
new Among("uzioni", -1, 4), new Among("atori", -1, 2),
new Among("osi", -1, 1), new Among("anti", -1, 1),
new Among("amenti", -1, 6), new Among("imenti", -1, 6),
new Among("isti", -1, 1), new Among("ivi", -1, 9),
new Among("ico", -1, 1), new Among("ismo", -1, 1),
new Among("oso", -1, 1), new Among("amento", -1, 6),
new Among("imento", -1, 6), new Among("ivo", -1, 9),
new Among("it\u00E0", -1, 8), new Among("ist\u00E0", -1, 1),
new Among("ist\u00E8", -1, 1), new Among("ist\u00EC", -1, 1)
],
a_7 = [
new Among("isca", -1, 1), new Among("enda", -1, 1),
new Among("ata", -1, 1), new Among("ita", -1, 1),
new Among("uta", -1, 1), new Among("ava", -1, 1),
new Among("eva", -1, 1), new Among("iva", -1, 1),
new Among("erebbe", -1, 1), new Among("irebbe", -1, 1),
new Among("isce", -1, 1), new Among("ende", -1, 1),
new Among("are", -1, 1), new Among("ere", -1, 1),
new Among("ire", -1, 1), new Among("asse", -1, 1),
new Among("ate", -1, 1), new Among("avate", 16, 1),
new Among("evate", 16, 1), new Among("ivate", 16, 1),
new Among("ete", -1, 1), new Among("erete", 20, 1),
new Among("irete", 20, 1), new Among("ite", -1, 1),
new Among("ereste", -1, 1), new Among("ireste", -1, 1),
new Among("ute", -1, 1), new Among("erai", -1, 1),
new Among("irai", -1, 1), new Among("isci", -1, 1),
new Among("endi", -1, 1), new Among("erei", -1, 1),
new Among("irei", -1, 1), new Among("assi", -1, 1),
new Among("ati", -1, 1), new Among("iti", -1, 1),
new Among("eresti", -1, 1), new Among("iresti", -1, 1),
new Among("uti", -1, 1), new Among("avi", -1, 1),
new Among("evi", -1, 1), new Among("ivi", -1, 1),
new Among("isco", -1, 1), new Among("ando", -1, 1),
new Among("endo", -1, 1), new Among("Yamo", -1, 1),
new Among("iamo", -1, 1), new Among("avamo", -1, 1),
new Among("evamo", -1, 1), new Among("ivamo", -1, 1),
new Among("eremo", -1, 1), new Among("iremo", -1, 1),
new Among("assimo", -1, 1), new Among("ammo", -1, 1),
new Among("emmo", -1, 1), new Among("eremmo", 54, 1),
new Among("iremmo", 54, 1), new Among("immo", -1, 1),
new Among("ano", -1, 1), new Among("iscano", 58, 1),
new Among("avano", 58, 1), new Among("evano", 58, 1),
new Among("ivano", 58, 1), new Among("eranno", -1, 1),
new Among("iranno", -1, 1), new Among("ono", -1, 1),
new Among("iscono", 65, 1), new Among("arono", 65, 1),
new Among("erono", 65, 1), new Among("irono", 65, 1),
new Among("erebbero", -1, 1), new Among("irebbero", -1, 1),
new Among("assero", -1, 1), new Among("essero", -1, 1),
new Among("issero", -1, 1), new Among("ato", -1, 1),
new Among("ito", -1, 1), new Among("uto", -1, 1),
new Among("avo", -1, 1), new Among("evo", -1, 1),
new Among("ivo", -1, 1), new Among("ar", -1, 1),
new Among("ir", -1, 1), new Among("er\u00E0", -1, 1),
new Among("ir\u00E0", -1, 1), new Among("er\u00F2", -1, 1),
new Among("ir\u00F2", -1, 1)
],
g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 128, 128, 8, 2, 1
],
g_AEIO = [17, 65, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 8, 2
],
g_CG = [17],
I_p2, I_p1, I_pV, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function habr1(c1, c2, v_1) {
if (sbp.eq_s(1, c1)) {
sbp.ket = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 249)) {
sbp.slice_from(c2);
sbp.cursor = v_1;
return true;
}
}
return false;
}
function r_prelude() {
var among_var, v_1 = sbp.cursor,
v_2, v_3, v_4;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_0, 7);
if (among_var) {
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("\u00E0");
continue;
case 2:
sbp.slice_from("\u00E8");
continue;
case 3:
sbp.slice_from("\u00EC");
continue;
case 4:
sbp.slice_from("\u00F2");
continue;
case 5:
sbp.slice_from("\u00F9");
continue;
case 6:
sbp.slice_from("qU");
continue;
case 7:
if (sbp.cursor >= sbp.limit)
break;
sbp.cursor++;
continue;
}
}
break;
}
sbp.cursor = v_1;
while (true) {
v_2 = sbp.cursor;
while (true) {
v_3 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 249)) {
sbp.bra = sbp.cursor;
v_4 = sbp.cursor;
if (habr1("u", "U", v_3))
break;
sbp.cursor = v_4;
if (habr1("i", "I", v_3))
break;
}
sbp.cursor = v_3;
if (sbp.cursor >= sbp.limit) {
sbp.cursor = v_2;
return;
}
sbp.cursor++;
}
}
}
function habr2(v_1) {
sbp.cursor = v_1;
if (!sbp.in_grouping(g_v, 97, 249))
return false;
while (!sbp.out_grouping(g_v, 97, 249)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
return true;
}
function habr3() {
if (sbp.in_grouping(g_v, 97, 249)) {
var v_1 = sbp.cursor;
if (sbp.out_grouping(g_v, 97, 249)) {
while (!sbp.in_grouping(g_v, 97, 249)) {
if (sbp.cursor >= sbp.limit)
return habr2(v_1);
sbp.cursor++;
}
return true;
}
return habr2(v_1);
}
return false;
}
function habr4() {
var v_1 = sbp.cursor,
v_2;
if (!habr3()) {
sbp.cursor = v_1;
if (!sbp.out_grouping(g_v, 97, 249))
return;
v_2 = sbp.cursor;
if (sbp.out_grouping(g_v, 97, 249)) {
while (!sbp.in_grouping(g_v, 97, 249)) {
if (sbp.cursor >= sbp.limit) {
sbp.cursor = v_2;
if (sbp.in_grouping(g_v, 97, 249) && sbp.cursor < sbp.limit)
sbp.cursor++;
return;
}
sbp.cursor++;
}
I_pV = sbp.cursor;
return;
}
sbp.cursor = v_2;
if (!sbp.in_grouping(g_v, 97, 249) || sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
I_pV = sbp.cursor;
}
function habr5() {
while (!sbp.in_grouping(g_v, 97, 249)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 249)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
return true;
}
function r_mark_regions() {
var v_1 = sbp.cursor;
I_pV = sbp.limit;
I_p1 = I_pV;
I_p2 = I_pV;
habr4();
sbp.cursor = v_1;
if (habr5()) {
I_p1 = sbp.cursor;
if (habr5())
I_p2 = sbp.cursor;
}
}
function r_postlude() {
var among_var;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_1, 3);
if (!among_var)
break;
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("i");
break;
case 2:
sbp.slice_from("u");
break;
case 3:
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
break;
}
}
}
function r_RV() {
return I_pV <= sbp.cursor;
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_attached_pronoun() {
var among_var;
sbp.ket = sbp.cursor;
if (sbp.find_among_b(a_2, 37)) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among_b(a_3, 5);
if (among_var && r_RV()) {
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
sbp.slice_from("e");
break;
}
}
}
}
function r_standard_suffix() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_6, 51);
if (!among_var)
return false;
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (!r_R2())
return false;
sbp.slice_del();
break;
case 2:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "ic")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
break;
case 3:
if (!r_R2())
return false;
sbp.slice_from("log");
break;
case 4:
if (!r_R2())
return false;
sbp.slice_from("u");
break;
case 5:
if (!r_R2())
return false;
sbp.slice_from("ente");
break;
case 6:
if (!r_RV())
return false;
sbp.slice_del();
break;
case 7:
if (!r_R1())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 4);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R2()) {
sbp.slice_del();
if (among_var == 1) {
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "at")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
}
}
}
break;
case 8:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_5, 3);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1)
if (r_R2())
sbp.slice_del();
}
break;
case 9:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "at")) {
sbp.bra = sbp.cursor;
if (r_R2()) {
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "ic")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
}
}
break;
}
return true;
}
function r_verb_suffix() {
var among_var, v_1;
if (sbp.cursor >= I_pV) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_7, 87);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1)
sbp.slice_del();
}
sbp.limit_backward = v_1;
}
}
function habr6() {
var v_1 = sbp.limit - sbp.cursor;
sbp.ket = sbp.cursor;
if (sbp.in_grouping_b(g_AEIO, 97, 242)) {
sbp.bra = sbp.cursor;
if (r_RV()) {
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "i")) {
sbp.bra = sbp.cursor;
if (r_RV()) {
sbp.slice_del();
return;
}
}
}
}
sbp.cursor = sbp.limit - v_1;
}
function r_vowel_suffix() {
habr6();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "h")) {
sbp.bra = sbp.cursor;
if (sbp.in_grouping_b(g_CG, 99, 103))
if (r_RV())
sbp.slice_del();
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_prelude();
sbp.cursor = v_1;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_attached_pronoun();
sbp.cursor = sbp.limit;
if (!r_standard_suffix()) {
sbp.cursor = sbp.limit;
r_verb_suffix();
}
sbp.cursor = sbp.limit;
r_vowel_suffix();
sbp.cursor = sbp.limit_backward;
r_postlude();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.it.stemmer, 'stemmer-it');
/* stop word filter function */
lunr.it.stopWordFilter = function(token) {
if (lunr.it.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.it.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.it.stopWordFilter.stopWords.length = 280;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.it.stopWordFilter.stopWords.elements = ' a abbia abbiamo abbiano abbiate ad agl agli ai al all alla alle allo anche avemmo avendo avesse avessero avessi avessimo aveste avesti avete aveva avevamo avevano avevate avevi avevo avrai avranno avrebbe avrebbero avrei avremmo avremo avreste avresti avrete avrà avrò avuta avute avuti avuto c che chi ci coi col come con contro cui da dagl dagli dai dal dall dalla dalle dallo degl degli dei del dell della delle dello di dov dove e ebbe ebbero ebbi ed era erano eravamo eravate eri ero essendo faccia facciamo facciano facciate faccio facemmo facendo facesse facessero facessi facessimo faceste facesti faceva facevamo facevano facevate facevi facevo fai fanno farai faranno farebbe farebbero farei faremmo faremo fareste faresti farete farà farò fece fecero feci fosse fossero fossi fossimo foste fosti fu fui fummo furono gli ha hai hanno ho i il in io l la le lei li lo loro lui ma mi mia mie miei mio ne negl negli nei nel nell nella nelle nello noi non nostra nostre nostri nostro o per perché più quale quanta quante quanti quanto quella quelle quelli quello questa queste questi questo sarai saranno sarebbe sarebbero sarei saremmo saremo sareste saresti sarete sarà sarò se sei si sia siamo siano siate siete sono sta stai stando stanno starai staranno starebbe starebbero starei staremmo staremo stareste staresti starete starà starò stava stavamo stavano stavate stavi stavo stemmo stesse stessero stessi stessimo steste stesti stette stettero stetti stia stiamo stiano stiate sto su sua sue sugl sugli sui sul sull sulla sulle sullo suo suoi ti tra tu tua tue tuo tuoi tutti tutto un una uno vi voi vostra vostre vostri vostro è'.split(' ');
lunr.Pipeline.registerFunction(lunr.it.stopWordFilter, 'stopWordFilter-it');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,120 @@
/*!
* Lunr languages, `Japanese` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Chad Liu
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.jp = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.jp.stopWordFilter,
lunr.jp.stemmer
);
// change the tokenizer for japanese one
lunr.tokenizer = lunr.jp.tokenizer;
};
var segmenter = new TinySegmenter(); // インスタンス生成
lunr.jp.tokenizer = function (obj) {
if (!arguments.length || obj == null || obj == undefined) return [];
if (Array.isArray(obj))
return obj.map(function (t) {
return t.toLowerCase();
});
var str = obj.toString().replace(/^\s+/, '');
for (var i = str.length - 1; i >= 0; i--) {
if (/\S/.test(str.charAt(i))) {
str = str.substring(0, i + 1);
break;
}
}
var segs = segmenter.segment(str); // 単語の配列が返る
return segs
.filter(function (token) {
return !!token;
})
.map(function (token) {
return token;
});
};
/* lunr stemmer function */
lunr.jp.stemmer = (function () {
/* TODO japanese stemmer */
return function (word) {
return word;
};
})();
lunr.Pipeline.registerFunction(lunr.jp.stemmer, 'stemmer-jp');
/* stop word filter function */
lunr.jp.stopWordFilter = function(token) {
if (lunr.jp.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.jp.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.jp.stopWordFilter.stopWords.length = 45;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
// stopword for japanese is from http://www.ranks.nl/stopwords/japanese
lunr.jp.stopWordFilter.stopWords.elements = ' これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし'.split(' ');
lunr.Pipeline.registerFunction(lunr.jp.stopWordFilter, 'stopWordFilter-jp');
};
}))

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");r.jp=function(){this.pipeline.reset(),this.pipeline.add(r.jp.stopWordFilter,r.jp.stemmer),r.tokenizer=r.jp.tokenizer};var n=new TinySegmenter;r.jp.tokenizer=function(e){if(!arguments.length||null==e)return[];if(Array.isArray(e))return e.map(function(e){return e.toLowerCase()});for(var r=e.toString().replace(/^\s+/,""),t=r.length-1;0<=t;t--)if(/\S/.test(r.charAt(t))){r=r.substring(0,t+1);break}return n.segment(r).filter(function(e){return!!e}).map(function(e){return e})},r.jp.stemmer=function(e){return e},r.Pipeline.registerFunction(r.jp.stemmer,"stemmer-jp"),r.jp.stopWordFilter=function(e){if(-1===r.jp.stopWordFilter.stopWords.indexOf(e))return e},r.jp.stopWordFilter.stopWords=new r.SortedSet,r.jp.stopWordFilter.stopWords.length=45,r.jp.stopWordFilter.stopWords.elements=" これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" "),r.Pipeline.registerFunction(r.jp.stopWordFilter,"stopWordFilter-jp")}});

@ -0,0 +1,253 @@
/*!
* Lunr languages, `Norwegian` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.no = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.no.trimmer,
lunr.no.stopWordFilter,
lunr.no.stemmer
);
};
/* lunr trimmer function */
lunr.no.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.no.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.no.wordCharacters);
lunr.Pipeline.registerFunction(lunr.no.trimmer, 'trimmer-no');
/* lunr stemmer function */
lunr.no.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function NorwegianStemmer() {
var a_0 = [new Among("a", -1, 1), new Among("e", -1, 1),
new Among("ede", 1, 1), new Among("ande", 1, 1),
new Among("ende", 1, 1), new Among("ane", 1, 1),
new Among("ene", 1, 1), new Among("hetene", 6, 1),
new Among("erte", 1, 3), new Among("en", -1, 1),
new Among("heten", 9, 1), new Among("ar", -1, 1),
new Among("er", -1, 1), new Among("heter", 12, 1),
new Among("s", -1, 2), new Among("as", 14, 1),
new Among("es", 14, 1), new Among("edes", 16, 1),
new Among("endes", 16, 1), new Among("enes", 16, 1),
new Among("hetenes", 19, 1), new Among("ens", 14, 1),
new Among("hetens", 21, 1), new Among("ers", 14, 1),
new Among("ets", 14, 1), new Among("et", -1, 1),
new Among("het", 25, 1), new Among("ert", -1, 3),
new Among("ast", -1, 1)
],
a_1 = [new Among("dt", -1, -1),
new Among("vt", -1, -1)
],
a_2 = [new Among("leg", -1, 1),
new Among("eleg", 0, 1), new Among("ig", -1, 1),
new Among("eig", 2, 1), new Among("lig", 2, 1),
new Among("elig", 4, 1), new Among("els", -1, 1),
new Among("lov", -1, 1), new Among("elov", 7, 1),
new Among("slov", 7, 1), new Among("hetslov", 9, 1)
],
g_v = [17,
65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128
],
g_s_ending = [
119, 125, 149, 1
],
I_x, I_p1, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function r_mark_regions() {
var v_1, c = sbp.cursor + 3;
I_p1 = sbp.limit;
if (0 <= c || c <= sbp.limit) {
I_x = c;
while (true) {
v_1 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 248)) {
sbp.cursor = v_1;
break;
}
if (v_1 >= sbp.limit)
return;
sbp.cursor = v_1 + 1;
}
while (!sbp.out_grouping(g_v, 97, 248)) {
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
I_p1 = sbp.cursor;
if (I_p1 < I_x)
I_p1 = I_x;
}
}
function r_main_suffix() {
var among_var, v_1, v_2;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_0, 29);
sbp.limit_backward = v_1;
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
v_2 = sbp.limit - sbp.cursor;
if (sbp.in_grouping_b(g_s_ending, 98, 122))
sbp.slice_del();
else {
sbp.cursor = sbp.limit - v_2;
if (sbp.eq_s_b(1, "k") && sbp.out_grouping_b(g_v, 97, 248))
sbp.slice_del();
}
break;
case 3:
sbp.slice_from("er");
break;
}
}
}
}
function r_consonant_pair() {
var v_1 = sbp.limit - sbp.cursor,
v_2;
if (sbp.cursor >= I_p1) {
v_2 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
if (sbp.find_among_b(a_1, 2)) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_2;
sbp.cursor = sbp.limit - v_1;
if (sbp.cursor > sbp.limit_backward) {
sbp.cursor--;
sbp.bra = sbp.cursor;
sbp.slice_del();
}
} else
sbp.limit_backward = v_2;
}
}
function r_other_suffix() {
var among_var, v_1;
if (sbp.cursor >= I_p1) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_2, 11);
if (among_var) {
sbp.bra = sbp.cursor;
sbp.limit_backward = v_1;
if (among_var == 1)
sbp.slice_del();
} else
sbp.limit_backward = v_1;
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_main_suffix();
sbp.cursor = sbp.limit;
r_consonant_pair();
sbp.cursor = sbp.limit;
r_other_suffix();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.no.stemmer, 'stemmer-no');
/* stop word filter function */
lunr.no.stopWordFilter = function(token) {
if (lunr.no.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.no.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.no.stopWordFilter.stopWords.length = 177;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.no.stopWordFilter.stopWords.elements = ' alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å'.split(' ');
lunr.Pipeline.registerFunction(lunr.no.stopWordFilter, 'stopWordFilter-no');
};
}))

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,n,i;r.no=function(){this.pipeline.reset(),this.pipeline.add(r.no.trimmer,r.no.stopWordFilter,r.no.stemmer)},r.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",r.no.trimmer=r.trimmerSupport.generateTrimmer(r.no.wordCharacters),r.Pipeline.registerFunction(r.no.trimmer,"trimmer-no"),r.no.stemmer=(e=r.stemmerSupport.Among,n=r.stemmerSupport.SnowballProgram,i=new function(){var i,t,o=[new e("a",-1,1),new e("e",-1,1),new e("ede",1,1),new e("ande",1,1),new e("ende",1,1),new e("ane",1,1),new e("ene",1,1),new e("hetene",6,1),new e("erte",1,3),new e("en",-1,1),new e("heten",9,1),new e("ar",-1,1),new e("er",-1,1),new e("heter",12,1),new e("s",-1,2),new e("as",14,1),new e("es",14,1),new e("edes",16,1),new e("endes",16,1),new e("enes",16,1),new e("hetenes",19,1),new e("ens",14,1),new e("hetens",21,1),new e("ers",14,1),new e("ets",14,1),new e("et",-1,1),new e("het",25,1),new e("ert",-1,3),new e("ast",-1,1)],s=[new e("dt",-1,-1),new e("vt",-1,-1)],m=[new e("leg",-1,1),new e("eleg",0,1),new e("ig",-1,1),new e("eig",2,1),new e("lig",2,1),new e("elig",4,1),new e("els",-1,1),new e("lov",-1,1),new e("elov",7,1),new e("slov",7,1),new e("hetslov",9,1)],a=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],l=[119,125,149,1],d=new n;this.setCurrent=function(e){d.setCurrent(e)},this.getCurrent=function(){return d.getCurrent()},this.stem=function(){var e,r,n=d.cursor;if(function(){var e,r=d.cursor+3;if(t=d.limit,0<=r||r<=d.limit){for(i=r;;){if(e=d.cursor,d.in_grouping(a,97,248)){d.cursor=e;break}if(e>=d.limit)return;d.cursor=e+1}for(;!d.out_grouping(a,97,248);){if(d.cursor>=d.limit)return;d.cursor++}(t=d.cursor)<i&&(t=i)}}(),d.limit_backward=n,d.cursor=d.limit,d.cursor>=t&&(n=d.limit_backward,d.limit_backward=t,d.ket=d.cursor,r=d.find_among_b(o,29),d.limit_backward=n,r))switch(d.bra=d.cursor,r){case 1:d.slice_del();break;case 2:e=d.limit-d.cursor,(d.in_grouping_b(l,98,122)||(d.cursor=d.limit-e,d.eq_s_b(1,"k")&&d.out_grouping_b(a,97,248)))&&d.slice_del();break;case 3:d.slice_from("er")}return d.cursor=d.limit,n=d.limit-d.cursor,d.cursor>=t&&(r=d.limit_backward,d.limit_backward=t,d.ket=d.cursor,d.find_among_b(s,2)?(d.bra=d.cursor,d.limit_backward=r,d.cursor=d.limit-n,d.cursor>d.limit_backward&&(d.cursor--,d.bra=d.cursor,d.slice_del())):d.limit_backward=r),d.cursor=d.limit,d.cursor>=t&&(n=d.limit_backward,d.limit_backward=t,d.ket=d.cursor,(r=d.find_among_b(m,11))?(d.bra=d.cursor,d.limit_backward=n,1==r&&d.slice_del()):d.limit_backward=n),!0}},function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}),r.Pipeline.registerFunction(r.no.stemmer,"stemmer-no"),r.no.stopWordFilter=function(e){if(-1===r.no.stopWordFilter.stopWords.indexOf(e))return e},r.no.stopWordFilter.stopWords=new r.SortedSet,r.no.stopWordFilter.stopWords.length=177,r.no.stopWordFilter.stopWords.elements=" alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" "),r.Pipeline.registerFunction(r.no.stopWordFilter,"stopWordFilter-no")}});

@ -0,0 +1,566 @@
/*!
* Lunr languages, `Portuguese` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.pt = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.pt.trimmer,
lunr.pt.stopWordFilter,
lunr.pt.stemmer
);
};
/* lunr trimmer function */
lunr.pt.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.pt.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.pt.wordCharacters);
lunr.Pipeline.registerFunction(lunr.pt.trimmer, 'trimmer-pt');
/* lunr stemmer function */
lunr.pt.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function PortugueseStemmer() {
var a_0 = [new Among("", -1, 3), new Among("\u00E3", 0, 1),
new Among("\u00F5", 0, 2)
],
a_1 = [new Among("", -1, 3),
new Among("a~", 0, 1), new Among("o~", 0, 2)
],
a_2 = [
new Among("ic", -1, -1), new Among("ad", -1, -1),
new Among("os", -1, -1), new Among("iv", -1, 1)
],
a_3 = [
new Among("ante", -1, 1), new Among("avel", -1, 1),
new Among("\u00EDvel", -1, 1)
],
a_4 = [new Among("ic", -1, 1),
new Among("abil", -1, 1), new Among("iv", -1, 1)
],
a_5 = [
new Among("ica", -1, 1), new Among("\u00E2ncia", -1, 1),
new Among("\u00EAncia", -1, 4), new Among("ira", -1, 9),
new Among("adora", -1, 1), new Among("osa", -1, 1),
new Among("ista", -1, 1), new Among("iva", -1, 8),
new Among("eza", -1, 1), new Among("log\u00EDa", -1, 2),
new Among("idade", -1, 7), new Among("ante", -1, 1),
new Among("mente", -1, 6), new Among("amente", 12, 5),
new Among("\u00E1vel", -1, 1), new Among("\u00EDvel", -1, 1),
new Among("uci\u00F3n", -1, 3), new Among("ico", -1, 1),
new Among("ismo", -1, 1), new Among("oso", -1, 1),
new Among("amento", -1, 1), new Among("imento", -1, 1),
new Among("ivo", -1, 8), new Among("a\u00E7a~o", -1, 1),
new Among("ador", -1, 1), new Among("icas", -1, 1),
new Among("\u00EAncias", -1, 4), new Among("iras", -1, 9),
new Among("adoras", -1, 1), new Among("osas", -1, 1),
new Among("istas", -1, 1), new Among("ivas", -1, 8),
new Among("ezas", -1, 1), new Among("log\u00EDas", -1, 2),
new Among("idades", -1, 7), new Among("uciones", -1, 3),
new Among("adores", -1, 1), new Among("antes", -1, 1),
new Among("a\u00E7o~es", -1, 1), new Among("icos", -1, 1),
new Among("ismos", -1, 1), new Among("osos", -1, 1),
new Among("amentos", -1, 1), new Among("imentos", -1, 1),
new Among("ivos", -1, 8)
],
a_6 = [new Among("ada", -1, 1),
new Among("ida", -1, 1), new Among("ia", -1, 1),
new Among("aria", 2, 1), new Among("eria", 2, 1),
new Among("iria", 2, 1), new Among("ara", -1, 1),
new Among("era", -1, 1), new Among("ira", -1, 1),
new Among("ava", -1, 1), new Among("asse", -1, 1),
new Among("esse", -1, 1), new Among("isse", -1, 1),
new Among("aste", -1, 1), new Among("este", -1, 1),
new Among("iste", -1, 1), new Among("ei", -1, 1),
new Among("arei", 16, 1), new Among("erei", 16, 1),
new Among("irei", 16, 1), new Among("am", -1, 1),
new Among("iam", 20, 1), new Among("ariam", 21, 1),
new Among("eriam", 21, 1), new Among("iriam", 21, 1),
new Among("aram", 20, 1), new Among("eram", 20, 1),
new Among("iram", 20, 1), new Among("avam", 20, 1),
new Among("em", -1, 1), new Among("arem", 29, 1),
new Among("erem", 29, 1), new Among("irem", 29, 1),
new Among("assem", 29, 1), new Among("essem", 29, 1),
new Among("issem", 29, 1), new Among("ado", -1, 1),
new Among("ido", -1, 1), new Among("ando", -1, 1),
new Among("endo", -1, 1), new Among("indo", -1, 1),
new Among("ara~o", -1, 1), new Among("era~o", -1, 1),
new Among("ira~o", -1, 1), new Among("ar", -1, 1),
new Among("er", -1, 1), new Among("ir", -1, 1),
new Among("as", -1, 1), new Among("adas", 47, 1),
new Among("idas", 47, 1), new Among("ias", 47, 1),
new Among("arias", 50, 1), new Among("erias", 50, 1),
new Among("irias", 50, 1), new Among("aras", 47, 1),
new Among("eras", 47, 1), new Among("iras", 47, 1),
new Among("avas", 47, 1), new Among("es", -1, 1),
new Among("ardes", 58, 1), new Among("erdes", 58, 1),
new Among("irdes", 58, 1), new Among("ares", 58, 1),
new Among("eres", 58, 1), new Among("ires", 58, 1),
new Among("asses", 58, 1), new Among("esses", 58, 1),
new Among("isses", 58, 1), new Among("astes", 58, 1),
new Among("estes", 58, 1), new Among("istes", 58, 1),
new Among("is", -1, 1), new Among("ais", 71, 1),
new Among("eis", 71, 1), new Among("areis", 73, 1),
new Among("ereis", 73, 1), new Among("ireis", 73, 1),
new Among("\u00E1reis", 73, 1), new Among("\u00E9reis", 73, 1),
new Among("\u00EDreis", 73, 1), new Among("\u00E1sseis", 73, 1),
new Among("\u00E9sseis", 73, 1), new Among("\u00EDsseis", 73, 1),
new Among("\u00E1veis", 73, 1), new Among("\u00EDeis", 73, 1),
new Among("ar\u00EDeis", 84, 1), new Among("er\u00EDeis", 84, 1),
new Among("ir\u00EDeis", 84, 1), new Among("ados", -1, 1),
new Among("idos", -1, 1), new Among("amos", -1, 1),
new Among("\u00E1ramos", 90, 1), new Among("\u00E9ramos", 90, 1),
new Among("\u00EDramos", 90, 1), new Among("\u00E1vamos", 90, 1),
new Among("\u00EDamos", 90, 1), new Among("ar\u00EDamos", 95, 1),
new Among("er\u00EDamos", 95, 1), new Among("ir\u00EDamos", 95, 1),
new Among("emos", -1, 1), new Among("aremos", 99, 1),
new Among("eremos", 99, 1), new Among("iremos", 99, 1),
new Among("\u00E1ssemos", 99, 1), new Among("\u00EAssemos", 99, 1),
new Among("\u00EDssemos", 99, 1), new Among("imos", -1, 1),
new Among("armos", -1, 1), new Among("ermos", -1, 1),
new Among("irmos", -1, 1), new Among("\u00E1mos", -1, 1),
new Among("ar\u00E1s", -1, 1), new Among("er\u00E1s", -1, 1),
new Among("ir\u00E1s", -1, 1), new Among("eu", -1, 1),
new Among("iu", -1, 1), new Among("ou", -1, 1),
new Among("ar\u00E1", -1, 1), new Among("er\u00E1", -1, 1),
new Among("ir\u00E1", -1, 1)
],
a_7 = [new Among("a", -1, 1),
new Among("i", -1, 1), new Among("o", -1, 1),
new Among("os", -1, 1), new Among("\u00E1", -1, 1),
new Among("\u00ED", -1, 1), new Among("\u00F3", -1, 1)
],
a_8 = [
new Among("e", -1, 1), new Among("\u00E7", -1, 2),
new Among("\u00E9", -1, 1), new Among("\u00EA", -1, 1)
],
g_v = [17,
65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2
],
I_p2, I_p1, I_pV, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function r_prelude() {
var among_var;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_0, 3);
if (among_var) {
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("a~");
continue;
case 2:
sbp.slice_from("o~");
continue;
case 3:
if (sbp.cursor >= sbp.limit)
break;
sbp.cursor++;
continue;
}
}
break;
}
}
function habr2() {
if (sbp.out_grouping(g_v, 97, 250)) {
while (!sbp.in_grouping(g_v, 97, 250)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
return false;
}
return true;
}
function habr3() {
if (sbp.in_grouping(g_v, 97, 250)) {
while (!sbp.out_grouping(g_v, 97, 250)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
}
I_pV = sbp.cursor;
return true;
}
function habr4() {
var v_1 = sbp.cursor,
v_2, v_3;
if (sbp.in_grouping(g_v, 97, 250)) {
v_2 = sbp.cursor;
if (habr2()) {
sbp.cursor = v_2;
if (habr3())
return;
} else
I_pV = sbp.cursor;
}
sbp.cursor = v_1;
if (sbp.out_grouping(g_v, 97, 250)) {
v_3 = sbp.cursor;
if (habr2()) {
sbp.cursor = v_3;
if (!sbp.in_grouping(g_v, 97, 250) || sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
I_pV = sbp.cursor;
}
}
function habr5() {
while (!sbp.in_grouping(g_v, 97, 250)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 250)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
return true;
}
function r_mark_regions() {
var v_1 = sbp.cursor;
I_pV = sbp.limit;
I_p1 = I_pV;
I_p2 = I_pV;
habr4();
sbp.cursor = v_1;
if (habr5()) {
I_p1 = sbp.cursor;
if (habr5())
I_p2 = sbp.cursor;
}
}
function r_postlude() {
var among_var;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_1, 3);
if (among_var) {
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("\u00E3");
continue;
case 2:
sbp.slice_from("\u00F5");
continue;
case 3:
if (sbp.cursor >= sbp.limit)
break;
sbp.cursor++;
continue;
}
}
break;
}
}
function r_RV() {
return I_pV <= sbp.cursor;
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_standard_suffix() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_5, 45);
if (!among_var)
return false;
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (!r_R2())
return false;
sbp.slice_del();
break;
case 2:
if (!r_R2())
return false;
sbp.slice_from("log");
break;
case 3:
if (!r_R2())
return false;
sbp.slice_from("u");
break;
case 4:
if (!r_R2())
return false;
sbp.slice_from("ente");
break;
case 5:
if (!r_R1())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_2, 4);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R2()) {
sbp.slice_del();
if (among_var == 1) {
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "at")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
}
}
}
break;
case 6:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 3);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1)
if (r_R2())
sbp.slice_del();
}
break;
case 7:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 3);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1)
if (r_R2())
sbp.slice_del();
}
break;
case 8:
if (!r_R2())
return false;
sbp.slice_del();
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(2, "at")) {
sbp.bra = sbp.cursor;
if (r_R2())
sbp.slice_del();
}
break;
case 9:
if (!r_RV() || !sbp.eq_s_b(1, "e"))
return false;
sbp.slice_from("ir");
break;
}
return true;
}
function r_verb_suffix() {
var among_var, v_1;
if (sbp.cursor >= I_pV) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_6, 120);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1)
sbp.slice_del();
sbp.limit_backward = v_1;
return true;
}
sbp.limit_backward = v_1;
}
return false;
}
function r_residual_suffix() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_7, 7);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1)
if (r_RV())
sbp.slice_del();
}
}
function habr6(c1, c2) {
if (sbp.eq_s_b(1, c1)) {
sbp.bra = sbp.cursor;
var v_1 = sbp.limit - sbp.cursor;
if (sbp.eq_s_b(1, c2)) {
sbp.cursor = sbp.limit - v_1;
if (r_RV())
sbp.slice_del();
return false;
}
}
return true;
}
function r_residual_form() {
var among_var, v_1, v_2, v_3;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_8, 4);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
if (r_RV()) {
sbp.slice_del();
sbp.ket = sbp.cursor;
v_1 = sbp.limit - sbp.cursor;
if (habr6("u", "g"))
habr6("i", "c")
}
break;
case 2:
sbp.slice_from("c");
break;
}
}
}
function habr1() {
if (!r_standard_suffix()) {
sbp.cursor = sbp.limit;
if (!r_verb_suffix()) {
sbp.cursor = sbp.limit;
r_residual_suffix();
return;
}
}
sbp.cursor = sbp.limit;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "i")) {
sbp.bra = sbp.cursor;
if (sbp.eq_s_b(1, "c")) {
sbp.cursor = sbp.limit;
if (r_RV())
sbp.slice_del();
}
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_prelude();
sbp.cursor = v_1;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
habr1();
sbp.cursor = sbp.limit;
r_residual_form();
sbp.cursor = sbp.limit_backward;
r_postlude();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.pt.stemmer, 'stemmer-pt');
/* stop word filter function */
lunr.pt.stopWordFilter = function(token) {
if (lunr.pt.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.pt.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.pt.stopWordFilter.stopWords.length = 204;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.pt.stopWordFilter.stopWords.elements = ' a ao aos aquela aquelas aquele aqueles aquilo as até com como da das de dela delas dele deles depois do dos e ela elas ele eles em entre era eram essa essas esse esses esta estamos estas estava estavam este esteja estejam estejamos estes esteve estive estivemos estiver estivera estiveram estiverem estivermos estivesse estivessem estivéramos estivéssemos estou está estávamos estão eu foi fomos for fora foram forem formos fosse fossem fui fôramos fôssemos haja hajam hajamos havemos hei houve houvemos houver houvera houveram houverei houverem houveremos houveria houveriam houvermos houverá houverão houveríamos houvesse houvessem houvéramos houvéssemos há hão isso isto já lhe lhes mais mas me mesmo meu meus minha minhas muito na nas nem no nos nossa nossas nosso nossos num numa não nós o os ou para pela pelas pelo pelos por qual quando que quem se seja sejam sejamos sem serei seremos seria seriam será serão seríamos seu seus somos sou sua suas são só também te tem temos tenha tenham tenhamos tenho terei teremos teria teriam terá terão teríamos teu teus teve tinha tinham tive tivemos tiver tivera tiveram tiverem tivermos tivesse tivessem tivéramos tivéssemos tu tua tuas tém tínhamos um uma você vocês vos à às éramos'.split(' ');
lunr.Pipeline.registerFunction(lunr.pt.stopWordFilter, 'stopWordFilter-pt');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,554 @@
/*!
* Lunr languages, `Romanian` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.ro = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.ro.trimmer,
lunr.ro.stopWordFilter,
lunr.ro.stemmer
);
};
/* lunr trimmer function */
lunr.ro.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.ro.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.ro.wordCharacters);
lunr.Pipeline.registerFunction(lunr.ro.trimmer, 'trimmer-ro');
/* lunr stemmer function */
lunr.ro.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function RomanianStemmer() {
var a_0 = [new Among("", -1, 3), new Among("I", 0, 1), new Among("U", 0, 2)],
a_1 = [
new Among("ea", -1, 3), new Among("a\u0163ia", -1, 7),
new Among("aua", -1, 2), new Among("iua", -1, 4),
new Among("a\u0163ie", -1, 7), new Among("ele", -1, 3),
new Among("ile", -1, 5), new Among("iile", 6, 4),
new Among("iei", -1, 4), new Among("atei", -1, 6),
new Among("ii", -1, 4), new Among("ului", -1, 1),
new Among("ul", -1, 1), new Among("elor", -1, 3),
new Among("ilor", -1, 4), new Among("iilor", 14, 4)
],
a_2 = [
new Among("icala", -1, 4), new Among("iciva", -1, 4),
new Among("ativa", -1, 5), new Among("itiva", -1, 6),
new Among("icale", -1, 4), new Among("a\u0163iune", -1, 5),
new Among("i\u0163iune", -1, 6), new Among("atoare", -1, 5),
new Among("itoare", -1, 6), new Among("\u0103toare", -1, 5),
new Among("icitate", -1, 4), new Among("abilitate", -1, 1),
new Among("ibilitate", -1, 2), new Among("ivitate", -1, 3),
new Among("icive", -1, 4), new Among("ative", -1, 5),
new Among("itive", -1, 6), new Among("icali", -1, 4),
new Among("atori", -1, 5), new Among("icatori", 18, 4),
new Among("itori", -1, 6), new Among("\u0103tori", -1, 5),
new Among("icitati", -1, 4), new Among("abilitati", -1, 1),
new Among("ivitati", -1, 3), new Among("icivi", -1, 4),
new Among("ativi", -1, 5), new Among("itivi", -1, 6),
new Among("icit\u0103i", -1, 4), new Among("abilit\u0103i", -1, 1),
new Among("ivit\u0103i", -1, 3),
new Among("icit\u0103\u0163i", -1, 4),
new Among("abilit\u0103\u0163i", -1, 1),
new Among("ivit\u0103\u0163i", -1, 3), new Among("ical", -1, 4),
new Among("ator", -1, 5), new Among("icator", 35, 4),
new Among("itor", -1, 6), new Among("\u0103tor", -1, 5),
new Among("iciv", -1, 4), new Among("ativ", -1, 5),
new Among("itiv", -1, 6), new Among("ical\u0103", -1, 4),
new Among("iciv\u0103", -1, 4), new Among("ativ\u0103", -1, 5),
new Among("itiv\u0103", -1, 6)
],
a_3 = [new Among("ica", -1, 1),
new Among("abila", -1, 1), new Among("ibila", -1, 1),
new Among("oasa", -1, 1), new Among("ata", -1, 1),
new Among("ita", -1, 1), new Among("anta", -1, 1),
new Among("ista", -1, 3), new Among("uta", -1, 1),
new Among("iva", -1, 1), new Among("ic", -1, 1),
new Among("ice", -1, 1), new Among("abile", -1, 1),
new Among("ibile", -1, 1), new Among("isme", -1, 3),
new Among("iune", -1, 2), new Among("oase", -1, 1),
new Among("ate", -1, 1), new Among("itate", 17, 1),
new Among("ite", -1, 1), new Among("ante", -1, 1),
new Among("iste", -1, 3), new Among("ute", -1, 1),
new Among("ive", -1, 1), new Among("ici", -1, 1),
new Among("abili", -1, 1), new Among("ibili", -1, 1),
new Among("iuni", -1, 2), new Among("atori", -1, 1),
new Among("osi", -1, 1), new Among("ati", -1, 1),
new Among("itati", 30, 1), new Among("iti", -1, 1),
new Among("anti", -1, 1), new Among("isti", -1, 3),
new Among("uti", -1, 1), new Among("i\u015Fti", -1, 3),
new Among("ivi", -1, 1), new Among("it\u0103i", -1, 1),
new Among("o\u015Fi", -1, 1), new Among("it\u0103\u0163i", -1, 1),
new Among("abil", -1, 1), new Among("ibil", -1, 1),
new Among("ism", -1, 3), new Among("ator", -1, 1),
new Among("os", -1, 1), new Among("at", -1, 1),
new Among("it", -1, 1), new Among("ant", -1, 1),
new Among("ist", -1, 3), new Among("ut", -1, 1),
new Among("iv", -1, 1), new Among("ic\u0103", -1, 1),
new Among("abil\u0103", -1, 1), new Among("ibil\u0103", -1, 1),
new Among("oas\u0103", -1, 1), new Among("at\u0103", -1, 1),
new Among("it\u0103", -1, 1), new Among("ant\u0103", -1, 1),
new Among("ist\u0103", -1, 3), new Among("ut\u0103", -1, 1),
new Among("iv\u0103", -1, 1)
],
a_4 = [new Among("ea", -1, 1),
new Among("ia", -1, 1), new Among("esc", -1, 1),
new Among("\u0103sc", -1, 1), new Among("ind", -1, 1),
new Among("\u00E2nd", -1, 1), new Among("are", -1, 1),
new Among("ere", -1, 1), new Among("ire", -1, 1),
new Among("\u00E2re", -1, 1), new Among("se", -1, 2),
new Among("ase", 10, 1), new Among("sese", 10, 2),
new Among("ise", 10, 1), new Among("use", 10, 1),
new Among("\u00E2se", 10, 1), new Among("e\u015Fte", -1, 1),
new Among("\u0103\u015Fte", -1, 1), new Among("eze", -1, 1),
new Among("ai", -1, 1), new Among("eai", 19, 1),
new Among("iai", 19, 1), new Among("sei", -1, 2),
new Among("e\u015Fti", -1, 1), new Among("\u0103\u015Fti", -1, 1),
new Among("ui", -1, 1), new Among("ezi", -1, 1),
new Among("\u00E2i", -1, 1), new Among("a\u015Fi", -1, 1),
new Among("se\u015Fi", -1, 2), new Among("ase\u015Fi", 29, 1),
new Among("sese\u015Fi", 29, 2), new Among("ise\u015Fi", 29, 1),
new Among("use\u015Fi", 29, 1),
new Among("\u00E2se\u015Fi", 29, 1), new Among("i\u015Fi", -1, 1),
new Among("u\u015Fi", -1, 1), new Among("\u00E2\u015Fi", -1, 1),
new Among("a\u0163i", -1, 2), new Among("ea\u0163i", 38, 1),
new Among("ia\u0163i", 38, 1), new Among("e\u0163i", -1, 2),
new Among("i\u0163i", -1, 2), new Among("\u00E2\u0163i", -1, 2),
new Among("ar\u0103\u0163i", -1, 1),
new Among("ser\u0103\u0163i", -1, 2),
new Among("aser\u0103\u0163i", 45, 1),
new Among("seser\u0103\u0163i", 45, 2),
new Among("iser\u0103\u0163i", 45, 1),
new Among("user\u0103\u0163i", 45, 1),
new Among("\u00E2ser\u0103\u0163i", 45, 1),
new Among("ir\u0103\u0163i", -1, 1),
new Among("ur\u0103\u0163i", -1, 1),
new Among("\u00E2r\u0103\u0163i", -1, 1), new Among("am", -1, 1),
new Among("eam", 54, 1), new Among("iam", 54, 1),
new Among("em", -1, 2), new Among("asem", 57, 1),
new Among("sesem", 57, 2), new Among("isem", 57, 1),
new Among("usem", 57, 1), new Among("\u00E2sem", 57, 1),
new Among("im", -1, 2), new Among("\u00E2m", -1, 2),
new Among("\u0103m", -1, 2), new Among("ar\u0103m", 65, 1),
new Among("ser\u0103m", 65, 2), new Among("aser\u0103m", 67, 1),
new Among("seser\u0103m", 67, 2), new Among("iser\u0103m", 67, 1),
new Among("user\u0103m", 67, 1),
new Among("\u00E2ser\u0103m", 67, 1),
new Among("ir\u0103m", 65, 1), new Among("ur\u0103m", 65, 1),
new Among("\u00E2r\u0103m", 65, 1), new Among("au", -1, 1),
new Among("eau", 76, 1), new Among("iau", 76, 1),
new Among("indu", -1, 1), new Among("\u00E2ndu", -1, 1),
new Among("ez", -1, 1), new Among("easc\u0103", -1, 1),
new Among("ar\u0103", -1, 1), new Among("ser\u0103", -1, 2),
new Among("aser\u0103", 84, 1), new Among("seser\u0103", 84, 2),
new Among("iser\u0103", 84, 1), new Among("user\u0103", 84, 1),
new Among("\u00E2ser\u0103", 84, 1), new Among("ir\u0103", -1, 1),
new Among("ur\u0103", -1, 1), new Among("\u00E2r\u0103", -1, 1),
new Among("eaz\u0103", -1, 1)
],
a_5 = [new Among("a", -1, 1),
new Among("e", -1, 1), new Among("ie", 1, 1),
new Among("i", -1, 1), new Among("\u0103", -1, 1)
],
g_v = [17, 65,
16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 32, 0, 0, 4
],
B_standard_suffix_removed, I_p2, I_p1, I_pV, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function habr1(c1, c2) {
if (sbp.eq_s(1, c1)) {
sbp.ket = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 259))
sbp.slice_from(c2);
}
}
function r_prelude() {
var v_1, v_2;
while (true) {
v_1 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 259)) {
v_2 = sbp.cursor;
sbp.bra = v_2;
habr1("u", "U");
sbp.cursor = v_2;
habr1("i", "I");
}
sbp.cursor = v_1;
if (sbp.cursor >= sbp.limit) {
break;
}
sbp.cursor++;
}
}
function habr2() {
if (sbp.out_grouping(g_v, 97, 259)) {
while (!sbp.in_grouping(g_v, 97, 259)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
return false;
}
return true;
}
function habr3() {
if (sbp.in_grouping(g_v, 97, 259)) {
while (!sbp.out_grouping(g_v, 97, 259)) {
if (sbp.cursor >= sbp.limit)
return true;
sbp.cursor++;
}
}
return false;
}
function habr4() {
var v_1 = sbp.cursor,
v_2, v_3;
if (sbp.in_grouping(g_v, 97, 259)) {
v_2 = sbp.cursor;
if (habr2()) {
sbp.cursor = v_2;
if (!habr3()) {
I_pV = sbp.cursor;
return;
}
} else {
I_pV = sbp.cursor;
return;
}
}
sbp.cursor = v_1;
if (sbp.out_grouping(g_v, 97, 259)) {
v_3 = sbp.cursor;
if (habr2()) {
sbp.cursor = v_3;
if (sbp.in_grouping(g_v, 97, 259) && sbp.cursor < sbp.limit)
sbp.cursor++;
}
I_pV = sbp.cursor;
}
}
function habr5() {
while (!sbp.in_grouping(g_v, 97, 259)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 259)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
return true;
}
function r_mark_regions() {
var v_1 = sbp.cursor;
I_pV = sbp.limit;
I_p1 = I_pV;
I_p2 = I_pV;
habr4();
sbp.cursor = v_1;
if (habr5()) {
I_p1 = sbp.cursor;
if (habr5())
I_p2 = sbp.cursor;
}
}
function r_postlude() {
var among_var;
while (true) {
sbp.bra = sbp.cursor;
among_var = sbp.find_among(a_0, 3);
if (among_var) {
sbp.ket = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_from("i");
continue;
case 2:
sbp.slice_from("u");
continue;
case 3:
if (sbp.cursor >= sbp.limit)
break;
sbp.cursor++;
continue;
}
}
break;
}
}
function r_RV() {
return I_pV <= sbp.cursor;
}
function r_R1() {
return I_p1 <= sbp.cursor;
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function r_step_0() {
var among_var, v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_1, 16);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
sbp.slice_from("a");
break;
case 3:
sbp.slice_from("e");
break;
case 4:
sbp.slice_from("i");
break;
case 5:
v_1 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(2, "ab")) {
sbp.cursor = sbp.limit - v_1;
sbp.slice_from("i");
}
break;
case 6:
sbp.slice_from("at");
break;
case 7:
sbp.slice_from("a\u0163i");
break;
}
}
}
}
function r_combo_suffix() {
var among_var, v_1 = sbp.limit - sbp.cursor;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_2, 46);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R1()) {
switch (among_var) {
case 1:
sbp.slice_from("abil");
break;
case 2:
sbp.slice_from("ibil");
break;
case 3:
sbp.slice_from("iv");
break;
case 4:
sbp.slice_from("ic");
break;
case 5:
sbp.slice_from("at");
break;
case 6:
sbp.slice_from("it");
break;
}
B_standard_suffix_removed = true;
sbp.cursor = sbp.limit - v_1;
return true;
}
}
return false;
}
function r_standard_suffix() {
var among_var, v_1;
B_standard_suffix_removed = false;
while (true) {
v_1 = sbp.limit - sbp.cursor;
if (!r_combo_suffix()) {
sbp.cursor = sbp.limit - v_1;
break;
}
}
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_3, 62);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R2()) {
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
if (sbp.eq_s_b(1, "\u0163")) {
sbp.bra = sbp.cursor;
sbp.slice_from("t");
}
break;
case 3:
sbp.slice_from("ist");
break;
}
B_standard_suffix_removed = true;
}
}
}
function r_verb_suffix() {
var among_var, v_1, v_2;
if (sbp.cursor >= I_pV) {
v_1 = sbp.limit_backward;
sbp.limit_backward = I_pV;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_4, 94);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
v_2 = sbp.limit - sbp.cursor;
if (!sbp.out_grouping_b(g_v, 97, 259)) {
sbp.cursor = sbp.limit - v_2;
if (!sbp.eq_s_b(1, "u"))
break;
}
case 2:
sbp.slice_del();
break;
}
}
sbp.limit_backward = v_1;
}
}
function r_vowel_suffix() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_5, 5);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_RV() && among_var == 1)
sbp.slice_del();
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_prelude();
sbp.cursor = v_1;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_step_0();
sbp.cursor = sbp.limit;
r_standard_suffix();
sbp.cursor = sbp.limit;
if (!B_standard_suffix_removed) {
sbp.cursor = sbp.limit;
r_verb_suffix();
sbp.cursor = sbp.limit;
}
r_vowel_suffix();
sbp.cursor = sbp.limit_backward;
r_postlude();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.ro.stemmer, 'stemmer-ro');
/* stop word filter function */
lunr.ro.stopWordFilter = function(token) {
if (lunr.ro.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.ro.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.ro.stopWordFilter.stopWords.length = 282;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.ro.stopWordFilter.stopWords.elements = ' acea aceasta această aceea acei aceia acel acela acele acelea acest acesta aceste acestea aceşti aceştia acolo acord acum ai aia aibă aici al ale alea altceva altcineva am ar are asemenea asta astea astăzi asupra au avea avem aveţi azi aş aşadar aţi bine bucur bună ca care caut ce cel ceva chiar cinci cine cineva contra cu cum cumva curând curînd când cât câte câtva câţi cînd cît cîte cîtva cîţi că căci cărei căror cărui către da dacă dar datorită dată dau de deci deja deoarece departe deşi din dinaintea dintr- dintre doi doilea două drept după dă ea ei el ele eram este eu eşti face fata fi fie fiecare fii fim fiu fiţi frumos fără graţie halbă iar ieri la le li lor lui lângă lîngă mai mea mei mele mereu meu mi mie mine mult multă mulţi mulţumesc mâine mîine mă ne nevoie nici nicăieri nimeni nimeri nimic nişte noastre noastră noi noroc nostru nouă noştri nu opt ori oricare orice oricine oricum oricând oricât oricînd oricît oriunde patra patru patrulea pe pentru peste pic poate pot prea prima primul prin puţin puţina puţină până pînă rog sa sale sau se spate spre sub sunt suntem sunteţi sută sînt sîntem sînteţi să săi său ta tale te timp tine toate toată tot totuşi toţi trei treia treilea tu tăi tău un una unde undeva unei uneia unele uneori unii unor unora unu unui unuia unul vi voastre voastră voi vostru vouă voştri vreme vreo vreun vă zece zero zi zice îi îl îmi împotriva în înainte înaintea încotro încât încît între întrucât întrucît îţi ăla ălea ăsta ăstea ăştia şapte şase şi ştiu ţi ţie'.split(' ');
lunr.Pipeline.registerFunction(lunr.ro.stopWordFilter, 'stopWordFilter-ro');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,387 @@
/*!
* Lunr languages, `Russian` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.ru = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.ru.trimmer,
lunr.ru.stopWordFilter,
lunr.ru.stemmer
);
};
/* lunr trimmer function */
lunr.ru.wordCharacters = "\u0400-\u0484\u0487-\u052F\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F";
lunr.ru.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.ru.wordCharacters);
lunr.Pipeline.registerFunction(lunr.ru.trimmer, 'trimmer-ru');
/* lunr stemmer function */
lunr.ru.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function RussianStemmer() {
var a_0 = [new Among("\u0432", -1, 1), new Among("\u0438\u0432", 0, 2),
new Among("\u044B\u0432", 0, 2),
new Among("\u0432\u0448\u0438", -1, 1),
new Among("\u0438\u0432\u0448\u0438", 3, 2),
new Among("\u044B\u0432\u0448\u0438", 3, 2),
new Among("\u0432\u0448\u0438\u0441\u044C", -1, 1),
new Among("\u0438\u0432\u0448\u0438\u0441\u044C", 6, 2),
new Among("\u044B\u0432\u0448\u0438\u0441\u044C", 6, 2)
],
a_1 = [
new Among("\u0435\u0435", -1, 1), new Among("\u0438\u0435", -1, 1),
new Among("\u043E\u0435", -1, 1), new Among("\u044B\u0435", -1, 1),
new Among("\u0438\u043C\u0438", -1, 1),
new Among("\u044B\u043C\u0438", -1, 1),
new Among("\u0435\u0439", -1, 1), new Among("\u0438\u0439", -1, 1),
new Among("\u043E\u0439", -1, 1), new Among("\u044B\u0439", -1, 1),
new Among("\u0435\u043C", -1, 1), new Among("\u0438\u043C", -1, 1),
new Among("\u043E\u043C", -1, 1), new Among("\u044B\u043C", -1, 1),
new Among("\u0435\u0433\u043E", -1, 1),
new Among("\u043E\u0433\u043E", -1, 1),
new Among("\u0435\u043C\u0443", -1, 1),
new Among("\u043E\u043C\u0443", -1, 1),
new Among("\u0438\u0445", -1, 1), new Among("\u044B\u0445", -1, 1),
new Among("\u0435\u044E", -1, 1), new Among("\u043E\u044E", -1, 1),
new Among("\u0443\u044E", -1, 1), new Among("\u044E\u044E", -1, 1),
new Among("\u0430\u044F", -1, 1), new Among("\u044F\u044F", -1, 1)
],
a_2 = [
new Among("\u0435\u043C", -1, 1), new Among("\u043D\u043D", -1, 1),
new Among("\u0432\u0448", -1, 1),
new Among("\u0438\u0432\u0448", 2, 2),
new Among("\u044B\u0432\u0448", 2, 2), new Among("\u0449", -1, 1),
new Among("\u044E\u0449", 5, 1),
new Among("\u0443\u044E\u0449", 6, 2)
],
a_3 = [
new Among("\u0441\u044C", -1, 1), new Among("\u0441\u044F", -1, 1)
],
a_4 = [
new Among("\u043B\u0430", -1, 1),
new Among("\u0438\u043B\u0430", 0, 2),
new Among("\u044B\u043B\u0430", 0, 2),
new Among("\u043D\u0430", -1, 1),
new Among("\u0435\u043D\u0430", 3, 2),
new Among("\u0435\u0442\u0435", -1, 1),
new Among("\u0438\u0442\u0435", -1, 2),
new Among("\u0439\u0442\u0435", -1, 1),
new Among("\u0435\u0439\u0442\u0435", 7, 2),
new Among("\u0443\u0439\u0442\u0435", 7, 2),
new Among("\u043B\u0438", -1, 1),
new Among("\u0438\u043B\u0438", 10, 2),
new Among("\u044B\u043B\u0438", 10, 2), new Among("\u0439", -1, 1),
new Among("\u0435\u0439", 13, 2), new Among("\u0443\u0439", 13, 2),
new Among("\u043B", -1, 1), new Among("\u0438\u043B", 16, 2),
new Among("\u044B\u043B", 16, 2), new Among("\u0435\u043C", -1, 1),
new Among("\u0438\u043C", -1, 2), new Among("\u044B\u043C", -1, 2),
new Among("\u043D", -1, 1), new Among("\u0435\u043D", 22, 2),
new Among("\u043B\u043E", -1, 1),
new Among("\u0438\u043B\u043E", 24, 2),
new Among("\u044B\u043B\u043E", 24, 2),
new Among("\u043D\u043E", -1, 1),
new Among("\u0435\u043D\u043E", 27, 2),
new Among("\u043D\u043D\u043E", 27, 1),
new Among("\u0435\u0442", -1, 1),
new Among("\u0443\u0435\u0442", 30, 2),
new Among("\u0438\u0442", -1, 2), new Among("\u044B\u0442", -1, 2),
new Among("\u044E\u0442", -1, 1),
new Among("\u0443\u044E\u0442", 34, 2),
new Among("\u044F\u0442", -1, 2), new Among("\u043D\u044B", -1, 1),
new Among("\u0435\u043D\u044B", 37, 2),
new Among("\u0442\u044C", -1, 1),
new Among("\u0438\u0442\u044C", 39, 2),
new Among("\u044B\u0442\u044C", 39, 2),
new Among("\u0435\u0448\u044C", -1, 1),
new Among("\u0438\u0448\u044C", -1, 2), new Among("\u044E", -1, 2),
new Among("\u0443\u044E", 44, 2)
],
a_5 = [
new Among("\u0430", -1, 1), new Among("\u0435\u0432", -1, 1),
new Among("\u043E\u0432", -1, 1), new Among("\u0435", -1, 1),
new Among("\u0438\u0435", 3, 1), new Among("\u044C\u0435", 3, 1),
new Among("\u0438", -1, 1), new Among("\u0435\u0438", 6, 1),
new Among("\u0438\u0438", 6, 1),
new Among("\u0430\u043C\u0438", 6, 1),
new Among("\u044F\u043C\u0438", 6, 1),
new Among("\u0438\u044F\u043C\u0438", 10, 1),
new Among("\u0439", -1, 1), new Among("\u0435\u0439", 12, 1),
new Among("\u0438\u0435\u0439", 13, 1),
new Among("\u0438\u0439", 12, 1), new Among("\u043E\u0439", 12, 1),
new Among("\u0430\u043C", -1, 1), new Among("\u0435\u043C", -1, 1),
new Among("\u0438\u0435\u043C", 18, 1),
new Among("\u043E\u043C", -1, 1), new Among("\u044F\u043C", -1, 1),
new Among("\u0438\u044F\u043C", 21, 1), new Among("\u043E", -1, 1),
new Among("\u0443", -1, 1), new Among("\u0430\u0445", -1, 1),
new Among("\u044F\u0445", -1, 1),
new Among("\u0438\u044F\u0445", 26, 1), new Among("\u044B", -1, 1),
new Among("\u044C", -1, 1), new Among("\u044E", -1, 1),
new Among("\u0438\u044E", 30, 1), new Among("\u044C\u044E", 30, 1),
new Among("\u044F", -1, 1), new Among("\u0438\u044F", 33, 1),
new Among("\u044C\u044F", 33, 1)
],
a_6 = [
new Among("\u043E\u0441\u0442", -1, 1),
new Among("\u043E\u0441\u0442\u044C", -1, 1)
],
a_7 = [
new Among("\u0435\u0439\u0448\u0435", -1, 1),
new Among("\u043D", -1, 2), new Among("\u0435\u0439\u0448", -1, 1),
new Among("\u044C", -1, 3)
],
g_v = [33, 65, 8, 232],
I_p2, I_pV, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function habr3() {
while (!sbp.in_grouping(g_v, 1072, 1103)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
return true;
}
function habr4() {
while (!sbp.out_grouping(g_v, 1072, 1103)) {
if (sbp.cursor >= sbp.limit)
return false;
sbp.cursor++;
}
return true;
}
function r_mark_regions() {
I_pV = sbp.limit;
I_p2 = I_pV;
if (habr3()) {
I_pV = sbp.cursor;
if (habr4())
if (habr3())
if (habr4())
I_p2 = sbp.cursor;
}
}
function r_R2() {
return I_p2 <= sbp.cursor;
}
function habr2(a, n) {
var among_var, v_1;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a, n);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
v_1 = sbp.limit - sbp.cursor;
if (!sbp.eq_s_b(1, "\u0430")) {
sbp.cursor = sbp.limit - v_1;
if (!sbp.eq_s_b(1, "\u044F"))
return false;
}
case 2:
sbp.slice_del();
break;
}
return true;
}
return false;
}
function r_perfective_gerund() {
return habr2(a_0, 9);
}
function habr1(a, n) {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a, n);
if (among_var) {
sbp.bra = sbp.cursor;
if (among_var == 1)
sbp.slice_del();
return true;
}
return false;
}
function r_adjective() {
return habr1(a_1, 26);
}
function r_adjectival() {
var among_var;
if (r_adjective()) {
habr2(a_2, 8);
return true;
}
return false;
}
function r_reflexive() {
return habr1(a_3, 2);
}
function r_verb() {
return habr2(a_4, 46);
}
function r_noun() {
habr1(a_5, 36);
}
function r_derivational() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_6, 2);
if (among_var) {
sbp.bra = sbp.cursor;
if (r_R2() && among_var == 1)
sbp.slice_del();
}
}
function r_tidy_up() {
var among_var;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_7, 4);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_del();
sbp.ket = sbp.cursor;
if (!sbp.eq_s_b(1, "\u043D"))
break;
sbp.bra = sbp.cursor;
case 2:
if (!sbp.eq_s_b(1, "\u043D"))
break;
case 3:
sbp.slice_del();
break;
}
}
}
this.stem = function() {
r_mark_regions();
sbp.cursor = sbp.limit;
if (sbp.cursor < I_pV)
return false;
sbp.limit_backward = I_pV;
if (!r_perfective_gerund()) {
sbp.cursor = sbp.limit;
if (!r_reflexive())
sbp.cursor = sbp.limit;
if (!r_adjectival()) {
sbp.cursor = sbp.limit;
if (!r_verb()) {
sbp.cursor = sbp.limit;
r_noun();
}
}
}
sbp.cursor = sbp.limit;
sbp.ket = sbp.cursor;
if (sbp.eq_s_b(1, "\u0438")) {
sbp.bra = sbp.cursor;
sbp.slice_del();
} else
sbp.cursor = sbp.limit;
r_derivational();
sbp.cursor = sbp.limit;
r_tidy_up();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.ru.stemmer, 'stemmer-ru');
/* stop word filter function */
lunr.ru.stopWordFilter = function(token) {
if (lunr.ru.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.ru.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.ru.stopWordFilter.stopWords.length = 422;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.ru.stopWordFilter.stopWords.elements = ' алло без близко более больше будем будет будете будешь будто буду будут будь бы бывает бывь был была были было быть в важная важное важные важный вам вами вас ваш ваша ваше ваши вверх вдали вдруг ведь везде весь вниз внизу во вокруг вон восемнадцатый восемнадцать восемь восьмой вот впрочем времени время все всегда всего всем всеми всему всех всею всю всюду вся всё второй вы г где говорил говорит год года году да давно даже далеко дальше даром два двадцатый двадцать две двенадцатый двенадцать двух девятнадцатый девятнадцать девятый девять действительно дел день десятый десять для до довольно долго должно другая другие других друго другое другой е его ее ей ему если есть еще ещё ею её ж же жизнь за занят занята занято заняты затем зато зачем здесь значит и из или им именно иметь ими имя иногда их к каждая каждое каждые каждый кажется как какая какой кем когда кого ком кому конечно которая которого которой которые который которых кроме кругом кто куда лет ли лишь лучше люди м мало между меля менее меньше меня миллионов мимо мира мне много многочисленная многочисленное многочисленные многочисленный мной мною мог могут мож может можно можхо мои мой мор мочь моя моё мы на наверху над надо назад наиболее наконец нам нами нас начала наш наша наше наши не него недавно недалеко нее ней нельзя нем немного нему непрерывно нередко несколько нет нею неё ни нибудь ниже низко никогда никуда ними них ничего но ну нужно нх о об оба обычно один одиннадцатый одиннадцать однажды однако одного одной около он она они оно опять особенно от отовсюду отсюда очень первый перед по под пожалуйста позже пока пор пора после посреди потом потому почему почти прекрасно при про просто против процентов пятнадцатый пятнадцать пятый пять раз разве рано раньше рядом с сам сама сами самим самими самих само самого самой самом самому саму свое своего своей свои своих свою сеаой себе себя сегодня седьмой сейчас семнадцатый семнадцать семь сих сказал сказала сказать сколько слишком сначала снова со собой собою совсем спасибо стал суть т та так такая также такие такое такой там твой твоя твоё те тебе тебя тем теми теперь тех то тобой тобою тогда того тоже только том тому тот тою третий три тринадцатый тринадцать ту туда тут ты тысяч у уж уже уметь хорошо хотеть хоть хотя хочешь часто чаще чего человек чем чему через четвертый четыре четырнадцатый четырнадцать что чтоб чтобы чуть шестнадцатый шестнадцать шестой шесть эта эти этим этими этих это этого этой этом этому этот эту я а'.split(' ');
lunr.Pipeline.registerFunction(lunr.ru.stopWordFilter, 'stopWordFilter-ru');
};
}))

File diff suppressed because one or more lines are too long

@ -0,0 +1,252 @@
/*!
* Lunr languages, `Swedish` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2014, Mihai Valentin
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function() {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/* register specific locale function */
lunr.sv = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.sv.trimmer,
lunr.sv.stopWordFilter,
lunr.sv.stemmer
);
};
/* lunr trimmer function */
lunr.sv.wordCharacters = "A-Za-z\xAA\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uFB00-\uFB06\uFF21-\uFF3A\uFF41-\uFF5A";
lunr.sv.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.sv.wordCharacters);
lunr.Pipeline.registerFunction(lunr.sv.trimmer, 'trimmer-sv');
/* lunr stemmer function */
lunr.sv.stemmer = (function() {
/* create the wrapped stemmer object */
var Among = lunr.stemmerSupport.Among,
SnowballProgram = lunr.stemmerSupport.SnowballProgram,
st = new function SwedishStemmer() {
var a_0 = [new Among("a", -1, 1), new Among("arna", 0, 1),
new Among("erna", 0, 1), new Among("heterna", 2, 1),
new Among("orna", 0, 1), new Among("ad", -1, 1),
new Among("e", -1, 1), new Among("ade", 6, 1),
new Among("ande", 6, 1), new Among("arne", 6, 1),
new Among("are", 6, 1), new Among("aste", 6, 1),
new Among("en", -1, 1), new Among("anden", 12, 1),
new Among("aren", 12, 1), new Among("heten", 12, 1),
new Among("ern", -1, 1), new Among("ar", -1, 1),
new Among("er", -1, 1), new Among("heter", 18, 1),
new Among("or", -1, 1), new Among("s", -1, 2),
new Among("as", 21, 1), new Among("arnas", 22, 1),
new Among("ernas", 22, 1), new Among("ornas", 22, 1),
new Among("es", 21, 1), new Among("ades", 26, 1),
new Among("andes", 26, 1), new Among("ens", 21, 1),
new Among("arens", 29, 1), new Among("hetens", 29, 1),
new Among("erns", 21, 1), new Among("at", -1, 1),
new Among("andet", -1, 1), new Among("het", -1, 1),
new Among("ast", -1, 1)
],
a_1 = [new Among("dd", -1, -1),
new Among("gd", -1, -1), new Among("nn", -1, -1),
new Among("dt", -1, -1), new Among("gt", -1, -1),
new Among("kt", -1, -1), new Among("tt", -1, -1)
],
a_2 = [
new Among("ig", -1, 1), new Among("lig", 0, 1),
new Among("els", -1, 1), new Among("fullt", -1, 3),
new Among("l\u00F6st", -1, 2)
],
g_v = [17, 65, 16, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32
],
g_s_ending = [119, 127, 149],
I_x, I_p1, sbp = new SnowballProgram();
this.setCurrent = function(word) {
sbp.setCurrent(word);
};
this.getCurrent = function() {
return sbp.getCurrent();
};
function r_mark_regions() {
var v_1, c = sbp.cursor + 3;
I_p1 = sbp.limit;
if (0 <= c || c <= sbp.limit) {
I_x = c;
while (true) {
v_1 = sbp.cursor;
if (sbp.in_grouping(g_v, 97, 246)) {
sbp.cursor = v_1;
break;
}
sbp.cursor = v_1;
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
while (!sbp.out_grouping(g_v, 97, 246)) {
if (sbp.cursor >= sbp.limit)
return;
sbp.cursor++;
}
I_p1 = sbp.cursor;
if (I_p1 < I_x)
I_p1 = I_x;
}
}
function r_main_suffix() {
var among_var, v_2 = sbp.limit_backward;
if (sbp.cursor >= I_p1) {
sbp.limit_backward = I_p1;
sbp.cursor = sbp.limit;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_0, 37);
sbp.limit_backward = v_2;
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
if (sbp.in_grouping_b(g_s_ending, 98, 121))
sbp.slice_del();
break;
}
}
}
}
function r_consonant_pair() {
var v_1 = sbp.limit_backward;
if (sbp.cursor >= I_p1) {
sbp.limit_backward = I_p1;
sbp.cursor = sbp.limit;
if (sbp.find_among_b(a_1, 7)) {
sbp.cursor = sbp.limit;
sbp.ket = sbp.cursor;
if (sbp.cursor > sbp.limit_backward) {
sbp.bra = --sbp.cursor;
sbp.slice_del();
}
}
sbp.limit_backward = v_1;
}
}
function r_other_suffix() {
var among_var, v_2;
if (sbp.cursor >= I_p1) {
v_2 = sbp.limit_backward;
sbp.limit_backward = I_p1;
sbp.cursor = sbp.limit;
sbp.ket = sbp.cursor;
among_var = sbp.find_among_b(a_2, 5);
if (among_var) {
sbp.bra = sbp.cursor;
switch (among_var) {
case 1:
sbp.slice_del();
break;
case 2:
sbp.slice_from("l\u00F6s");
break;
case 3:
sbp.slice_from("full");
break;
}
}
sbp.limit_backward = v_2;
}
}
this.stem = function() {
var v_1 = sbp.cursor;
r_mark_regions();
sbp.limit_backward = v_1;
sbp.cursor = sbp.limit;
r_main_suffix();
sbp.cursor = sbp.limit;
r_consonant_pair();
sbp.cursor = sbp.limit;
r_other_suffix();
return true;
}
};
/* and return a function that stems a word for the current locale */
return function(word) {
st.setCurrent(word);
st.stem();
return st.getCurrent();
}
})();
lunr.Pipeline.registerFunction(lunr.sv.stemmer, 'stemmer-sv');
/* stop word filter function */
lunr.sv.stopWordFilter = function(token) {
if (lunr.sv.stopWordFilter.stopWords.indexOf(token) === -1) {
return token;
}
};
lunr.sv.stopWordFilter.stopWords = new lunr.SortedSet();
lunr.sv.stopWordFilter.stopWords.length = 115;
// The space at the beginning is crucial: It marks the empty string
// as a stop word. lunr.js crashes during search when documents
// processed by the pipeline still contain the empty string.
lunr.sv.stopWordFilter.stopWords.elements = ' alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över'.split(' ');
lunr.Pipeline.registerFunction(lunr.sv.stopWordFilter, 'stopWordFilter-sv');
};
}))

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(r){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var e,d,n;r.sv=function(){this.pipeline.reset(),this.pipeline.add(r.sv.trimmer,r.sv.stopWordFilter,r.sv.stemmer)},r.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",r.sv.trimmer=r.trimmerSupport.generateTrimmer(r.sv.wordCharacters),r.Pipeline.registerFunction(r.sv.trimmer,"trimmer-sv"),r.sv.stemmer=(e=r.stemmerSupport.Among,d=r.stemmerSupport.SnowballProgram,n=new function(){var n,t,i=[new e("a",-1,1),new e("arna",0,1),new e("erna",0,1),new e("heterna",2,1),new e("orna",0,1),new e("ad",-1,1),new e("e",-1,1),new e("ade",6,1),new e("ande",6,1),new e("arne",6,1),new e("are",6,1),new e("aste",6,1),new e("en",-1,1),new e("anden",12,1),new e("aren",12,1),new e("heten",12,1),new e("ern",-1,1),new e("ar",-1,1),new e("er",-1,1),new e("heter",18,1),new e("or",-1,1),new e("s",-1,2),new e("as",21,1),new e("arnas",22,1),new e("ernas",22,1),new e("ornas",22,1),new e("es",21,1),new e("ades",26,1),new e("andes",26,1),new e("ens",21,1),new e("arens",29,1),new e("hetens",29,1),new e("erns",21,1),new e("at",-1,1),new e("andet",-1,1),new e("het",-1,1),new e("ast",-1,1)],s=[new e("dd",-1,-1),new e("gd",-1,-1),new e("nn",-1,-1),new e("dt",-1,-1),new e("gt",-1,-1),new e("kt",-1,-1),new e("tt",-1,-1)],a=[new e("ig",-1,1),new e("lig",0,1),new e("els",-1,1),new e("fullt",-1,3),new e("löst",-1,2)],o=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],u=[119,127,149],l=new d;this.setCurrent=function(e){l.setCurrent(e)},this.getCurrent=function(){return l.getCurrent()},this.stem=function(){var e=l.cursor;!function(){var e,r=l.cursor+3;if(t=l.limit,0<=r||r<=l.limit){for(n=r;;){if(e=l.cursor,l.in_grouping(o,97,246)){l.cursor=e;break}if(l.cursor=e,l.cursor>=l.limit)return;l.cursor++}for(;!l.out_grouping(o,97,246);){if(l.cursor>=l.limit)return;l.cursor++}(t=l.cursor)<n&&(t=n)}}(),l.limit_backward=e,l.cursor=l.limit;var r,e=l.limit_backward;if(l.cursor>=t&&(l.limit_backward=t,l.cursor=l.limit,l.ket=l.cursor,r=l.find_among_b(i,37),l.limit_backward=e,r))switch(l.bra=l.cursor,r){case 1:l.slice_del();break;case 2:l.in_grouping_b(u,98,121)&&l.slice_del()}if(l.cursor=l.limit,e=l.limit_backward,l.cursor>=t&&(l.limit_backward=t,l.cursor=l.limit,l.find_among_b(s,7)&&(l.cursor=l.limit,l.ket=l.cursor,l.cursor>l.limit_backward)&&(l.bra=--l.cursor,l.slice_del()),l.limit_backward=e),l.cursor=l.limit,l.cursor>=t){if(r=l.limit_backward,l.limit_backward=t,l.cursor=l.limit,l.ket=l.cursor,e=l.find_among_b(a,5))switch(l.bra=l.cursor,e){case 1:l.slice_del();break;case 2:l.slice_from("lös");break;case 3:l.slice_from("full")}l.limit_backward=r}return!0}},function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}),r.Pipeline.registerFunction(r.sv.stemmer,"stemmer-sv"),r.sv.stopWordFilter=function(e){if(-1===r.sv.stopWordFilter.stopWords.indexOf(e))return e},r.sv.stopWordFilter.stopWords=new r.SortedSet,r.sv.stopWordFilter.stopWords.length=115,r.sv.stopWordFilter.stopWords.elements=" alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" "),r.Pipeline.registerFunction(r.sv.stopWordFilter,"stopWordFilter-sv")}});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,156 @@
/*!
* Lunr languages, `Chinese` language
* https://github.com/MihaiValentin/lunr-languages
*
* Copyright 2019, Felix Lian (repairearth)
* http://www.mozilla.org/MPL/
*/
/*!
* based on
* Snowball zhvaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory(require('nodejieba'))
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function(nodejieba) {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function(lunr, nodejiebaDictJson) {
/* throw error if lunr is not yet included */
if ('undefined' === typeof lunr) {
throw new Error('Lunr is not present. Please include / require Lunr before this script.');
}
/* throw error if lunr stemmer support is not yet included */
if ('undefined' === typeof lunr.stemmerSupport) {
throw new Error('Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.');
}
/*
Chinese tokenization is trickier, since it does not
take into account spaces.
Since the tokenization function is represented different
internally for each of the Lunr versions, this had to be done
in order to try to try to pick the best way of doing this based
on the Lunr version
*/
var isLunr2 = lunr.version[0] == "2";
/* register specific locale function */
lunr.zh = function() {
this.pipeline.reset();
this.pipeline.add(
lunr.zh.trimmer,
lunr.zh.stopWordFilter,
lunr.zh.stemmer
);
// change the tokenizer for Chinese one
if (isLunr2) { // for lunr version 2.0.0
this.tokenizer = lunr.zh.tokenizer;
} else {
if (lunr.tokenizer) { // for lunr version 0.6.0
lunr.tokenizer = lunr.zh.tokenizer;
}
if (this.tokenizerFn) { // for lunr version 0.7.0 -> 1.0.0
this.tokenizerFn = lunr.zh.tokenizer;
}
}
};
lunr.zh.tokenizer = function(obj) {
if (!arguments.length || obj == null || obj == undefined) return []
if (Array.isArray(obj)) return obj.map(function(t) {
return isLunr2 ? new lunr.Token(t.toLowerCase()) : t.toLowerCase()
})
nodejiebaDictJson && nodejieba.load(nodejiebaDictJson)
var str = obj.toString().trim().toLowerCase();
var tokens = [];
nodejieba.cut(str, true).forEach(function(seg) {
tokens = tokens.concat(seg.split(' '))
})
tokens = tokens.filter(function(token) {
return !!token;
});
var fromIndex = 0
return tokens.map(function(token, index) {
if (isLunr2) {
var start = str.indexOf(token, fromIndex)
var tokenMetadata = {}
tokenMetadata["position"] = [start, token.length]
tokenMetadata["index"] = index
fromIndex = start
return new lunr.Token(token, tokenMetadata);
} else {
return token
}
});
}
/* lunr trimmer function */
lunr.zh.wordCharacters = "\\w\u4e00-\u9fa5";
lunr.zh.trimmer = lunr.trimmerSupport.generateTrimmer(lunr.zh.wordCharacters);
lunr.Pipeline.registerFunction(lunr.zh.trimmer, 'trimmer-zh');
/* lunr stemmer function */
lunr.zh.stemmer = (function() {
/* TODO Chinese stemmer */
return function(word) {
return word;
}
})();
lunr.Pipeline.registerFunction(lunr.zh.stemmer, 'stemmer-zh');
/* lunr stop word filter. see https://www.ranks.nl/stopwords/chinese-stopwords */
lunr.generateStopWordFilter = function (stopWords) {
var words = stopWords.reduce(function (memo, stopWord) {
memo[stopWord] = stopWord;
return memo;
}, {});
return function (token) {
if (token && words[token.toString()] !== token.toString()) return token;
};
}
lunr.zh.stopWordFilter = lunr.generateStopWordFilter(
'的 一 不 在 人 有 是 为 以 于 上 他 而 后 之 来 及 了 因 下 可 到 由 这 与 也 此 但 并 个 其 已 无 小 我 们 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 从 到 得 打 凡 儿 尔 该 各 给 跟 和 何 还 即 几 既 看 据 距 靠 啦 了 另 么 每 们 嘛 拿 哪 那 您 凭 且 却 让 仍 啥 如 若 使 谁 虽 随 同 所 她 哇 嗡 往 哪 些 向 沿 哟 用 于 咱 则 怎 曾 至 致 着 诸 自'.split(' '));
lunr.Pipeline.registerFunction(lunr.zh.stopWordFilter, 'stopWordFilter-zh');
};
}))

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r(require("nodejieba")):r()(e.lunr)}(this,function(n){return function(u,t){if(void 0===u)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===u.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var s="2"==u.version[0];u.zh=function(){this.pipeline.reset(),this.pipeline.add(u.zh.trimmer,u.zh.stopWordFilter,u.zh.stemmer),s?this.tokenizer=u.zh.tokenizer:(u.tokenizer&&(u.tokenizer=u.zh.tokenizer),this.tokenizerFn&&(this.tokenizerFn=u.zh.tokenizer))},u.zh.tokenizer=function(e){if(!arguments.length||null==e)return[];if(Array.isArray(e))return e.map(function(e){return s?new u.Token(e.toLowerCase()):e.toLowerCase()});t&&n.load(t);var i=e.toString().trim().toLowerCase(),r=[],o=(n.cut(i,!0).forEach(function(e){r=r.concat(e.split(" "))}),r=r.filter(function(e){return!!e}),0);return r.map(function(e,r){var t,n;return s?(t=i.indexOf(e,o),(n={}).position=[t,e.length],n.index=r,o=t,new u.Token(e,n)):e})},u.zh.wordCharacters="\\w一-龥",u.zh.trimmer=u.trimmerSupport.generateTrimmer(u.zh.wordCharacters),u.Pipeline.registerFunction(u.zh.trimmer,"trimmer-zh"),u.zh.stemmer=function(e){return e},u.Pipeline.registerFunction(u.zh.stemmer,"stemmer-zh"),u.generateStopWordFilter=function(e){var r=e.reduce(function(e,r){return e[r]=r,e},{});return function(e){if(e&&r[e.toString()]!==e.toString())return e}},u.zh.stopWordFilter=u.generateStopWordFilter("的 一 不 在 人 有 是 为 以 于 上 他 而 后 之 来 及 了 因 下 可 到 由 这 与 也 此 但 并 个 其 已 无 小 我 们 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 从 到 得 打 凡 儿 尔 该 各 给 跟 和 何 还 即 几 既 看 据 距 靠 啦 了 另 么 每 们 嘛 拿 哪 那 您 凭 且 却 让 仍 啥 如 若 使 谁 虽 随 同 所 她 哇 嗡 往 哪 些 向 沿 哟 用 于 咱 则 怎 曾 至 致 着 诸 自".split(" ")),u.Pipeline.registerFunction(u.zh.stopWordFilter,"stopWordFilter-zh")}});

@ -0,0 +1,304 @@
/*!
* Snowball JavaScript Library v0.3
* http://code.google.com/p/urim/
* http://snowball.tartarus.org/
*
* Copyright 2010, Oleg Mazko
* http://www.mozilla.org/MPL/
*/
/**
* export the module via AMD, CommonJS or as a browser global
* Export code from https://github.com/umdjs/umd/blob/master/returnExports.js
*/
; (function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(factory)
} else if (typeof exports === 'object') {
/**
* Node. Does not work with strict CommonJS, but
* only CommonJS-like environments that support module.exports,
* like Node.
*/
module.exports = factory()
} else {
// Browser globals (root is window)
factory()(root.lunr);
}
}(this, function () {
/**
* Just return a value to define the module export.
* This example returns an object, but the module
* can return a function as the exported value.
*/
return function (lunr) {
/* provides utilities for the included stemmers */
lunr.stemmerSupport = {
Among: function (s, substring_i, result, method) {
this.toCharArray = function (s) {
var sLength = s.length, charArr = new Array(sLength);
for (var i = 0; i < sLength; i++)
charArr[i] = s.charCodeAt(i);
return charArr;
};
if ((!s && s != "") || (!substring_i && (substring_i != 0)) || !result)
throw ("Bad Among initialisation: s:" + s + ", substring_i: "
+ substring_i + ", result: " + result);
this.s_size = s.length;
this.s = this.toCharArray(s);
this.substring_i = substring_i;
this.result = result;
this.method = method;
},
SnowballProgram: function () {
var current;
return {
bra: 0,
ket: 0,
limit: 0,
cursor: 0,
limit_backward: 0,
setCurrent: function (word) {
current = word;
this.cursor = 0;
this.limit = word.length;
this.limit_backward = 0;
this.bra = this.cursor;
this.ket = this.limit;
},
getCurrent: function () {
var result = current;
current = null;
return result;
},
in_grouping: function (s, min, max) {
if (this.cursor < this.limit) {
var ch = current.charCodeAt(this.cursor);
if (ch <= max && ch >= min) {
ch -= min;
if (s[ch >> 3] & (0X1 << (ch & 0X7))) {
this.cursor++;
return true;
}
}
}
return false;
},
in_grouping_b: function (s, min, max) {
if (this.cursor > this.limit_backward) {
var ch = current.charCodeAt(this.cursor - 1);
if (ch <= max && ch >= min) {
ch -= min;
if (s[ch >> 3] & (0X1 << (ch & 0X7))) {
this.cursor--;
return true;
}
}
}
return false;
},
out_grouping: function (s, min, max) {
if (this.cursor < this.limit) {
var ch = current.charCodeAt(this.cursor);
if (ch > max || ch < min) {
this.cursor++;
return true;
}
ch -= min;
if (!(s[ch >> 3] & (0X1 << (ch & 0X7)))) {
this.cursor++;
return true;
}
}
return false;
},
out_grouping_b: function (s, min, max) {
if (this.cursor > this.limit_backward) {
var ch = current.charCodeAt(this.cursor - 1);
if (ch > max || ch < min) {
this.cursor--;
return true;
}
ch -= min;
if (!(s[ch >> 3] & (0X1 << (ch & 0X7)))) {
this.cursor--;
return true;
}
}
return false;
},
eq_s: function (s_size, s) {
if (this.limit - this.cursor < s_size)
return false;
for (var i = 0; i < s_size; i++)
if (current.charCodeAt(this.cursor + i) != s.charCodeAt(i))
return false;
this.cursor += s_size;
return true;
},
eq_s_b: function (s_size, s) {
if (this.cursor - this.limit_backward < s_size)
return false;
for (var i = 0; i < s_size; i++)
if (current.charCodeAt(this.cursor - s_size + i) != s
.charCodeAt(i))
return false;
this.cursor -= s_size;
return true;
},
find_among: function (v, v_size) {
var i = 0, j = v_size, c = this.cursor, l = this.limit, common_i = 0, common_j = 0, first_key_inspected = false;
while (true) {
var k = i + ((j - i) >> 1), diff = 0, common = common_i < common_j
? common_i
: common_j, w = v[k];
for (var i2 = common; i2 < w.s_size; i2++) {
if (c + common == l) {
diff = -1;
break;
}
diff = current.charCodeAt(c + common) - w.s[i2];
if (diff)
break;
common++;
}
if (diff < 0) {
j = k;
common_j = common;
} else {
i = k;
common_i = common;
}
if (j - i <= 1) {
if (i > 0 || j == i || first_key_inspected)
break;
first_key_inspected = true;
}
}
while (true) {
var w = v[i];
if (common_i >= w.s_size) {
this.cursor = c + w.s_size;
if (!w.method)
return w.result;
var res = w.method();
this.cursor = c + w.s_size;
if (res)
return w.result;
}
i = w.substring_i;
if (i < 0)
return 0;
}
},
find_among_b: function (v, v_size) {
var i = 0, j = v_size, c = this.cursor, lb = this.limit_backward, common_i = 0, common_j = 0, first_key_inspected = false;
while (true) {
var k = i + ((j - i) >> 1), diff = 0, common = common_i < common_j
? common_i
: common_j, w = v[k];
for (var i2 = w.s_size - 1 - common; i2 >= 0; i2--) {
if (c - common == lb) {
diff = -1;
break;
}
diff = current.charCodeAt(c - 1 - common) - w.s[i2];
if (diff)
break;
common++;
}
if (diff < 0) {
j = k;
common_j = common;
} else {
i = k;
common_i = common;
}
if (j - i <= 1) {
if (i > 0 || j == i || first_key_inspected)
break;
first_key_inspected = true;
}
}
while (true) {
var w = v[i];
if (common_i >= w.s_size) {
this.cursor = c - w.s_size;
if (!w.method)
return w.result;
var res = w.method();
this.cursor = c - w.s_size;
if (res)
return w.result;
}
i = w.substring_i;
if (i < 0)
return 0;
}
},
replace_s: function (c_bra, c_ket, s) {
var adjustment = s.length - (c_ket - c_bra), left = current
.substring(0, c_bra), right = current.substring(c_ket);
current = left + s + right;
this.limit += adjustment;
if (this.cursor >= c_ket)
this.cursor += adjustment;
else if (this.cursor > c_bra)
this.cursor = c_bra;
return adjustment;
},
slice_check: function () {
if (this.bra < 0 || this.bra > this.ket || this.ket > this.limit
|| this.limit > current.length)
throw ("faulty slice operation");
},
slice_from: function (s) {
this.slice_check();
this.replace_s(this.bra, this.ket, s);
},
slice_del: function () {
this.slice_from("");
},
insert: function (c_bra, c_ket, s) {
var adjustment = this.replace_s(c_bra, c_ket, s);
if (c_bra <= this.bra)
this.bra += adjustment;
if (c_bra <= this.ket)
this.ket += adjustment;
},
slice_to: function () {
this.slice_check();
return current.substring(this.bra, this.ket);
},
eq_v_b: function (s) {
return this.eq_s_b(s.length, s);
}
};
}
};
lunr.trimmerSupport = {
generateTrimmer: function (wordCharacters) {
var startRegex = new RegExp("^[^" + wordCharacters + "]+")
var endRegex = new RegExp("[^" + wordCharacters + "]+$")
return function (token) {
// for lunr version 2
if (typeof token.update === "function") {
return token.update(function (s) {
return s
.replace(startRegex, '')
.replace(endRegex, '');
})
} else { // for lunr version 1
return token
.replace(startRegex, '')
.replace(endRegex, '');
}
};
}
}
}
}));

@ -0,0 +1 @@
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var b;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(r){b=r,this.cursor=0,this.limit=r.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var r=b;return b=null,r},in_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor++,!0}return!1},in_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor--,!0}return!1},out_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(i<s||s<t)return this.cursor++,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor++,!0}return!1},out_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(i<s||s<t)return this.cursor--,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor--,!0}return!1},eq_s:function(r,t){if(this.limit-this.cursor<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor+i)!=t.charCodeAt(i))return!1;return this.cursor+=r,!0},eq_s_b:function(r,t){if(this.cursor-this.limit_backward<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor-r+i)!=t.charCodeAt(i))return!1;return this.cursor-=r,!0},find_among:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit,u=0,o=0,h=!1;;){for(var c=i+(s-i>>1),f=0,a=u<o?u:o,l=r[c],_=a;_<l.s_size;_++){if(e+a==n){f=-1;break}if(f=b.charCodeAt(e+a)-l.s[_])break;a++}if(f<0?(s=c,o=a):(i=c,u=a),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){if(u>=(l=r[i]).s_size){if(this.cursor=e+l.s_size,!l.method)return l.result;var m=l.method();if(this.cursor=e+l.s_size,m)return l.result}if((i=l.substring_i)<0)return 0}},find_among_b:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit_backward,u=0,o=0,h=!1;;){for(var c,f=i+(s-i>>1),a=0,l=u<o?u:o,_=(c=r[f]).s_size-1-l;0<=_;_--){if(e-l==n){a=-1;break}if(a=b.charCodeAt(e-1-l)-c.s[_])break;l++}if(a<0?(s=f,o=l):(i=f,u=l),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){if(u>=(c=r[i]).s_size){if(this.cursor=e-c.s_size,!c.method)return c.result;var m=c.method();if(this.cursor=e-c.s_size,m)return c.result}if((i=c.substring_i)<0)return 0}},replace_s:function(r,t,i){var s=i.length-(t-r);return b=b.substring(0,r)+i+b.substring(t),this.limit+=s,this.cursor>=t?this.cursor+=s:this.cursor>r&&(this.cursor=r),s},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>b.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){t=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=t),r<=this.ket&&(this.ket+=t)},slice_to:function(){return this.slice_check(),b.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -115,4 +115,9 @@
{%- if email_needs_decoding -%}
<script src="{{ get_url(path='js/decodeMail.min.js') }}" async></script>
{%- endif -%}
{# Modal structure for search #}
{%- if config.build_search_index -%}
{% include "partials/search_modal.html" %}
{%- endif -%}
</footer>

@ -1,6 +1,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="base" content="{{ config.base_url | safe }}">
{# Site title #}
<title>{%- include "partials/title.html" -%}</title>
@ -155,4 +156,30 @@
{%- include "partials/analytics.html" -%}
{%- endif -%}
{# Search #}
{%- if config.build_search_index -%}
{%- if config.search.index_format -%}
{%- set search_index_format = config.search.index_format -%}
{%- elif config.extra.index_format -%}
{# Necessary to support Zola 0.17.X, as it doesn't have access to config.search.index_format #}
{# See: https://github.com/getzola/zola/issues/2165 #}
{%- set search_index_format = config.extra.index_format -%}
{%- else -%}
{%- set search_index_format = "elasticlunr_json" -%}
{%- endif -%}
{%- if search_index_format == "elasticlunr_javascript" -%}
<script defer src="{{ get_url(path='search_index.' ~ lang ~ '.js', cachebust=true) | safe }}"></script>
{%- endif -%}
{# Main search script #}
<script defer src="{{ get_url(path='js/searchElasticlunr.min.js', cachebust=true) | safe }}"></script>
{# Support correct stemming and stop word filtering in non-English search #}
{%- if lang != "en" -%}
<script defer src="{{ get_url(path='js/lunr/lunrStemmerSupport.min.js') | safe }}"></script>
<script defer src="{{ get_url(path='js/lunr/lunr.' ~ lang ~ '.min.js') | safe }}"></script>
{%- endif -%}
{%- endif -%}
</head>

@ -18,6 +18,18 @@
{% endfor %}
{%- endif -%}
{# Search #}
{%- if config.build_search_index %}
{%- set search_icon_title = macros_translate::translate(key='search_icon_title', default='Press $SHORTCUT to open search', language_strings=language_strings) -%}
<li class="js">
<div role="button" tabindex="0" id="search-button" class="search-icon interactive-icon" title="{{ search_icon_title }}" aria-label="{{ search_icon_title }}">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
<path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/>
</svg>
</div>
</li>
{%- endif %}
{# Language switcher #}
{# Display the language switcher only if more than one language is available #}
{%- if config.languages | length > 0 %}

@ -0,0 +1,24 @@
<div id="searchModal" class="search-modal js" role="dialog" aria-labelledby="modalTitle">
<h1 id="modalTitle" class="visually-hidden">{{ macros_translate::translate(key='search', default='Search', language_strings=language_strings) }}</h1>
<div id="modal-content">
<div id="searchBar">
<div class="search-icon" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
<path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/>
</svg>
</div>
<input id="searchInput" role="combobox", autocomplete="off", spellcheck="false" aria-expanded="false", aria-controls="results-container", placeholder="{{ macros_translate::translate(key='search', default='Search', language_strings=language_strings) }}…"/>
<div id="clear-search" class="close-icon interactive-icon" tabindex="0" role="button" title="{{ macros_translate::translate(key='clear_search', default='Clear search', language_strings=language_strings) }}">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">
<path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/>
</svg>
</div>
</div>
<div id="results-container">
<div id="results-info">
<span id="n-results">0</span>&nbsp;<span id="result-text-singular">{{ macros_translate::translate(key='result', default='result', language_strings=language_strings) }}</span>
<span id="result-text-plural">{{ macros_translate::translate(key='results', default='results', language_strings=language_strings) }}</span>
</div>
<div id="results" role="listbox"></div>
</div>
</div>

@ -22,6 +22,13 @@ homepage = "https://osc.garden"
# Check out the documentation (or the comments below) to learn how to customise tabi:
# https://welpo.github.io/tabi/blog/mastering-tabi-settings/
# Search index format.
# For Zola 0.17.X users only.
# This MUST MATCH the setting in [search].index_format.
# Example: If [search].index_format is "elasticlunr_javascript", set:
# index_format = "elasticlunr_javascript" here.
# index_format = ""
# Enable JavaScript theme toggler to allow users to switch between dark/light mode.
# If disabled, your site will only use the theme specified in the `default_theme` variable.
theme_switcher = true

Loading…
Cancel
Save