From e55708a8f0ea18b372863cfc1a6fd30078e743d2 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Tue, 27 Oct 2015 12:56:17 +0100 Subject: [PATCH] small fixes --- README.md | 12 ++++++------ geval.cabal | 2 +- src/GEval/CreateChallenge.hs | 11 ++++++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5a0fe80..11de003 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ machine learning algorithms are available here. ## Installing -You need [Haskell Stack](https://github.com/commercialhaskell/stack), -then install GEval with: +You need [Haskell Stack](https://github.com/commercialhaskell/stack). +When you've got Haskell Stack, install GEval with: git clone https://github.com/filipg/geval cd geval @@ -100,11 +100,11 @@ repo (for the toy “planets” challenge) could be created as follows: git commit -m 'init challenge' git remote add origin git@github.com:filipg/planets git push origin master - git branch dont-peek-here - git checkout dont-peek-here + git branch dont-peek + git checkout dont-peek git add test-A/expected.tsv git commit -m 'with expected results' - git push origin dont-peek-here + git push origin dont-peek ## Taking up a Gonito challenge @@ -134,7 +134,7 @@ If you'd like and if you have access to the test set results, you can “cheat” and check the results for the test set: cd .. - git clone https://github.com/filipg/planets planets-secret --branch dont-peek-here + git clone https://github.com/filipg/planets planets-secret --branch dont-peek cd planets geval --expected-directory ../planets-secret diff --git a/geval.cabal b/geval.cabal index 04eb867..dc6c7d5 100644 --- a/geval.cabal +++ b/geval.cabal @@ -1,5 +1,5 @@ name: geval -version: 0.1.1.0 +version: 0.1.1.1 synopsis: Machine learning evaluation tools description: Please see README.md homepage: http://github.com/name/project diff --git a/src/GEval/CreateChallenge.hs b/src/GEval/CreateChallenge.hs index 13afe19..cc5b139 100644 --- a/src/GEval/CreateChallenge.hs +++ b/src/GEval/CreateChallenge.hs @@ -91,9 +91,14 @@ Directory structure |] configContents :: Metric -> String -> String -configContents metric testName = [i| ---metric ${show metric} --test-name ${testName} -|] +configContents metric testName = "--metric " ++ + (show metric) ++ + (if testName /= defaultTestName + then + " --test-name " ++ testName + else + "") + trainContents :: Metric -> String trainContents BLEU = [hereLit|alussa loi jumala taivaan ja maan he mea hanga na te atua i te timatanga te rangi me te whenua