[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Formatting algorithm
From: |
Ulrich Lauther |
Subject: |
Re: [Groff] Formatting algorithm |
Date: |
Mon, 14 Apr 2014 17:18:14 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Apr 14, 2014 at 12:41:56PM +0100, Ralph Corderoy wrote:
> Hi Ulrich,
>
> > Even if a greedy algorithm will be implemented, it should have the
> > whole paragraph available as input. That way, one could easily switch
> > over to a KP-implementation and compare the two appraoches in terms of
> > quality, running time, and code complexity. Provided a clean
> > interface and input/output specifications are available I would
> > volunteer to implement the dynamic programming (KP) variant.
>
> Perhaps it's gathering a whole paragraph together where the large amount
> of change to groff lies, and not implementing KP itself.
>
> Cheers, Ralph.
The proposed algorithm assumes
# Assumptions
# ===========
[skipped]
# NextWord:
# - can be read from a buffer
#
and later on uses
read NextWord
If this function is available, it's easy to collect the paragraph:
while (! paragraph ends) {
read NextWord;
store NextWord in paragraph_buffer;
}
But maybe just implementing "read NextWord" is the difficulty?
ulrich
--
-lauther
- Re: [Groff] Formatting algorithm, Ulrich Lauther, 2014/04/14
- Re: [Groff] Formatting algorithm, Ralph Corderoy, 2014/04/14
- Re: [Groff] Formatting algorithm,
Ulrich Lauther <=
- Re: [Groff] Formatting algorithm, Peter Schaffter, 2014/04/22
- Re: [Groff] Formatting algorithm, Ulrich Lauther, 2014/04/22
- Re: [Groff] Formatting algorithm, Peter Schaffter, 2014/04/22
- Re: [Groff] Formatting algorithm, Keith Marshall, 2014/04/23
- Re: [Groff] Formatting algorithm, Ted Harding, 2014/04/23
- Re: [Groff] Formatting algorithm, Peter Schaffter, 2014/04/23
- Re: [Groff] Formatting algorithm, Werner LEMBERG, 2014/04/24
- Re: [Groff] Formatting algorithm, Ulrich Lauther, 2014/04/24
- Re: [Groff] Formatting algorithm, Ralph Corderoy, 2014/04/25
- Re: [Groff] Formatting algorithm, Peter Schaffter, 2014/04/25