Moses-support Digest, Vol 102, Issue 55

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. convert lemma & pos to text (Marwa Refaie)
2. Re: convert lemma & pos to text (Hieu Hoang)
3. New util module: random (Jeroen Vermeulen)


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

Message: 1
Date: Sun, 26 Apr 2015 22:01:53 +0000
From: Marwa Refaie <basmallah@hotmail.com>
Subject: [Moses-support] convert lemma & pos to text
To: <moses-support@mit.edu>
Message-ID: <DUB118-W19156F4C1810A9B28E0E67BAEA0@phx.gbl>
Content-Type: text/plain; charset="windows-1256"

I still stucking here !

I need to use word lemma & pos, here example of stanford output for lemmtizer & pos


<pos>

<sentence id="0">

<word wid="0" pos="JJ" lemma="artificial">Artificial</word>

<word wid="1" pos="NN" lemma="intelligence">intelligence</word>

</sentence>

<sentence id="1">

<word wid="0" pos="JJ" lemma="artificial">Artificial</word>

<word wid="1" pos="NN" lemma="intelligence">intelligence</word>

<word wid="2" pos="-LRB-" lemma="-lrb-">-LRB-</word>



Any one knows how to convert this to the Moses factored models



Artificial | artificial | NN intelligence |intelligence | NN |





From: basmallah@hotmail.com
To: moses-support@mit.edu
Date: Sat, 25 Apr 2015 22:45:27 +0000
Subject: [Moses-support] Stanford lemmetizer




Hi all,
I need to use word lemma & pos, here example of stanford output for lemmtizer & pos

<pos><sentence id="0"> <word wid="0" pos="JJ" lemma="artificial">Artificial</word> <word wid="1" pos="NN" lemma="intelligence">intelligence</word></sentence><sentence id="1"> <word wid="0" pos="JJ" lemma="artificial">Artificial</word> <word wid="1" pos="NN" lemma="intelligence">intelligence</word> <word wid="2" pos="-LRB-" lemma="-lrb-">-LRB-</word>
Any one knows how to convert this to the Moses factored models
Artificial | artificial | NN intelligence |intelligence | NN |
Marwa N. Refaie



_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20150426/5163e8bd/attachment-0001.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001
Url: http://mailman.mit.edu/mailman/private/moses-support/attachments/20150426/5163e8bd/attachment-0001.bat

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

Message: 2
Date: Mon, 27 Apr 2015 06:59:00 +0400
From: Hieu Hoang <hieuhoang@gmail.com>
Subject: Re: [Moses-support] convert lemma & pos to text
To: Marwa Refaie <basmallah@hotmail.com>, moses-support@mit.edu
Message-ID: <553DA5F4.8090706@gmail.com>
Content-Type: text/plain; charset="windows-1252"

there's currently no wrapper program to convert the stanford output to
moses factored representation.

You should write your own, you can look at similar wrapper scripts in
scripts/training/wrappers

please share your program with us if it works


On 27/04/2015 02:01, Marwa Refaie wrote:
> I still stucking here !
>
> I need to use word lemma & pos, here example of stanford output for
> lemmtizer & pos
>
>
> <pos>
>
> <sentence id="0">
>
> <word wid="0" pos="JJ" lemma="artificial">Artificial</word>
>
> <word wid="1" pos="NN" lemma="intelligence">intelligence</word>
>
> </sentence>
>
> <sentence id="1">
>
> <word wid="0" pos="JJ" lemma="artificial">Artificial</word>
>
> <word wid="1" pos="NN" lemma="intelligence">intelligence</word>
>
> <word wid="2" pos="-LRB-" lemma="-lrb-">-LRB-</word>
>
>
>
> Any one knows how to convert this to the Moses factored models
>
>
>
> Artificial | artificial | NN intelligence |intelligence | NN |
>
>
>
>
>
> ------------------------------------------------------------------------
> From: basmallah@hotmail.com
> To: moses-support@mit.edu
> Date: Sat, 25 Apr 2015 22:45:27 +0000
> Subject: [Moses-support] Stanford lemmetizer
>
> Hi all,
>
> I need to use word lemma & pos, here example of stanford output for
> lemmtizer & pos
>
>
> <pos>
>
> <sentence id="0">
>
> <word wid="0" pos="JJ" lemma="artificial">Artificial</word>
>
> <word wid="1" pos="NN" lemma="intelligence">intelligence</word>
>
> </sentence>
>
> <sentence id="1">
>
> <word wid="0" pos="JJ" lemma="artificial">Artificial</word>
>
> <word wid="1" pos="NN" lemma="intelligence">intelligence</word>
>
> <word wid="2" pos="-LRB-" lemma="-lrb-">-LRB-</word>
>
>
> Any one knows how to convert this to the Moses factored models
>
>
> Artificial | artificial | NN intelligence |intelligence| NN |
>
>
> /*Marwa N. Refaie*/
>
>
> _______________________________________________ Moses-support mailing
> list Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
>
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support

--
Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20150427/1a259383/attachment-0001.htm

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

Message: 3
Date: Mon, 27 Apr 2015 12:26:44 +0700
From: Jeroen Vermeulen <jtv@precisiontranslationtools.com>
Subject: [Moses-support] New util module: random
To: "moses-support@mit.edu" <moses-support@mit.edu>
Message-ID: <553DC894.4060408@precisiontranslationtools.com>
Content-Type: text/plain; charset=utf-8

Hi folks,

For those who work on the Moses code and need to generate
(pseudo-)random numbers sometimes, there's a new module that takes away
some of the drudgery: util/random.cc and util/random.hh.

It has simple templated wrappers for the built-in random()/srandom() and
rand/srand(), to let you generate random values for integer or
floating-point types. Unlike the built-in functions, they are
thread-safe on all platforms. So I would like to ask everyone who was
going to use rand()/srand()/random()/srandom() to use this new module
instead.

The functions support a few different uses that I found in the codebase:
random nonnegative value less than n, random nonnegative value less than
or equal to n, random value no less than m but less than n, or random
value no less than m but less than or equal to n.

These are all templates, so you can call them like:

rand<int>(); // Random int in [0, RAND_MAX].
rand_incl<float>(10); // Random float in [0, 10].
rand_excl<long>(-10, 10); // Random long in [-10, 9].

If you don't feel like specifying the type, you can let the template
derive one:

rand_incl(10.0f); // Random float in [0, 10].
rand_excl(5); // Random int in [0, 5).

There's a similar family of functions wide_rand() etc. These are for
integer types only. For types that are the same width as an int
(typically 32 bits) these functions work just like their non-wide
counterparts. But for wider types, they combine multiple random numbers
to fill the entire value: a wide_rand<uint64_t>() will combine two
random ints.

These functions are not perfect, so if you need to use them, please have
a look at the documentation in util/random.hh. There's been a
long-standing desire for a better randomizer, such as the ones in Boost
or C++11, and maybe having all randomizer code in one place will make it
a little easier to insert a replacement.


Jeroen


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

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


End of Moses-support Digest, Vol 102, Issue 55
**********************************************

0 Response to "Moses-support Digest, Vol 102, Issue 55"

Post a Comment