diff --git a/csv/langnames.csv b/csv/langnames.csv index 2a78976..8a46679 100644 --- a/csv/langnames.csv +++ b/csv/langnames.csv @@ -86,6 +86,7 @@ fa-x-fars,fars1256,перс. (диалект Фарси),Persian (Fars),Pers. (F fa-x-kshn,fars1255,перс. (кашан.),Persian (Kashan),Pers. (Kashan),Indo-European,Iranian,I assume this is the local dialect of Persian rather than the NW Iranian language of Kashan,33.99,51.48, fa-x-krmns,kerm1248,перс. (кирманшах.),Persian (Kermanshah),Pers. (Kerm.),Indo-European,Iranian,,34.314167,47.065, fi,finn1318,фин.,Finnish,Fin.,Uralic,Finnic,,64.7628,25.5577, +fin,finn1318,фин.,Finnish,Fin.,Uralic,Finnic,"Incorrect, to be replaced",64.7628,25.5577, fi-x-dial,finn1318,фин. (диал.),Finnish (dialectal),Fin. (dial.),Uralic,Finnic,,64.7628,25.5577, fr,stan1290,фр.,French,Fr.,Indo-European,Romance,,48.0,2.0, fro,oldf1239,ст.фр.,Old French,OFr.,Indo-European,Romance,,48.8,1.11, @@ -123,6 +124,7 @@ inc,indo1321,инд.,Indo-Aryan,IA,Indo-European,Indic,coordinates of country In inc-x-mid,midd1375,ср.инд.,Middle Indic,MInd.,Indo-European,Indic,coordinates of country India,21,78, inc-x-nnew,indo1324,северные новоиндийские диалекты,North New Indic dialects,North New Indic dialects,Indo-European,Indic,coordinates of Delhi,28.61,77.23, inc-x-old,sans1269,др.инд.,Old Indic,OInd.,Indo-European,Indic,,20.0,77.0, +inc-x-old-vaidika,vedi1234,вед.,Vedic,Ved.,Indo-European,Indic,,20.0,77.0, ine,indo1319,и.е.,Indo-European,IE,Indo-European,0,,-99,-99, inh,ingu1240,инг.,Ingush,Ing.,NE Caucasian,Nakh,,43.11,45.03, ira,iran1269,иран.,Iranian,Ir.,Indo-European,Iranian,,-99,-99, @@ -358,7 +360,7 @@ xbc,bact1239,кушан.,Bactrian,Bact.,Indo-European,Iranian,,36.81,66.85, xbo,bolg1250,булг.,Bulgar,Bulgar,Altaic,Turkic,,48.671481,42.729234, xcl,clas1249,арм.,Armenian,Arm.,Indo-European,Armenian,,38.592316,41.346422, xco,khwa1238,хорезм.,Khwarezmian,Khwar.,Indo-European,Iranian,,41.68,60.75, -xco-x-late,khwa1238,позднехорезм.,Late Khwarezmian,LKhwar.,Indo-European,Iranian,,,, +xco-x-late,khwa1238,позднехорезм.,Late Khwarezmian,LKhwar.,Indo-European,Iranian,coordinates of Khiva,41.381389,60.361111, xhu,hurr1240,хурр.,Hurrian,Hurr.,Hurro-Urartian,Hurro-Urartian,,40.7339,43.3154, xld,lydi1241,лид.,Lydian,Lyd.,Indo-European,Anatolian,,40,30, xln,0,алан.,Alanic,Alan.,Indo-European,Iranian,coordinates of Arkhyz,43.5603,41.2798, diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..5afb139 Binary files /dev/null and b/static/favicon.ico differ diff --git a/xq/make-mentioned-table.xq b/xq/make-mentioned-table.xq new file mode 100644 index 0000000..c952941 --- /dev/null +++ b/xq/make-mentioned-table.xq @@ -0,0 +1,49 @@ +declare namespace tei = "http://www.tei-c.org/ns/1.0"; +declare namespace abv = "http://ossetic-studies.org/ns/abaevdict"; + +import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm'; + +let $mentioned-index := doc('abaevdict_index/mentioned_en.xml') +let $lang-index := doc('abaevdict_index/langnames.xml') + +let $xml := + +{ + for $lang in $mentioned-index/lang-index[1]/lang + let $lang-id as xs:string := $lang/@id + let $lang-rec := $lang-index/csv[1]/record[code=$lang-id] + let $lang-ru as xs:string := $lang-rec/ru[1]/text() + let $lang-en as xs:string := $lang-rec/en[1]/text() + let $lang-lat as xs:float := $lang-rec/lat[1]/text() + let $lang-long as xs:float := $lang-rec/long[1]/text() + let $lang-family as xs:string := $lang-rec/family[1]/text() + let $lang-genus as xs:string := $lang-rec/genus[1]/text() + + for $word in $lang/word + let $text as xs:string:= $word/@text + + for $entry in $word/entry + let $entry-id as xs:string := $entry/@id + let $entry-text as xs:string := abv-m:entry-form-by-id($entry-id) + let $entry-gloss as xs:string := string-join(doc(`abaevdict_en/xml/{$entry-id}.xml`)/tei:entry[1]/tei:sense//text()) + let $entry-dialect as xs:string := doc(`abaevdict_en/xml/{$entry-id}.xml`)/tei:entry[1]/string(@xml:lang) + let $word-gloss as xs:string := string-join($entry/ref/gloss/string(@text), '; ') + return + {$text} + {$word-gloss} + {$lang-id} + {$lang-ru} + {$lang-en} + {$lang-family} + {$lang-genus} + {$entry-id} + {$entry-text} + {$entry-gloss} + {$entry-dialect} + {$lang-lat} + {$lang-long} + +} + + +return csv:serialize($xml, {'header': true()}) \ No newline at end of file diff --git a/xq/restx_dict_cached.xq b/xq/restx_dict_cached.xq index 041d990..d8d2d39 100644 --- a/xq/restx_dict_cached.xq +++ b/xq/restx_dict_cached.xq @@ -160,6 +160,16 @@ declare function page:invert-lang($lang as xs:string) as xs:string { if($lang = 'en') then 'ru' else 'en' }; +(: =============================================================== :) +(: ============================ FAVICON ========================== :) +(: =============================================================== :) + +declare %rest:path("/favicon.ico") + %rest:GET + function page:favicon() { + fetch:binary('../static/favicon.ico') + }; + (: =============================================================== :) (: ======================= SEARCH ENTRYPOINT ===================== :) (: =============================================================== :)