<commit_before>xquery version "3.0";
(:~
 : eXist-db utility module functions
 :
 : @see http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util&location=java:org.exist.xquery.functions.util.UtilModule&details=true
 :)
module namespace util = "http://exist-db.org/xquery/util";

declare namespace a = "http://reecedunn.co.uk/xquery/annotations";
declare namespace o = "http://reecedunn.co.uk/xquery/options";

declare %a:since("exist", "4.4") function util:absolute-resource-id($node-or-path as item()) as xs:integer? external;
declare %a:since("exist", "4.4") function util:base-to-integer($number as item(), $base as xs:integer) as xs:integer external;
declare %a:since("exist", "4.4") function util:base64-decode($string as xs:string?) as xs:string? external;
declare %a:since("exist", "4.4") function util:base64-encode($string as xs:string?) as xs:string? external;
declare %a:since("exist", "4.4") function util:base64-encode($string as xs:string?, $trim as xs:boolean) as xs:string? external;
declare %a:since("exist", "4.4") function util:binary-doc($binary-resource as xs:string?) as xs:base64Binary? external;
declare %a:since("exist", "4.4") function util:binary-doc-available($binary-resource as xs:string?) as xs:boolean external;
declare %a:since("exist", "4.4") function util:binary-to-string($binary-resource as xs:base64Binary?) as xs:string? external;
declare %a:since("exist", "4.4") function util:binary-to-string($binary-resource as xs:base64Binary?, $encoding as xs:string) as xs:string? external;
declare %a:since("exist", "4.4") function util:call($function-reference as function(*), $parameters as item()*) as item()* external;
declare %a:since("exist", "4.4") %a:deprecated("exist", "4.4") (:%a:see-also("xquery 3.0", "try/catch expression"):) function util:catch($java-classnames as xs:string+, $try-code-blocks as item()*, $catch-code-blocks as item()*) as item()* external;
declare %a:since("exist", "4.4") function util:collations() as xs:string* external;
declare %a:since("exist", "4.4") function util:collection-name($node-or-path-string as item()?) as xs:string? external;
declare %a:since("exist", "4.4") function util:compile($expression as xs:string) as xs:string external;
declare %a:since("exist", "4.4") function util:compile($expression as xs:string, $module-load-path as xs:string) as xs:string external;
declare %a:since("exist", "4.4") function util:compile-query($expression as xs:string, $module-load-path as xs:string?) as element() external;
declare %a:since("exist", "4.4") function util:declare-namespace($prefix as xs:string, $namespace-uri as xs:anyURI) as item() external;
declare %a:since("exist", "4.4") function util:declare-option($name as xs:string, $option as xs:string) as item() external;
declare %a:since("exist", "4.4") function util:declared-variables($namespace-uri as xs:string) as xs:string+ external;
declare %a:since("exist", "4.4") function util:deep-copy($item as item()?) as item()? external;
declare %a:since("exist", "4.4") %a:deprecated("exist", "4.4") %a:see-also("exist", "4.4", "inspect:inspect-function") function util:describe-function($function-name as xs:QName) as node() external;
declare %a:since("exist", "4.4") function util:disable-profiling() as item() external;
declare %a:since("exist", "4.4") function util:doctype($doctype as xs:string+) as node()* external;
declare %a:since("exist", "4.4") function util:document-id($node-or-path as item()) as xs:int? external;
declare %a:since("exist", "4.4") function util:document-name($node-or-path as item()) as xs:string? external;
declare %a:since("exist", "4.4") function util:enable-profiling($verbosity as xs:int) as item() external;
declare %a:since("exist", "4.4") function util:eval($expression as item()) as node()* external;
declare %a:since("exist", "4.4") function util:eval($expression as item(), $cache-flag as xs:boolean) as node()* external;
declare %a:since("exist", "4.4") function util:eval($expression as item(), $cache-flag as xs:boolean, $external-variable as xs:anyType*) as node()* external;
declare %a:since("exist", "4.4") function util:eval-async($expression as item()) as node()* external;
declare %a:since("exist", "4.4") function util:eval-inline($inline-context as item()*, $expression as item()) as item()* external;<commit_msg>Document the new eXist-db 4.6 functions.<commit_after>xquery version "3.0";
(:~
 : eXist-db utility module functions
 :
 : @see http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util&location=java:org.exist.xquery.functions.util.UtilModule&details=true
 :)
module namespace util = "http://exist-db.org/xquery/util";

declare namespace a = "http://reecedunn.co.uk/xquery/annotations";
declare namespace o = "http://reecedunn.co.uk/xquery/options";

declare %a:since("exist", "4.4") function util:absolute-resource-id($node-or-path as item()) as xs:integer? external;
declare %a:since("exist", "4.4") function util:base-to-integer($number as item(), $base as xs:integer) as xs:integer external;
declare %a:since("exist", "4.4") function util:base64-decode($string as xs:string?) as xs:string? external;
declare %a:since("exist", "4.4") function util:base64-encode($string as xs:string?) as xs:string? external;
declare %a:since("exist", "4.4") function util:base64-encode($string as xs:string?, $trim as xs:boolean) as xs:string? external;
declare %a:since("exist", "4.4") function util:binary-doc($binary-resource as xs:string?) as xs:base64Binary? external;
declare %a:since("exist", "4.4") function util:binary-doc-available($binary-resource as xs:string?) as xs:boolean external;
declare %a:since("exist", "4.6") function util:binary-doc-content-digest($binary-resource as xs:string?, $algorithm as xs:string) as xs:hexBinary? external;
declare %a:since("exist", "4.4") function util:binary-to-string($binary-resource as xs:base64Binary?) as xs:string? external;
declare %a:since("exist", "4.4") function util:binary-to-string($binary-resource as xs:base64Binary?, $encoding as xs:string) as xs:string? external;
declare %a:since("exist", "4.4") function util:call($function-reference as function(*), $parameters as item()*) as item()* external;
declare %a:since("exist", "4.4") %a:deprecated("exist", "4.4") function util:catch($java-classnames as xs:string+, $try-code-blocks as item()*, $catch-code-blocks as item()*) as item()* external;
declare %a:since("exist", "4.4") function util:collations() as xs:string* external;
declare %a:since("exist", "4.4") function util:collection-name($node-or-path-string as item()?) as xs:string? external;
declare %a:since("exist", "4.4") function util:compile($expression as xs:string) as xs:string external;
declare %a:since("exist", "4.4") function util:compile($expression as xs:string, $module-load-path as xs:string) as xs:string external;
declare %a:since("exist", "4.4") function util:compile-query($expression as xs:string, $module-load-path as xs:string?) as element() external;
declare %a:since("exist", "4.4") function util:declare-namespace($prefix as xs:string, $namespace-uri as xs:anyURI) as item() external;
declare %a:since("exist", "4.4") function util:declare-option($name as xs:string, $option as xs:string) as item() external;
declare %a:since("exist", "4.4") function util:declared-variables($namespace-uri as xs:string) as xs:string+ external;
declare %a:since("exist", "4.4") function util:deep-copy($item as item()?) as item()? external;
declare %a:since("exist", "4.4") %a:deprecated("exist", "4.4") %a:see-also("exist", "4.4", "inspect:inspect-function") function util:describe-function($function-name as xs:QName) as node() external;
declare %a:since("exist", "4.4") function util:disable-profiling() as item() external;
declare %a:since("exist", "4.4") function util:doctype($doctype as xs:string+) as node()* external;
declare %a:since("exist", "4.4") function util:document-id($node-or-path as item()) as xs:int? external;
declare %a:since("exist", "4.4") function util:document-name($node-or-path as item()) as xs:string? external;
declare %a:since("exist", "4.4") function util:enable-profiling($verbosity as xs:int) as item() external;
declare %a:since("exist", "4.4") function util:eval($expression as item()) as node()* external;
declare %a:since("exist", "4.4") function util:eval($expression as item(), $cache-flag as xs:boolean) as node()* external;
declare %a:since("exist", "4.4") function util:eval($expression as item(), $cache-flag as xs:boolean, $external-variable as xs:anyType*) as node()* external;
declare %a:since("exist", "4.4") function util:eval($expression as item()) as node()* external;
declare %a:since("exist", "4.6") function util:eval-and-serialize($expression as item(), $default-serialization-params as item()?) as node()* external;
declare %a:since("exist", "4.6") function util:eval-and-serialize($expression as item(), $default-serialization-params as item()?, $starting-loc as xs:double) as node()* external;
declare %a:since("exist", "4.6") function util:eval-and-serialize($expression as item(), $default-serialization-params as item()?, $starting-loc as xs:double, $length as xs:double) as node()* external;
declare %a:since("exist", "4.4") function util:eval-inline($inline-context as item()*, $expression as item()) as item()* external;
{'fraction_non_alphanumeric': 0.18877660718125133, 'fraction_numerical': 0.01892066222317781, 'mean_word_length': 7.146234676007006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2498390', 'n_tokens_mistral': 3163, 'n_tokens_neox': 2967, 'n_words': 821}