Thanks Barry.
I copied the command from the manual and checked the the missing quote in the 
end, but the problem was not solved. 

Of course, i found the reason.

I copied the command from moses manual (opened by Document viewer in ubuntu) to 
my terminal and modify the path. but i have the following message after running:

usage: /home/mohammadifar/mosesdecoder/scripts/training/mert-moses.pl 
input-text references decoder-executable decoder.ini
Options:
  --working-dir=mert-dir ... where all the files are created
  --nbest=100            ... how big nbestlist to generate
  --lattice-samples      ... how many lattice samples (Chatterjee & Cancedda, 
emnlp 2010)
  --jobs=N               ... set this to anything to run moses in parallel
  --cache-model=STRING   ... local directory into which copy model before 
running decoder
  --mosesparallelcmd=STR ... use a different script instead of moses-parallel
  --queue-flags=STRING   ... anything you with to pass to qsub, eg.
                             '-l ws06osssmt=true'. The default is: '-hard'
                             To reset the parameters, please use
                             --queue-flags=' '
                             (i.e. a space between the quotes).
  --decoder-flags=STRING ... extra parameters for the decoder
  --continue             ... continue from the last successful iteration
  --skip-decoder         ... skip the decoder run for the first time,
                             assuming that we got interrupted during
                             optimization
  --shortest --average --closest
                         ... Use shortest/average/closest reference length
                             as effective reference length (mutually exclusive)
  --nocase               ... Do not preserve case information; i.e.
                             case-insensitive evaluation (default is false).
  --nonorm               ... Do not use text normalization (flag is not active,
                             i.e. text is NOT normalized)
  --filtercmd=STRING     ... path to filter-model-given-input.pl
  --filterfile=STRING    ... path to alternative to input-text for filtering
                             model. useful for lattice decoding
  --rootdir=STRING       ... where do helpers reside (if not given explicitly)
  --mertdir=STRING       ... path to new mert implementation
  --mertargs=STRING      ... extra args for both extractor and mert
  --extractorargs=STRING ... extra args for extractor only
  --mertmertargs=STRING  ... extra args for mert only
  --scorenbestcmd=STRING ... path to score-nbest.py
  --old-sge              ... passed to parallelizers, assume Grid Engine < 6.0
  --inputtype=[0|1|2]    ... Handle different input types: (0 for text,
                             1 for confusion network, 2 for lattices,
                             default is 0)
  --no-filter-phrase-table ... disallow filtering of phrase tables
                              (useful if binary phrase tables are available)
  --random-restarts=INT  ... number of random restarts (default: 20)
  --predictable-seeds    ... provide predictable seeds to mert so that random
                             restarts are the same on every run
  --range=tm:0..1,-1..1  ... specify min and max value for some features
                             --range can be repeated as needed.
                             The order of the various --range specifications
                             is important only within a feature name.
                             E.g.:
                               --range=tm:0..1,-1..1 --range=tm:0..2
                             is identical to:
                               --range=tm:0..1,-1..1,0..2
                             but not to:
                               --range=tm:0..2 --range=tm:0..1,-1..1
  --activate-features=STRING  ... comma-separated list of features to optimize,
                                  others are fixed to the starting values
                                  default: optimize all features
                                  example: tm_0,tm_4,d_0
  --prev-aggregate-nbestlist=INT ... number of previous step to consider when
                                     loading data (default = -1)
                                    -1 means all previous, i.e. from iteration 1
                                     0 means no previous data, i.e. only the
                                       current iteration
                                     N means this and N previous iterations

  --maximum-iterations=ITERS ... Maximum number of iterations. Default: 25
  --return-best-dev          ... Return the weights according to dev bleu, 
instead of returning
                                 the last iteration
  --random-directions               ... search only in random directions
  --number-of-random-directions=int ... number of random directions
                                        (also works with regular optimizer, 
default: 0)
  --pairwise-ranked         ... Use PRO for optimisation (Hopkins and May, 
emnlp 2011)
  --pro-starting-point      ... Use PRO to get a starting point for MERT
  --batch-mira              ... Use Batch MIRA for optimisation (Cherry and 
Foster, NAACL 2012)
  --hg-mira                 ... Use hypergraph MIRA, ie batch mira with 
hypergraphs instead of kbests.
  --batch-mira-args=STRING  ... args to pass through to batch/hg MIRA. This 
flag is useful to
                                change MIRA's hyperparameters such as 
regularization parameter C,
                                BLEU decay factor, and the number of iterations 
of MIRA.
  --promix-training=STRING  ... PRO-based mixture model training (Haddow, NAACL 
2013)
  --promix-tables=STRING    ... Phrase tables for PRO-based mixture model 
training.
  --threads=NUMBER          ... Use multi-threaded mert (must be compiled in).
  --historic-interpolation  ... Interpolate optimized weights with prior 
iterations' weight
                                (parameter sets factor [0;1] given to current 
weights)
  --spe-symal=SYMAL      ... Use simulated post-editing when decoding.
                             (SYMAL aligns input to refs)

So mira was not ran.

But i modified quote ’ to quote ' in the command! (note that these are two 
different characters in ubuntu!) and my problem was solved. I think the problem 
is related to document viewer in Ubuntu, because it changes the true quote in 
copying text. Copying from firefox pdf viewer has no problem.

Regards
Davood

Date: Thu, 29 Oct 2015 09:38:13 +0000
From: bhad...@staffmail.ed.ac.uk
To: davood...@hotmail.com; moses-support@mit.edu
Subject: Re: [Moses-support] Correct form of using Mira


  
    
  
  
    Hi Davood

    

    The first command you give has a quote missing at the end - is this
    correct?

    

    Another difference is that you have "-v 0", so moses will run
    silently.

    

    What was the actual output when you ran this command? What you have
    below looks correct to me.

    

    cheers - Barry

    

    On 28/10/15 21:57, Davood Mohammadifar
      wrote:

    
    
      
      Hello everyone

        

        because of variations in BLEU score when using normal mert, i
        decided to use mira instead. Moses manual (updated on 28 October
        2015) says me to use this command:

        

        $MOSES_SCRIPTS/training/mert-moses.pl work/dev.fr work/dev.en
        $MOSES_BIN/moses work/model/moses.ini --mertdir $MOSES_BIN
        --rootdir $MOSES_SCRIPTS --batch-mira --return-best-dev
        --batch-mira-args '-J 300' --decoder-flags '-threads 8 -v 0

        

        but this command is not work for me. When i execute the command,
        i just see some options for it and nothing happens. So i wanted
        to change the command. Based on usual mert, i changed the
        command to this:

        

        $MOSES_SCRIPTS/training/mert-moses.pl
        /home/mohammadifar/corpus/tune.true.fa
        /home/mohammadifar/corpus/tune.true.en $MOSES_BIN/moses
        /home/mohammadifar/First/train/model/moses.ini --mertdir
        $MOSES_BIN--rootdir $MOSES_SCRIPTS --batch-mira
        --return-best-dev --batch-mira-args="-J 300"
        --decoder-flags="-threads all"

        

        the difference of two command is in the end. The latter works
        for me very good. BLEU variations in test-set are very slight
        (many times <0.1 and rarely about 0.2 in 3 times running the
        whole of translation commands for same dataset). So i want to be
        sure, Is the form of using mira correct? (Moses v3.0)

        

        Regards

        Davood

      
      

      
      

      _______________________________________________
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

Reply via email to