Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $p in fn:collection("vwwp_tei")//tei:p
where $p contains text "garden" occurs at least 2 times
return $p
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $p in fn:collection("vwwp_tei")//tei:p
where $p contains text { "house", "garden"} all
return $p
xquery version "3.1";
let $database := "vwwp_tei"
let $term := ("garden", "house")
let $options := map { "mode" : "all" }
return ft:search($database, $term, $options)
xquery version "3.1";
let $database := "vwwp_tei"
let $term := ("garden")
let $options := map { "fuzzy" : true() }
return ft:extract(ft:search($database, $term, $options))
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
let $hits :=
for $hit in
ft:mark(
for $p in fn:collection("vwwp_tei")//text()
where $p contains text "garden" occurs at least 2 times
return $p
)
return
if ($hit instance of text()) then fn:normalize-space($hit)
else $hit
for tumbling window $w in $hits
start at $s when $s mod 6 = 1
return element hit {$w}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment