Skip to main content
100%

Looking up words in the OED with XQuery

✓ Published0🌍 Public
CCliffordAnderson
Last edited Jan 13, 2017
Created on Jan 13, 2017

This example demonstrates a playful text-rewriting process where each word in a sentence is replaced by a synonym retrieved from the Oxford Dictionaries API. It begins by sending two HTTP requests to the Oxford Dictionaries API endpoints for word definitions and synonyms, then defines a custom XQuery function that isolates the first synonym for a given word. The main logic tokenizes the input sentence and applies this synonym-lookup function iteratively, finally rejoining the substituted words into a new sentence. The visualization relies on XQuery’s HTTP client capabilities for API interaction and string manipulation functions to process the text, with no graphical rendering involved.

AI-generated description

Similar vizzes