fix typos
This commit is contained in:
parent
1c59d26898
commit
5892952e5b
27
README.md
27
README.md
@ -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
|
||||
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
|
||||
|
||||
@ -147,3 +147,28 @@ be nice and commit also your source codes.
|
||||
git push mine master
|
||||
|
||||
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)
|
||||
|
@ -24,7 +24,7 @@ optionsParser :: Parser GEvalOptions
|
||||
optionsParser = GEvalOptions
|
||||
<$> switch
|
||||
( 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 :: Parser GEvalSpecification
|
||||
@ -38,7 +38,7 @@ specParser = GEvalSpecification
|
||||
<*> optional (strOption
|
||||
( long "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
|
||||
( long "test-name"
|
||||
<> value defaultTestName
|
||||
@ -65,7 +65,7 @@ metricReader = option auto
|
||||
<> value defaultMetric
|
||||
<> showDefault
|
||||
<> 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 = runGEval' True
|
||||
@ -96,22 +96,22 @@ runGEval'' opts = runGEval''' (geoInit opts) (geoSpec opts)
|
||||
|
||||
runGEval''' :: Bool -> GEvalSpecification -> IO (Maybe MetricValue)
|
||||
runGEval''' True spec = do
|
||||
initChallange spec
|
||||
initChallenge spec
|
||||
return Nothing
|
||||
runGEval''' False spec = do
|
||||
val <- geval spec
|
||||
return $ Just val
|
||||
|
||||
initChallange :: GEvalSpecification -> IO ()
|
||||
initChallange spec = case gesExpectedDirectory spec of
|
||||
initChallenge :: GEvalSpecification -> IO ()
|
||||
initChallenge spec = case gesExpectedDirectory spec of
|
||||
Nothing -> showInitInstructions
|
||||
Just expectedDirectory -> createChallenge expectedDirectory spec
|
||||
|
||||
showInitInstructions = do
|
||||
putStrLn [here|
|
||||
Run:
|
||||
geval --init --expected-directory CHALLANGE
|
||||
to create a directory CHALLANGE representing a Gonito challange.
|
||||
geval --init --expected-directory CHALLENGE
|
||||
to create a directory CHALLENGE representing a Gonito challenge.
|
||||
|
||||
You can specify a metric with `--metric METRIC-NAME` option.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user