Hyphenation with XQuery
Tuesday, 4 June 2019 · 3 messages · last reply 20 Jun 2019
ZD
Zimmel, Daniel4 Jun 2019 10:26 #
Hi,
somewhat off-topic to BaseX, but I wonder if anybody already tried to port the TeX hyphenation algorithm to XQuery?
See for example this Python port:
https://nedbatchelder.com/code/modules/hyphenate.py
Quoted text · 1 line
>>> hyphenate_word("supercalifragilisticexpialidocious")
['su', 'per', 'cal', 'ifrag', 'ilis', 'tic', 'ex', 'pi', 'ali', 'do', 'cious']
Best, Daniel
CG
Christian Grün19 Jun 2019 09:55 #
Hi Daniel,
I’m not aware of any XQuery implementation. Would you like to give it a try? ;)
Best,
Christian
Quoted text · Daniel · 15 lines
On Tue, Jun 4, 2019 at 10:26 AM Zimmel, Daniel <D.Zimmel at esvmedien.de> wrote: > > Hi, > > somewhat off-topic to BaseX, but I wonder if anybody already tried to port the TeX hyphenation algorithm to XQuery? > > See for example this Python port: > > https://nedbatchelder.com/code/modules/hyphenate.py > > >>> hyphenate_word("supercalifragilisticexpialidocious") > ['su', 'per', 'cal', 'ifrag', 'ilis', 'tic', 'ex', 'pi', 'ali', 'do', 'cious'] > > Best, Daniel >
ZD
Zimmel, Daniel20 Jun 2019 10:53 #
Yes, I think this could be fun.
Or perhaps not.
Either way, for my use case, for hyphenation analysis I can do a query to an API, but it just feels wrong not doing this in XQuery ;-)
Quoted text · Christian Grün · 33 lines
> -----Ursprüngliche Nachricht----- > Von: Christian Grün [mailto:christian.gruen at gmail.com] > Gesendet: Mittwoch, 19. Juni 2019 09:56 > An: Zimmel, Daniel > Cc: BaseX > Betreff: Re: [basex-talk] Hyphenation with XQuery > > Hi Daniel, > > I’m not aware of any XQuery implementation. Would you like to give it a try? ;) > > Best, > Christian > > > > On Tue, Jun 4, 2019 at 10:26 AM Zimmel, Daniel <D.Zimmel at esvmedien.de> > wrote: > > > > Hi, > > > > somewhat off-topic to BaseX, but I wonder if anybody already tried to port the > TeX hyphenation algorithm to XQuery? > > > > See for example this Python port: > > > > https://nedbatchelder.com/code/modules/hyphenate.py > > > > >>> hyphenate_word("supercalifragilisticexpialidocious") > > ['su', 'per', 'cal', 'ifrag', 'ilis', 'tic', 'ex', 'pi', 'ali', 'do', 'cious'] > > > > Best, Daniel > >
Written for BaseX 9.2. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery