fix typos

This commit is contained in:
Filip Gralinski 2015-08-27 08:05:09 +02:00 committed by Filip Gralinski
parent 1c59d26898
commit 5892952e5b
2 changed files with 34 additions and 9 deletions

View File

@ -70,7 +70,7 @@ You can use `geval` to initiate a Gonito challenge:
A metric (other than the default `RMSE` — root-mean-square error) can A metric (other than the default `RMSE` — root-mean-square error) can
be given to generate another type of toy challenge: be given to generate another type of toy challenge:
geval --init --expected-directory my-mt-challenge --metric BLEU geval --init --expected-directory my-machine-translation-challenge --metric BLEU
### Preparing a Git repository ### Preparing a Git repository
@ -147,3 +147,28 @@ be nice and commit also your source codes.
git push mine master git push mine master
Then let Gonito pull them and evaluate your results. Then let Gonito pull them and evaluate your results.
## `geval` options
geval - stand-alone evaluation tool for tests in Gonito platform
geval [--init] [--out-directory OUT-DIRECTORY]
[--expected-directory EXPECTED-DIRECTORY] [--test-name NAME]
[--out-file OUT] [--expected-file EXPECTED] [--metric METRIC]
-h,--help Show this help text
--init Init a sample Gonito challenge rather than run an
evaluation
--out-directory OUT-DIRECTORY
Directory with test results to be
evaluated (default: ".")
--expected-directory EXPECTED-DIRECTORY
Directory with expected test results (the same as
OUT-DIRECTORY, if not given)
--test-name NAME Test name (i.e. subdirectory with results or expected
results) (default: "test-A")
--out-file OUT The name of the file to be
evaluated (default: "out.tsv")
--expected-file EXPECTED The name of the file with expected
results (default: "expected.tsv")
--metric METRIC Metric to be used - RMSE, MSE or BLEU (default: RMSE)

View File

@ -24,7 +24,7 @@ optionsParser :: Parser GEvalOptions
optionsParser = GEvalOptions optionsParser = GEvalOptions
<$> switch <$> switch
( long "init" ( long "init"
<> help "Init a sample Gonito challange rather than run an evaluation" ) <> help "Init a sample Gonito challenge rather than run an evaluation" )
<*> specParser <*> specParser
specParser :: Parser GEvalSpecification specParser :: Parser GEvalSpecification
@ -38,7 +38,7 @@ specParser = GEvalSpecification
<*> optional (strOption <*> optional (strOption
( long "expected-directory" ( long "expected-directory"
<> metavar "EXPECTED-DIRECTORY" <> metavar "EXPECTED-DIRECTORY"
<> help "Directory with expected test results (if not specified the same as OUT-DIRECTORY)" )) <> help "Directory with expected test results (the same as OUT-DIRECTORY, if not given)" ))
<*> strOption <*> strOption
( long "test-name" ( long "test-name"
<> value defaultTestName <> value defaultTestName
@ -65,7 +65,7 @@ metricReader = option auto
<> value defaultMetric <> value defaultMetric
<> showDefault <> showDefault
<> metavar "METRIC" <> metavar "METRIC"
<> help "Metric to be used" ) <> help "Metric to be used - RMSE, MSE or BLEU" )
runGEval :: [String] -> IO (Either (ParserResult GEvalOptions) (Maybe MetricValue)) runGEval :: [String] -> IO (Either (ParserResult GEvalOptions) (Maybe MetricValue))
runGEval = runGEval' True runGEval = runGEval' True
@ -96,22 +96,22 @@ runGEval'' opts = runGEval''' (geoInit opts) (geoSpec opts)
runGEval''' :: Bool -> GEvalSpecification -> IO (Maybe MetricValue) runGEval''' :: Bool -> GEvalSpecification -> IO (Maybe MetricValue)
runGEval''' True spec = do runGEval''' True spec = do
initChallange spec initChallenge spec
return Nothing return Nothing
runGEval''' False spec = do runGEval''' False spec = do
val <- geval spec val <- geval spec
return $ Just val return $ Just val
initChallange :: GEvalSpecification -> IO () initChallenge :: GEvalSpecification -> IO ()
initChallange spec = case gesExpectedDirectory spec of initChallenge spec = case gesExpectedDirectory spec of
Nothing -> showInitInstructions Nothing -> showInitInstructions
Just expectedDirectory -> createChallenge expectedDirectory spec Just expectedDirectory -> createChallenge expectedDirectory spec
showInitInstructions = do showInitInstructions = do
putStrLn [here| putStrLn [here|
Run: Run:
geval --init --expected-directory CHALLANGE geval --init --expected-directory CHALLENGE
to create a directory CHALLANGE representing a Gonito challange. to create a directory CHALLENGE representing a Gonito challenge.
You can specify a metric with `--metric METRIC-NAME` option. You can specify a metric with `--metric METRIC-NAME` option.