Moses-support Digest, Vol 110, Issue 29

Send Moses-support mailing list submissions to
moses-support@mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.mit.edu/mailman/listinfo/moses-support
or, via email, send a message with subject or body 'help' to
moses-support-request@mit.edu

You can reach the person managing the list at
moses-support-owner@mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moses-support digest..."


Today's Topics:

1. Re: Compiling Moses with -fPIC (Hieu Hoang)
2. Re: MERT's Powell Search (Ulrich Germann)


----------------------------------------------------------------------

Message: 1
Date: Tue, 15 Dec 2015 17:26:11 +0000
From: Hieu Hoang <hieuhoang@gmail.com>
Subject: Re: [Moses-support] Compiling Moses with -fPIC
To: Miriam K?shammer <miriam.kaeshammer@gmx.de>, Moses-support@mit.edu
Message-ID: <56704D33.6010600@gmail.com>
Content-Type: text/plain; charset="windows-1252"

you may have to compile boost, cmph and irstlm with the -fPIC too.


On 14/12/15 16:06, "Miriam K?shammer" wrote:
> Dear Moses community,
> My goal is to link Moses (the decoder) as a static library into some
> other shared library. As far as I understand the compiler/linker
> output of this other library, I need to compile the Moses library with
> parameter -fPIC (position independent code). Could you help me in
> achieving this?
> I already tried to add "cxxflags=-fPIC" to the bjam command like this:
> ./bjam -j8 -d2 -a --with-boost="${PREFIX}" --with-xmlrpc-c="${PREFIX}"
> --with-cmph="${PREFIX}" --with-irstlm="${PREFIX}"
> --install-scripts="${PREFIX}"/scripts link=static cxxflags=-fPIC
> However, the build process just seems to get stuck before it actually
> starts, see attached log.
> Any help/comment is appreciated.
> Thanks!
> Miriam
>
>
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support

--
Hieu Hoang
http://www.hoang.co.uk/hieu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20151215/54de4a19/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 15 Dec 2015 19:43:40 +0000
From: Ulrich Germann <ulrich.germann@gmail.com>
Subject: Re: [Moses-support] MERT's Powell Search
To: Adam Lopez <alopez@inf.ed.ac.uk>
Cc: moses-support <moses-support@mit.edu>, liling tan
<alvations@gmail.com>
Message-ID:
<CAHQSRUofOg-LawZeQo8hChJzJp4UrYLitDY-MnOEUzML1ZPNfw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Liling,

you might find this paper helpful in understanding MERT:
http://www.cs.jhu.edu/~ozaidan/zmert/zaidan09_ZMERT.pdf

- Uli

On Mon, Dec 14, 2015 at 5:55 PM, Adam Lopez <alopez@inf.ed.ac.uk> wrote:

> On line 6 does the "score" in "compute line l: parameter value ? score"
>> refer to (i) the MT evaluation metric score (e.g. BLEU) between the
>> translation and the reference sentence or (ii) nbest list weighted overall
>> score as we see in the last column of a moses generated nbest list (e.g.
>> http://www.statmt.org/moses/?n=Advanced.Search)?
>>
>
> Neither. It is the model score of that sentence w.r.t. the parameter
> you're optimizing. Once you have the model score for each sentence as a
> function of ?j, you can then construct a function representing BLEU as a
> function of ?j by finding the convex hull representing the result of the
> argmax operation. That is what is happening in slides 31-36. See below.
>
>
>> At line 8 of the pseudo code, when it asks to "find line l with steepest
>> descent", is it looking for each sentence find the (i) line with the
>> highest ?j or (i) the line with the highest g(ei|f).
>>
>
> In this context, "steepest descesnt" means "steepest slope"; i.e. choose
> the sentence i with the greatest value ai.
>
>
>> Then at line 15 of the pseudo code, it says "compute score for value
>> before first threshold point". Is this "score" different from the "score"
>> at line 6? At line 6, it's a sentence-level score (which I hope it means
>> BLEU and not the weighted overall score), and at line 15, it seems to be
>> computing the corpus-level score given the initial parameter values.
>>
>> If at line 15, it is computing the corpus level score, is it only taking
>> the best score of the n translations for each reference? And if this is
>> BLEU, it's doing not a simple case of averaging sentence-level BLEU which
>> might be kept from line 6, is that right? If it is BLEU, then this score
>> could be pre-computed before the powell search too, right?
>>
>
> Remember what we're trying to do: choose ?j to maximize BLEU. The
> algorithm here does that exactly w.r.t. the N-best list. That is, over a
> corpus of M sentences for which we have N-best translations, we want to
> find:
>
> 1) argmax?j BLEU(?j)
>
> Let's unroll this computation. Let e?m(?) be the translation that the
> decoder chooses for the m-th training example when ?j=?, and bm(e?) be a
> function returning the vector of sentence-level statistics used in the
> computation of BLEU when e? is the translation of the m-th training example
> (i.e. n-gram matches and reference counts). BLEU is a function of the
> aggregate results of calls to b, so (1) becomes:
>
> 2) argmax?j BLEU(?m ? 1,...,M b(e?m(?j)))
>
> But e?m(?j) is just argmaxn? 1,...,N g(em,n,fm,?j), where em,n is the
> n-th element of the N-best list for the m-th training example and fm is
> the source sentence of the m-th training example, and g is the model score
> we compute from this pair as a function of ?j (holding the remaining
> elements of ? constant, remember). So this becomes:
>
> 3) argmax?j BLEU(?m ? 1,...,M b(argmaxn? 1,...,N g(em,n,fm,?j)))
>
> And since we have g(em,n,fm,?j) = ?k? 1,...,|?| ?khk(em,n,fm) = ?jhj(em,n,
> fm) + ?k? 1,...,j-1,j+1,...,|?| ?khk(em,n,fm), we get:
>
> 4) argmax?j BLEU(?m ? 1,...,M b(argmaxn? 1,...,N ?jhj(em,n,fm) + ?k?
> 1,...,j-1,j+1,...,|?| ?khk(em,n,fm)))
>
> Since both h and and the remaining elements of ? are fixed, this becomes
> (using a variant of the notation in slide 31, where a and b are functions
> of these constants):
>
> 5) argmax?j BLEU(?m ? 1,...,M b(argmaxn? 1,...,N ?ja(em,n,fm) + b(em,n,fm)
> ))
>
> The function inside the outer argmax in (4) is exactly the function that's
> being constructed piece-by-piece in slides 31-35, and illustrated in slide
> 36. Here's how that happens:
>
> - On slide 31, we construct the model score the n-th element of the N-best
> list for the m-th training example em,n as a linear function of ?j, as
> we've discussed. This is the bit inside the inner argmax.
>
> - On slide 32, we repeat the construction of 31 for *every* element of an
> N-best list for the m-th training example.
>
> - Slide 33 shows the max of the function inside the inner argmax. Each
> point on the convex hull is a point where the argmax changes, and the
> argmax of any interval over the x-values of these points is just the
> element of the n-best list giving rise to the line whose value is maximal
> in that interval.
>
> - Slide 34 shows how we actually get the argmax. We have to find the
> intersection points of the upper convex hull, which is why we're sorting
> the lines by slope and computing their intersection.
>
> - Finally, slide 36 shows the complete function inside the argmax of (4).
> We compute the statistics b for the maximizing sentence in each interval,
> and then sum the resulting function over all training examples. This
> basically gives us a set of intervals and sufficient statistics for BLEU in
> each interval, which we use to compute the complete function.
>
>
>
>
>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>


--
Ulrich Germann
Senior Researcher
School of Informatics
University of Edinburgh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20151215/95b7dc23/attachment.html

------------------------------

_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


End of Moses-support Digest, Vol 110, Issue 29
**********************************************

0 Response to "Moses-support Digest, Vol 110, Issue 29"

Post a Comment