Last active
May 17, 2017 18:56
-
-
Save CliffordAnderson/ccc08dae693660d7aa1b8cf2708fd13d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
let $database := "vwwp_tei" | |
let $term := ("garden", "house") | |
let $options := map { "mode" : "all" } | |
return ft:search($database, $term, $options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
let $database := "vwwp_tei" | |
let $term := ("garden") | |
let $options := map { "fuzzy" : true() } | |
return ft:extract(ft:search($database, $term, $options)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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