XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] [ANN] New release mathling XQuery libraries

See https://balisage.net/Proceedings/vol26/html/Holstege01/BalisageVol26-Holstege01.html

On 3/8/22 11:54, Roger L Costello wrote:
Mary emailed me how to run XQuery from the command line, using Saxon:

java -Xss32m -Xmn32m net.sf.saxon.Query -traceout:#err -opt:-gl -q:examples/compile.xqy

Mary's compile.xqy takes a file containing this input:

1	I	I	pronoun
2	me	me	pronoun
3	mine	mine	pronoun
4	my	my	pronoun
5	myself	myself	pronoun
6	you	you	pronoun
7	your	your	pronoun
8	yours	yours	pronoun
9	yourself	yourself	pronoun
10	yourselves	yourselves	pronoun
11	he	he	pronoun
12	him	him	pronoun
....... (lots more)

And generates the below JSON. Mary, would you describe what the JSON is showing? And what is a trie?  /Roger

{
     "entities": [
         {
             "word": "I",
             "normalized": "I",
             "type": "pronoun",
             "id": "1"
         },
         {
             "word": "me",
             "normalized": "me",
             "type": "pronoun",
             "id": "2"
         },
         {
             "word": "mine",
             "normalized": "mine",
             "type": "pronoun",
             "id": "3"
         },
         {
             "word": "my",
             "normalized": "my",
             "type": "pronoun",
             "id": "4"
         },
        ..... (much more)
        ],
     "trie": {
         "root": 1,
         "states": {
             "0": {},
             "32": {
                 "emits": {
                     "himself": [14]
                 },
                 "output": 1,
                 "success": {},
                 "depth": 7,
                 "failure": 1,
                 "id": 32
             },
             "64": {
                 "emits": {
                     "them": [28]
                 },
                 "output": 3,
                 "success": {},
                 "depth": 4,
                 "failure": 3,
                 "id": 64
             },
             ...... (more)
             },
         "config": {
             "unicode-normalization": "none",
             "case-insensitive": false
         },
         "num-states": 272,
         "size-map": {
             "yours": 5,
             "a": 1,
             "hasn't": 6,
             "were": 4,
             "against": 7,
             "herself": 7,
             "doesn't": 7,
             "anything": 8,
             "done": 4,
             "won't": 5,
             "be": 2,
             "theirselves": 11,
             "having": 6,
             "noone": 5,
             "in": 2,
             "things": 6,
             "with": 4,
             "one": 3,
             "wouldn't": 8,
             "that": 4,
             "ours": 4,
             "between": 7,
             "its": 3,
             "without": 7,
             "go": 2,
             "have": 4,
             "they": 4,
             "shouldn't": 9,
             "I": 1,
             "was": 3,
             "is": 2,
             "within": 6,
             "do": 2,
             "it": 2,
             "had": 3,
             "am": 2,
             "been": 4,
             "got": 3,
             "my": 2,
             "our": 3,
             "him": 3,
             "an": 2,
             "nothing": 7,
             "thing": 5,
             "we": 2,
             "she": 3,
             "don't": 5,
             "hadn't": 6,
             "gotten": 6,
             "the": 3,
             "isn't": 5,
             "someone": 7,
             "his": 3,
             "will": 4,
             "at": 2,
             "your": 4,
             "mine": 4,
             "should": 6,
             "haven't": 7,
             "over": 4,
             "some": 4,
             "went": 4,
             "atop": 4,
             "are": 3,
             "would": 5,
             "her": 3,
             "whether": 7,
             "get": 3,
             "ourselves": 9,
             "goes": 4,
             "by": 2,
             "of": 2,
             "itself": 6,
             "himself": 7,
             "me": 2,
             "under": 5,
             "myself": 6,
             "theirs": 6,
             "does": 4,
             "besides": 7,
             "beside": 6,
             "something": 9,
             "weren't": 7,
             "anyone": 6,
             "their": 5,
             "has": 3,
             "to": 2,
             "beneath": 7,
             "didn't": 6,
             "after": 5,
             "them": 4,
             "among": 5,
             "he": 2,
             "which": 5,
             "amongst": 7,
             "yourselves": 10,
             "above": 5,
             "gets": 4,
             "us": 2,
             "who": 3,
             "hers": 4,
             "you": 3,
             "did": 3,
             "across": 6,
             "gone": 4,
             "on": 2,
             "yourself": 8,
             "before": 6
         },
         "num-keywords": 108,
         "constructed-failure-states": true
     }
}

-----Original Message-----
From: Roger L Costello <costello@mitre.org>
Sent: Tuesday, March 8, 2022 2:18 PM
To: Mary Holstege <holstege@mathling.com>; xml-dev <xml-dev@lists.xml.org>
Subject: [xml-dev] [ANN] New release mathling XQuery libraries

Hi Mary,

Congratulations! That is an amazing collection of functions.

I'd like to give some of your functions a test drive. How about the compile.xqy file in the examples folder. I have it open in Oxygen XML. How do I execute it? (Sorry, I haven't done anything with XQuery in many years.)

/Roger

-----Original Message-----
From: Mary Holstege <holstege@mathling.com>
Sent: Tuesday, March 8, 2022 1:25 PM
To: xml-dev <xml-dev@lists.xml.org>
Subject: [EXT] [xml-dev] [ANN] New release mathling XQuery libraries


Announcing the 20220308 release of my art support XQuery libraries.

Full details here: https://mathling.com/code/art/README.html

Licensing: Generally licensed as CC-BY
(https://creativecommons.org/licenses/by/4.0/) although some of the code
is ports of BSD/MIT libraries.

What's in it? There's a lot, and I've been steadily porting/cleaning up
more of my older code to share, and adding more tests and docs.

Random distributions: uniform, normal, skewed normal, Zipf, Bernoulli,
Poisson, binomial Poisson, adhoc weighted, simple Markov chains

Basic geometric objects (points, ellipses, Bezier paths, polygons, etc)
and basic operations over them (affines, projections, some
containment/intersection, areas, lengths, splines). Some limited support
for solid geometry as well.

Arrangements: grids, arcs, spirals, helixes; simple graph layout,
Delaunay/Voronoi triangulation,  binary split trees, treemaps

Isohedral tiling (port of tactile.js)

Raw image read/write/dither.

Drawing of geometric objects to SVG  (or my domain-specific language,
but I'm not sharing the rats nest that is my stylesheets yet, so that
will be of limited value to anyone else)

Standard collection of SVG gradients and filters (plus hooks to Inkscape
filters, but you have to install Inkscape yourself for that) and
libraries for combining/altering them.

Colour space conversions, tonemapping

Noise functions: Open Simplex, Perlin, Worley, value, various flavours
of fractal noise, various noise modifiers

Signed distance functions for various 2D and 3D shapes plus ray casting
support based on SDF functions plus rendering functions

Some higher-level components such as L-systems, flow fields, modulated
torus knots

Aho-Corasick string matching

Tested on Saxon 10.6 (some advanced stuff depends on Saxon-PE, although
I've tried to encapsulate those parts)

Definitely requires XQuery 3.1

Happy hacking

//Mary


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS