2021-02-18 21:44:01 +01:00
/ * !
* Lunr languages , ` Turkish ` 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
* /
2021-02-18 22:21:36 +01:00
( function ( root , factory ) {
if ( typeof define === "function" && define . amd ) {
2021-02-18 21:44:01 +01:00
// AMD. Register as an anonymous module.
2021-02-18 22:21:36 +01:00
define ( factory ) ;
} else if ( typeof exports === "object" ) {
2021-02-18 21:44:01 +01:00
/ * *
* Node . Does not work with strict CommonJS , but
* only CommonJS - like environments that support module . exports ,
* like Node .
* /
2021-02-18 22:21:36 +01:00
module . exports = factory ( ) ;
2021-02-18 21:44:01 +01:00
} else {
// Browser globals (root is window)
factory ( ) ( root . lunr ) ;
}
2021-02-18 22:21:36 +01:00
} ) ( this , function ( ) {
2021-02-18 21:44:01 +01:00
/ * *
* 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 .
* /
2021-02-18 22:21:36 +01:00
return function ( lunr ) {
2021-02-18 21:44:01 +01:00
/* throw error if lunr is not yet included */
2021-02-18 22:21:36 +01:00
if ( "undefined" === typeof lunr ) {
throw new Error (
"Lunr is not present. Please include / require Lunr before this script."
) ;
2021-02-18 21:44:01 +01:00
}
/* throw error if lunr stemmer support is not yet included */
2021-02-18 22:21:36 +01:00
if ( "undefined" === typeof lunr . stemmerSupport ) {
throw new Error (
"Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script."
) ;
2021-02-18 21:44:01 +01:00
}
/* register specific locale function */
2021-02-18 22:21:36 +01:00
lunr . tr = function ( ) {
2021-02-18 21:44:01 +01:00
this . pipeline . reset ( ) ;
this . pipeline . add (
lunr . tr . trimmer ,
lunr . tr . stopWordFilter ,
lunr . tr . stemmer
) ;
// for lunr version 2
// this is necessary so that every searched word is also stemmed before
// in lunr <= 1 this is not needed, as it is done using the normal pipeline
if ( this . searchPipeline ) {
this . searchPipeline . reset ( ) ;
2021-02-18 22:21:36 +01:00
this . searchPipeline . add ( lunr . tr . stemmer ) ;
2021-02-18 21:44:01 +01:00
}
} ;
/* lunr trimmer function */
2021-02-18 22:21:36 +01:00
lunr . tr . 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 . tr . trimmer = lunr . trimmerSupport . generateTrimmer (
lunr . tr . wordCharacters
) ;
2021-02-18 21:44:01 +01:00
2021-02-18 22:21:36 +01:00
lunr . Pipeline . registerFunction ( lunr . tr . trimmer , "trimmer-tr" ) ;
2021-02-18 21:44:01 +01:00
/* lunr stemmer function */
2021-02-18 22:21:36 +01:00
lunr . tr . stemmer = ( function ( ) {
2021-02-18 21:44:01 +01:00
/* create the wrapped stemmer object */
var Among = lunr . stemmerSupport . Among ,
SnowballProgram = lunr . stemmerSupport . SnowballProgram ,
2021-02-18 22:21:36 +01:00
st = new ( function TurkishStemmer ( ) {
var a _0 = [
new Among ( "m" , - 1 , - 1 ) ,
new Among ( "n" , - 1 , - 1 ) ,
new Among ( "miz" , - 1 , - 1 ) ,
new Among ( "niz" , - 1 , - 1 ) ,
new Among ( "muz" , - 1 , - 1 ) ,
new Among ( "nuz" , - 1 , - 1 ) ,
new Among ( "m\u00FCz" , - 1 , - 1 ) ,
new Among ( "n\u00FCz" , - 1 , - 1 ) ,
new Among ( "m\u0131z" , - 1 , - 1 ) ,
new Among ( "n\u0131z" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
a _1 = [ new Among ( "leri" , - 1 , - 1 ) , new Among ( "lar\u0131" , - 1 , - 1 ) ] ,
2021-02-18 21:44:01 +01:00
a _2 = [
2021-02-18 22:21:36 +01:00
new Among ( "ni" , - 1 , - 1 ) ,
new Among ( "nu" , - 1 , - 1 ) ,
new Among ( "n\u00FC" , - 1 , - 1 ) ,
new Among ( "n\u0131" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _3 = [
2021-02-18 22:21:36 +01:00
new Among ( "in" , - 1 , - 1 ) ,
new Among ( "un" , - 1 , - 1 ) ,
new Among ( "\u00FCn" , - 1 , - 1 ) ,
new Among ( "\u0131n" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
a _4 = [ new Among ( "a" , - 1 , - 1 ) , new Among ( "e" , - 1 , - 1 ) ] ,
a _5 = [ new Among ( "na" , - 1 , - 1 ) , new Among ( "ne" , - 1 , - 1 ) ] ,
2021-02-18 21:44:01 +01:00
a _6 = [
2021-02-18 22:21:36 +01:00
new Among ( "da" , - 1 , - 1 ) ,
new Among ( "ta" , - 1 , - 1 ) ,
new Among ( "de" , - 1 , - 1 ) ,
new Among ( "te" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
a _7 = [ new Among ( "nda" , - 1 , - 1 ) , new Among ( "nde" , - 1 , - 1 ) ] ,
2021-02-18 21:44:01 +01:00
a _8 = [
2021-02-18 22:21:36 +01:00
new Among ( "dan" , - 1 , - 1 ) ,
new Among ( "tan" , - 1 , - 1 ) ,
new Among ( "den" , - 1 , - 1 ) ,
new Among ( "ten" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
a _9 = [ new Among ( "ndan" , - 1 , - 1 ) , new Among ( "nden" , - 1 , - 1 ) ] ,
a _10 = [ new Among ( "la" , - 1 , - 1 ) , new Among ( "le" , - 1 , - 1 ) ] ,
a _11 = [ new Among ( "ca" , - 1 , - 1 ) , new Among ( "ce" , - 1 , - 1 ) ] ,
2021-02-18 21:44:01 +01:00
a _12 = [
2021-02-18 22:21:36 +01:00
new Among ( "im" , - 1 , - 1 ) ,
new Among ( "um" , - 1 , - 1 ) ,
new Among ( "\u00FCm" , - 1 , - 1 ) ,
new Among ( "\u0131m" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _13 = [
2021-02-18 22:21:36 +01:00
new Among ( "sin" , - 1 , - 1 ) ,
new Among ( "sun" , - 1 , - 1 ) ,
new Among ( "s\u00FCn" , - 1 , - 1 ) ,
new Among ( "s\u0131n" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _14 = [
2021-02-18 22:21:36 +01:00
new Among ( "iz" , - 1 , - 1 ) ,
new Among ( "uz" , - 1 , - 1 ) ,
new Among ( "\u00FCz" , - 1 , - 1 ) ,
new Among ( "\u0131z" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _15 = [
2021-02-18 22:21:36 +01:00
new Among ( "siniz" , - 1 , - 1 ) ,
new Among ( "sunuz" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
new Among ( "s\u00FCn\u00FCz" , - 1 , - 1 ) ,
2021-02-18 22:21:36 +01:00
new Among ( "s\u0131n\u0131z" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
a _16 = [ new Among ( "lar" , - 1 , - 1 ) , new Among ( "ler" , - 1 , - 1 ) ] ,
2021-02-18 21:44:01 +01:00
a _17 = [
2021-02-18 22:21:36 +01:00
new Among ( "niz" , - 1 , - 1 ) ,
new Among ( "nuz" , - 1 , - 1 ) ,
new Among ( "n\u00FCz" , - 1 , - 1 ) ,
new Among ( "n\u0131z" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _18 = [
2021-02-18 22:21:36 +01:00
new Among ( "dir" , - 1 , - 1 ) ,
new Among ( "tir" , - 1 , - 1 ) ,
new Among ( "dur" , - 1 , - 1 ) ,
new Among ( "tur" , - 1 , - 1 ) ,
new Among ( "d\u00FCr" , - 1 , - 1 ) ,
new Among ( "t\u00FCr" , - 1 , - 1 ) ,
new Among ( "d\u0131r" , - 1 , - 1 ) ,
new Among ( "t\u0131r" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _19 = [
2021-02-18 22:21:36 +01:00
new Among ( "cas\u0131na" , - 1 , - 1 ) ,
new Among ( "cesine" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _20 = [
2021-02-18 22:21:36 +01:00
new Among ( "di" , - 1 , - 1 ) ,
new Among ( "ti" , - 1 , - 1 ) ,
new Among ( "dik" , - 1 , - 1 ) ,
new Among ( "tik" , - 1 , - 1 ) ,
new Among ( "duk" , - 1 , - 1 ) ,
new Among ( "tuk" , - 1 , - 1 ) ,
new Among ( "d\u00FCk" , - 1 , - 1 ) ,
new Among ( "t\u00FCk" , - 1 , - 1 ) ,
new Among ( "d\u0131k" , - 1 , - 1 ) ,
new Among ( "t\u0131k" , - 1 , - 1 ) ,
new Among ( "dim" , - 1 , - 1 ) ,
new Among ( "tim" , - 1 , - 1 ) ,
new Among ( "dum" , - 1 , - 1 ) ,
new Among ( "tum" , - 1 , - 1 ) ,
new Among ( "d\u00FCm" , - 1 , - 1 ) ,
new Among ( "t\u00FCm" , - 1 , - 1 ) ,
new Among ( "d\u0131m" , - 1 , - 1 ) ,
new Among ( "t\u0131m" , - 1 , - 1 ) ,
new Among ( "din" , - 1 , - 1 ) ,
new Among ( "tin" , - 1 , - 1 ) ,
new Among ( "dun" , - 1 , - 1 ) ,
new Among ( "tun" , - 1 , - 1 ) ,
new Among ( "d\u00FCn" , - 1 , - 1 ) ,
new Among ( "t\u00FCn" , - 1 , - 1 ) ,
new Among ( "d\u0131n" , - 1 , - 1 ) ,
new Among ( "t\u0131n" , - 1 , - 1 ) ,
new Among ( "du" , - 1 , - 1 ) ,
new Among ( "tu" , - 1 , - 1 ) ,
new Among ( "d\u00FC" , - 1 , - 1 ) ,
new Among ( "t\u00FC" , - 1 , - 1 ) ,
new Among ( "d\u0131" , - 1 , - 1 ) ,
new Among ( "t\u0131" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _21 = [
2021-02-18 22:21:36 +01:00
new Among ( "sa" , - 1 , - 1 ) ,
new Among ( "se" , - 1 , - 1 ) ,
new Among ( "sak" , - 1 , - 1 ) ,
new Among ( "sek" , - 1 , - 1 ) ,
new Among ( "sam" , - 1 , - 1 ) ,
new Among ( "sem" , - 1 , - 1 ) ,
new Among ( "san" , - 1 , - 1 ) ,
new Among ( "sen" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
a _22 = [
2021-02-18 22:21:36 +01:00
new Among ( "mi\u015F" , - 1 , - 1 ) ,
new Among ( "mu\u015F" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
new Among ( "m\u00FC\u015F" , - 1 , - 1 ) ,
2021-02-18 22:21:36 +01:00
new Among ( "m\u0131\u015F" , - 1 , - 1 ) ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
a _23 = [
new Among ( "b" , - 1 , 1 ) ,
new Among ( "c" , - 1 , 2 ) ,
new Among ( "d" , - 1 , 3 ) ,
new Among ( "\u011F" , - 1 , 4 ) ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
g _vowel = [
17 ,
65 ,
16 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
32 ,
8 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
1 ,
2021-02-18 21:44:01 +01:00
] ,
g _U = [
2021-02-18 22:21:36 +01:00
1 ,
16 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
8 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
1 ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
g _vowel1 = [
1 ,
64 ,
16 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
1 ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
g _vowel2 = [
17 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
130 ,
2021-02-18 21:44:01 +01:00
] ,
2021-02-18 22:21:36 +01:00
g _vowel3 = [
1 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
0 ,
1 ,
2021-02-18 21:44:01 +01:00
] ,
g _vowel4 = [ 17 ] ,
g _vowel5 = [ 65 ] ,
g _vowel6 = [ 65 ] ,
2021-02-18 22:21:36 +01:00
B _c _s _n _s ,
I _strlen ,
g _habr = [
2021-02-18 21:44:01 +01:00
[ "a" , g _vowel1 , 97 , 305 ] ,
[ "e" , g _vowel2 , 101 , 252 ] ,
[ "\u0131" , g _vowel3 , 97 , 305 ] ,
[ "i" , g _vowel4 , 101 , 105 ] ,
[ "o" , g _vowel5 , 111 , 117 ] ,
[ "\u00F6" , g _vowel6 , 246 , 252 ] ,
2021-02-18 22:21:36 +01:00
[ "u" , g _vowel5 , 111 , 117 ] ,
2021-02-18 21:44:01 +01:00
] ,
sbp = new SnowballProgram ( ) ;
2021-02-18 22:21:36 +01:00
this . setCurrent = function ( word ) {
2021-02-18 21:44:01 +01:00
sbp . setCurrent ( word ) ;
} ;
2021-02-18 22:21:36 +01:00
this . getCurrent = function ( ) {
2021-02-18 21:44:01 +01:00
return sbp . getCurrent ( ) ;
} ;
function habr1 ( g _v , n1 , n2 ) {
while ( true ) {
var v _1 = sbp . limit - sbp . cursor ;
if ( sbp . in _grouping _b ( g _v , n1 , n2 ) ) {
sbp . cursor = sbp . limit - v _1 ;
break ;
}
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( sbp . cursor <= sbp . limit _backward ) return false ;
2021-02-18 21:44:01 +01:00
sbp . cursor -- ;
}
return true ;
}
function r _check _vowel _harmony ( ) {
var v _1 , v _2 ;
v _1 = sbp . limit - sbp . cursor ;
habr1 ( g _vowel , 97 , 305 ) ;
for ( var i = 0 ; i < g _habr . length ; i ++ ) {
v _2 = sbp . limit - sbp . cursor ;
var habr = g _habr [ i ] ;
if ( sbp . eq _s _b ( 1 , habr [ 0 ] ) && habr1 ( habr [ 1 ] , habr [ 2 ] , habr [ 3 ] ) ) {
sbp . cursor = sbp . limit - v _1 ;
return true ;
}
sbp . cursor = sbp . limit - v _2 ;
}
sbp . cursor = sbp . limit - v _2 ;
if ( ! sbp . eq _s _b ( 1 , "\u00FC" ) || ! habr1 ( g _vowel6 , 246 , 252 ) )
return false ;
sbp . cursor = sbp . limit - v _1 ;
return true ;
}
function habr2 ( f1 , f2 ) {
var v _1 = sbp . limit - sbp . cursor ,
v _2 ;
if ( f1 ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( sbp . cursor > sbp . limit _backward ) {
sbp . cursor -- ;
v _2 = sbp . limit - sbp . cursor ;
if ( f2 ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
return true ;
}
}
}
sbp . cursor = sbp . limit - v _1 ;
if ( f1 ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
return false ;
}
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( sbp . cursor <= sbp . limit _backward ) return false ;
2021-02-18 21:44:01 +01:00
sbp . cursor -- ;
2021-02-18 22:21:36 +01:00
if ( ! f2 ( ) ) return false ;
2021-02-18 21:44:01 +01:00
sbp . cursor = sbp . limit - v _1 ;
return true ;
}
function habr3 ( f1 ) {
2021-02-18 22:21:36 +01:00
return habr2 ( f1 , function ( ) {
2021-02-18 21:44:01 +01:00
return sbp . in _grouping _b ( g _vowel , 97 , 305 ) ;
} ) ;
}
function r _mark _suffix _with _optional _n _consonant ( ) {
2021-02-18 22:21:36 +01:00
return habr3 ( function ( ) {
2021-02-18 21:44:01 +01:00
return sbp . eq _s _b ( 1 , "n" ) ;
} ) ;
}
function r _mark _suffix _with _optional _s _consonant ( ) {
2021-02-18 22:21:36 +01:00
return habr3 ( function ( ) {
2021-02-18 21:44:01 +01:00
return sbp . eq _s _b ( 1 , "s" ) ;
} ) ;
}
function r _mark _suffix _with _optional _y _consonant ( ) {
2021-02-18 22:21:36 +01:00
return habr3 ( function ( ) {
2021-02-18 21:44:01 +01:00
return sbp . eq _s _b ( 1 , "y" ) ;
} ) ;
}
function r _mark _suffix _with _optional _U _vowel ( ) {
2021-02-18 22:21:36 +01:00
return habr2 (
function ( ) {
return sbp . in _grouping _b ( g _U , 105 , 305 ) ;
} ,
function ( ) {
return sbp . out _grouping _b ( g _vowel , 97 , 305 ) ;
}
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _possessives ( ) {
2021-02-18 22:21:36 +01:00
return (
sbp . find _among _b ( a _0 , 10 ) && r _mark _suffix _with _optional _U _vowel ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _sU ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . in _grouping _b ( g _U , 105 , 305 ) &&
r _mark _suffix _with _optional _s _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _lArI ( ) {
return sbp . find _among _b ( a _1 , 2 ) ;
}
function r _mark _yU ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . in _grouping _b ( g _U , 105 , 305 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _nU ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _2 , 4 ) ;
}
function r _mark _nUn ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _3 , 4 ) &&
r _mark _suffix _with _optional _n _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _yA ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _4 , 2 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _nA ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _5 , 2 ) ;
}
function r _mark _DA ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _6 , 4 ) ;
}
function r _mark _ndA ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _7 , 2 ) ;
}
function r _mark _DAn ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _8 , 4 ) ;
}
function r _mark _ndAn ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _9 , 2 ) ;
}
function r _mark _ylA ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _10 , 2 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _ki ( ) {
return sbp . eq _s _b ( 2 , "ki" ) ;
}
function r _mark _ncA ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _11 , 2 ) &&
r _mark _suffix _with _optional _n _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _yUm ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _12 , 4 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _sUn ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _13 , 4 ) ;
}
function r _mark _yUz ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _14 , 4 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _sUnUz ( ) {
return sbp . find _among _b ( a _15 , 4 ) ;
}
function r _mark _lAr ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _16 , 2 ) ;
}
function r _mark _nUz ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _17 , 4 ) ;
}
function r _mark _DUr ( ) {
return r _check _vowel _harmony ( ) && sbp . find _among _b ( a _18 , 8 ) ;
}
function r _mark _cAsInA ( ) {
return sbp . find _among _b ( a _19 , 2 ) ;
}
function r _mark _yDU ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _20 , 32 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _ysA ( ) {
2021-02-18 22:21:36 +01:00
return (
sbp . find _among _b ( a _21 , 8 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _ymUs _ ( ) {
2021-02-18 22:21:36 +01:00
return (
r _check _vowel _harmony ( ) &&
sbp . find _among _b ( a _22 , 4 ) &&
r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function r _mark _yken ( ) {
2021-02-18 22:21:36 +01:00
return (
sbp . eq _s _b ( 3 , "ken" ) && r _mark _suffix _with _optional _y _consonant ( )
) ;
2021-02-18 21:44:01 +01:00
}
function habr4 ( ) {
var v _1 = sbp . limit - sbp . cursor ;
if ( ! r _mark _ymUs _ ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _yDU ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _ysA ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _yken ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
}
}
return false ;
}
function habr5 ( ) {
if ( r _mark _cAsInA ( ) ) {
var v _1 = sbp . limit - sbp . cursor ;
if ( ! r _mark _sUnUz ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _lAr ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _yUm ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _sUn ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _yUz ( ) ) sbp . cursor = sbp . limit - v _1 ;
2021-02-18 21:44:01 +01:00
}
}
}
}
2021-02-18 22:21:36 +01:00
if ( r _mark _ymUs _ ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
return true ;
}
function habr6 ( ) {
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
var v _1 = sbp . limit - sbp . cursor ;
sbp . ket = sbp . cursor ;
if ( ! r _mark _DUr ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _yDU ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _ysA ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _ymUs _ ( ) ) sbp . cursor = sbp . limit - v _1 ;
2021-02-18 21:44:01 +01:00
}
}
}
B _c _s _n _s = false ;
return false ;
}
return true ;
}
function habr7 ( ) {
2021-02-18 22:21:36 +01:00
if ( ! r _mark _nUz ( ) ) return true ;
2021-02-18 21:44:01 +01:00
var v _1 = sbp . limit - sbp . cursor ;
if ( ! r _mark _yDU ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _ysA ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
return false ;
}
function habr8 ( ) {
var v _1 = sbp . limit - sbp . cursor ,
v _2 ;
if ( ! r _mark _sUnUz ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _yUz ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _sUn ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _yUm ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
}
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
v _2 = sbp . limit - sbp . cursor ;
sbp . ket = sbp . cursor ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _ymUs _ ( ) ) sbp . cursor = sbp . limit - v _2 ;
2021-02-18 21:44:01 +01:00
return false ;
}
function r _stem _nominal _verb _suffixes ( ) {
var v _1 = sbp . limit - sbp . cursor ,
v _2 ;
sbp . ket = sbp . cursor ;
B _c _s _n _s = true ;
if ( habr4 ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( habr5 ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( habr6 ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( habr7 ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( habr8 ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _DUr ( ) ) return ;
2021-02-18 21:44:01 +01:00
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
v _2 = sbp . limit - sbp . cursor ;
if ( ! r _mark _sUnUz ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
if ( ! r _mark _lAr ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
if ( ! r _mark _yUm ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
if ( ! r _mark _sUn ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _yUz ( ) ) sbp . cursor = sbp . limit - v _2 ;
2021-02-18 21:44:01 +01:00
}
}
}
}
2021-02-18 22:21:36 +01:00
if ( ! r _mark _ymUs _ ( ) ) sbp . cursor = sbp . limit - v _2 ;
2021-02-18 21:44:01 +01:00
}
}
}
}
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
}
function r _stem _suffix _chain _before _ki ( ) {
var v _1 , v _2 , v _3 , v _4 ;
sbp . ket = sbp . cursor ;
if ( r _mark _ki ( ) ) {
v _1 = sbp . limit - sbp . cursor ;
if ( r _mark _DA ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
v _2 = sbp . limit - sbp . cursor ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
} else {
sbp . cursor = sbp . limit - v _2 ;
if ( r _mark _possessives ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
}
}
return true ;
}
sbp . cursor = sbp . limit - v _1 ;
if ( r _mark _nUn ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
v _3 = sbp . limit - sbp . cursor ;
if ( r _mark _lArI ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
} else {
sbp . cursor = sbp . limit - v _3 ;
sbp . ket = sbp . cursor ;
if ( ! r _mark _possessives ( ) ) {
sbp . cursor = sbp . limit - v _3 ;
if ( ! r _mark _sU ( ) ) {
sbp . cursor = sbp . limit - v _3 ;
2021-02-18 22:21:36 +01:00
if ( ! r _stem _suffix _chain _before _ki ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
2021-02-18 22:21:36 +01:00
r _stem _suffix _chain _before _ki ( ) ;
2021-02-18 21:44:01 +01:00
}
}
return true ;
}
sbp . cursor = sbp . limit - v _1 ;
if ( r _mark _ndA ( ) ) {
v _4 = sbp . limit - sbp . cursor ;
if ( r _mark _lArI ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
} else {
sbp . cursor = sbp . limit - v _4 ;
if ( r _mark _sU ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
} else {
sbp . cursor = sbp . limit - v _4 ;
2021-02-18 22:21:36 +01:00
if ( ! r _stem _suffix _chain _before _ki ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
}
return true ;
}
}
return false ;
}
function habr9 ( v _1 ) {
sbp . ket = sbp . cursor ;
if ( ! r _mark _ndA ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _nA ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
var v _2 = sbp . limit - sbp . cursor ;
if ( r _mark _lArI ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
} else {
sbp . cursor = sbp . limit - v _2 ;
if ( r _mark _sU ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
} else {
sbp . cursor = sbp . limit - v _2 ;
2021-02-18 22:21:36 +01:00
if ( ! r _stem _suffix _chain _before _ki ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
}
return true ;
}
function habr10 ( v _1 ) {
sbp . ket = sbp . cursor ;
if ( ! r _mark _ndAn ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _nU ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
var v _2 = sbp . limit - sbp . cursor ;
if ( ! r _mark _sU ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _lArI ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
return true ;
}
function habr11 ( ) {
var v _1 = sbp . limit - sbp . cursor ,
v _2 ;
sbp . ket = sbp . cursor ;
if ( ! r _mark _nUn ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _ylA ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
v _2 = sbp . limit - sbp . cursor ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
2021-02-18 22:21:36 +01:00
if ( r _stem _suffix _chain _before _ki ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
sbp . cursor = sbp . limit - v _2 ;
sbp . ket = sbp . cursor ;
if ( ! r _mark _possessives ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
if ( ! r _mark _sU ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
2021-02-18 22:21:36 +01:00
if ( ! r _stem _suffix _chain _before _ki ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
return true ;
}
function habr12 ( ) {
var v _1 = sbp . limit - sbp . cursor ,
2021-02-18 22:21:36 +01:00
v _2 ,
v _3 ;
2021-02-18 21:44:01 +01:00
sbp . ket = sbp . cursor ;
if ( ! r _mark _DA ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
if ( ! r _mark _yU ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _yA ( ) ) return false ;
2021-02-18 21:44:01 +01:00
}
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
v _2 = sbp . limit - sbp . cursor ;
if ( r _mark _possessives ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
v _3 = sbp . limit - sbp . cursor ;
sbp . ket = sbp . cursor ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _lAr ( ) ) sbp . cursor = sbp . limit - v _3 ;
2021-02-18 21:44:01 +01:00
} else {
sbp . cursor = sbp . limit - v _2 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _lAr ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
r _stem _suffix _chain _before _ki ( ) ;
return true ;
}
function r _stem _noun _suffixes ( ) {
var v _1 = sbp . limit - sbp . cursor ,
2021-02-18 22:21:36 +01:00
v _2 ,
v _3 ;
2021-02-18 21:44:01 +01:00
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
return ;
}
sbp . cursor = sbp . limit - v _1 ;
sbp . ket = sbp . cursor ;
if ( r _mark _ncA ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
v _2 = sbp . limit - sbp . cursor ;
sbp . ket = sbp . cursor ;
if ( r _mark _lArI ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
} else {
sbp . cursor = sbp . limit - v _2 ;
sbp . ket = sbp . cursor ;
if ( ! r _mark _possessives ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
if ( ! r _mark _sU ( ) ) {
sbp . cursor = sbp . limit - v _2 ;
sbp . ket = sbp . cursor ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _lAr ( ) ) return ;
2021-02-18 21:44:01 +01:00
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
2021-02-18 22:21:36 +01:00
if ( ! r _stem _suffix _chain _before _ki ( ) ) return ;
2021-02-18 21:44:01 +01:00
}
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
}
return ;
}
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( habr9 ( v _1 ) ) return ;
2021-02-18 21:44:01 +01:00
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( habr10 ( v _1 ) ) return ;
2021-02-18 21:44:01 +01:00
sbp . cursor = sbp . limit - v _1 ;
sbp . ket = sbp . cursor ;
if ( r _mark _DAn ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
v _3 = sbp . limit - sbp . cursor ;
if ( r _mark _possessives ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
} else {
sbp . cursor = sbp . limit - v _3 ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
} else {
sbp . cursor = sbp . limit - v _3 ;
r _stem _suffix _chain _before _ki ( ) ;
}
}
return ;
}
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( habr11 ( ) ) return ;
2021-02-18 21:44:01 +01:00
sbp . cursor = sbp . limit - v _1 ;
if ( r _mark _lArI ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
return ;
}
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( r _stem _suffix _chain _before _ki ( ) ) return ;
2021-02-18 21:44:01 +01:00
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( habr12 ( ) ) return ;
2021-02-18 21:44:01 +01:00
sbp . cursor = sbp . limit - v _1 ;
sbp . ket = sbp . cursor ;
if ( ! r _mark _possessives ( ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! r _mark _sU ( ) ) return ;
2021-02-18 21:44:01 +01:00
}
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
sbp . ket = sbp . cursor ;
if ( r _mark _lAr ( ) ) {
sbp . bra = sbp . cursor ;
sbp . slice _del ( ) ;
r _stem _suffix _chain _before _ki ( ) ;
}
}
function r _post _process _last _consonants ( ) {
var among _var ;
sbp . ket = sbp . cursor ;
among _var = sbp . find _among _b ( a _23 , 4 ) ;
if ( among _var ) {
sbp . bra = sbp . cursor ;
switch ( among _var ) {
case 1 :
sbp . slice _from ( "p" ) ;
break ;
case 2 :
sbp . slice _from ( "\u00E7" ) ;
break ;
case 3 :
sbp . slice _from ( "t" ) ;
break ;
case 4 :
sbp . slice _from ( "k" ) ;
break ;
}
}
}
function habr13 ( ) {
while ( true ) {
var v _1 = sbp . limit - sbp . cursor ;
if ( sbp . in _grouping _b ( g _vowel , 97 , 305 ) ) {
sbp . cursor = sbp . limit - v _1 ;
break ;
}
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( sbp . cursor <= sbp . limit _backward ) return false ;
2021-02-18 21:44:01 +01:00
sbp . cursor -- ;
}
return true ;
}
function habr14 ( v _1 , c1 , c2 ) {
sbp . cursor = sbp . limit - v _1 ;
if ( habr13 ( ) ) {
var v _2 = sbp . limit - sbp . cursor ;
if ( ! sbp . eq _s _b ( 1 , c1 ) ) {
sbp . cursor = sbp . limit - v _2 ;
2021-02-18 22:21:36 +01:00
if ( ! sbp . eq _s _b ( 1 , c2 ) ) return true ;
2021-02-18 21:44:01 +01:00
}
sbp . cursor = sbp . limit - v _1 ;
var c = sbp . cursor ;
sbp . insert ( sbp . cursor , sbp . cursor , c2 ) ;
sbp . cursor = c ;
return false ;
}
return true ;
}
function r _append _U _to _stems _ending _with _d _or _g ( ) {
var v _1 = sbp . limit - sbp . cursor ;
if ( ! sbp . eq _s _b ( 1 , "d" ) ) {
sbp . cursor = sbp . limit - v _1 ;
2021-02-18 22:21:36 +01:00
if ( ! sbp . eq _s _b ( 1 , "g" ) ) return ;
2021-02-18 21:44:01 +01:00
}
if ( habr14 ( v _1 , "a" , "\u0131" ) )
if ( habr14 ( v _1 , "e" , "i" ) )
2021-02-18 22:21:36 +01:00
if ( habr14 ( v _1 , "o" , "u" ) ) habr14 ( v _1 , "\u00F6" , "\u00FC" ) ;
2021-02-18 21:44:01 +01:00
}
function r _more _than _one _syllable _word ( ) {
var v _1 = sbp . cursor ,
v _2 = 2 ,
v _3 ;
while ( true ) {
v _3 = sbp . cursor ;
while ( ! sbp . in _grouping ( g _vowel , 97 , 305 ) ) {
if ( sbp . cursor >= sbp . limit ) {
sbp . cursor = v _3 ;
2021-02-18 22:21:36 +01:00
if ( v _2 > 0 ) return false ;
2021-02-18 21:44:01 +01:00
sbp . cursor = v _1 ;
return true ;
}
sbp . cursor ++ ;
}
v _2 -- ;
}
}
function habr15 ( v _1 , n1 , c1 ) {
while ( ! sbp . eq _s ( n1 , c1 ) ) {
2021-02-18 22:21:36 +01:00
if ( sbp . cursor >= sbp . limit ) return true ;
2021-02-18 21:44:01 +01:00
sbp . cursor ++ ;
}
I _strlen = n1 ;
2021-02-18 22:21:36 +01:00
if ( I _strlen != sbp . limit ) return true ;
2021-02-18 21:44:01 +01:00
sbp . cursor = v _1 ;
return false ;
}
function r _is _reserved _word ( ) {
var v _1 = sbp . cursor ;
if ( habr15 ( v _1 , 2 , "ad" ) ) {
sbp . cursor = v _1 ;
2021-02-18 22:21:36 +01:00
if ( habr15 ( v _1 , 5 , "soyad" ) ) return false ;
2021-02-18 21:44:01 +01:00
}
return true ;
}
function r _postlude ( ) {
var v _1 = sbp . cursor ;
2021-02-18 22:21:36 +01:00
if ( r _is _reserved _word ( ) ) return false ;
2021-02-18 21:44:01 +01:00
sbp . limit _backward = v _1 ;
sbp . cursor = sbp . limit ;
r _append _U _to _stems _ending _with _d _or _g ( ) ;
sbp . cursor = sbp . limit ;
r _post _process _last _consonants ( ) ;
return true ;
}
2021-02-18 22:21:36 +01:00
this . stem = function ( ) {
2021-02-18 21:44:01 +01:00
if ( r _more _than _one _syllable _word ( ) ) {
sbp . limit _backward = sbp . cursor ;
sbp . cursor = sbp . limit ;
r _stem _nominal _verb _suffixes ( ) ;
sbp . cursor = sbp . limit ;
if ( B _c _s _n _s ) {
r _stem _noun _suffixes ( ) ;
sbp . cursor = sbp . limit _backward ;
2021-02-18 22:21:36 +01:00
if ( r _postlude ( ) ) return true ;
2021-02-18 21:44:01 +01:00
}
}
return false ;
2021-02-18 22:21:36 +01:00
} ;
} ) ( ) ;
2021-02-18 21:44:01 +01:00
/* and return a function that stems a word for the current locale */
2021-02-18 22:21:36 +01:00
return function ( token ) {
2021-02-18 21:44:01 +01:00
// for lunr version 2
if ( typeof token . update === "function" ) {
2021-02-18 22:21:36 +01:00
return token . update ( function ( word ) {
2021-02-18 21:44:01 +01:00
st . setCurrent ( word ) ;
st . stem ( ) ;
return st . getCurrent ( ) ;
2021-02-18 22:21:36 +01:00
} ) ;
} else {
// for lunr version <= 1
2021-02-18 21:44:01 +01:00
st . setCurrent ( token ) ;
st . stem ( ) ;
return st . getCurrent ( ) ;
}
2021-02-18 22:21:36 +01:00
} ;
2021-02-18 21:44:01 +01:00
} ) ( ) ;
2021-02-18 22:21:36 +01:00
lunr . Pipeline . registerFunction ( lunr . tr . stemmer , "stemmer-tr" ) ;
2021-02-18 21:44:01 +01:00
2021-02-18 22:21:36 +01:00
lunr . tr . stopWordFilter = lunr . generateStopWordFilter (
"acaba altmı ş altı ama ancak arada aslı nda ayrı ca bana bazı belki ben benden beni benim beri beş bile bin bir biri birkaç birkez birçok birşey birşeyi biz bizden bize bizi bizim bu buna bunda bundan bunlar bunları bunları n bunu bunun burada böyle böylece da daha dahi de defa değil diye diğer doksan dokuz dolayı dolayı sı yla dört edecek eden ederek edilecek ediliyor edilmesi ediyor elli en etmesi etti ettiği ettiğini eğer gibi göre halen hangi hatta hem henüz hep hepsi her herhangi herkesin hiç hiçbir iki ile ilgili ise itibaren itibariyle için işte kadar karşı n katrilyon kendi kendilerine kendini kendisi kendisine kendisini kez ki kim kimden kime kimi kimse kı rk milyar milyon mu mü mı nası l ne neden nedenle nerde nerede nereye niye niçin o olan olarak oldu oldukları nı olduğu olduğunu olmadı olmadı ğı olmak olması olmayan olmaz olsa olsun olup olur olursa oluyor on ona ondan onlar onlardan onları onları n onu onun otuz oysa pek rağmen sadece sanki sekiz seksen sen senden seni senin siz sizden sizi sizin tarafı ndan trilyon tüm var vardı ve veya ya yani yapacak yapmak yaptı yaptı kları yaptı ğı yaptı ğı nı yapı lan yapı lması yapı yor yedi yerine yetmiş yine yirmi yoksa yüz zaten çok çünkü öyle üzere üç şey şeyden şeyi şeyler şu şuna şunda şundan şunları şunu şöyle" . split (
" "
)
) ;
2021-02-18 21:44:01 +01:00
2021-02-18 22:21:36 +01:00
lunr . Pipeline . registerFunction ( lunr . tr . stopWordFilter , "stopWordFilter-tr" ) ;
2021-02-18 21:44:01 +01:00
} ;
2021-02-18 22:21:36 +01:00
} ) ;