Created
December 21, 2015 08:35
-
-
Save ableasdale/cf43e91d98767c4cbd5b to your computer and use it in GitHub Desktop.
Tokenize a large file of individual strings (line by line) and create an XQuery sequence
This file contains hidden or 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 "1.0-ml"; | |
| (: Take the 3esl.txt file and create a sequence of words :) | |
| declare variable $file := xdmp:document-get("https://path-to-your/3esl.txt"); | |
| let $words := for $i in fn:tokenize($file,"\r?\n") | |
| return concat('"',$i, '"') | |
| return string-join($words,",") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment