This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub set_default { | |
| my $hashref = shift; | |
| my $k = shift; | |
| my $def = shift; | |
| $hashref->{$k} = $def unless defined $hashref->{$k}; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| take_until_hyphen () { | |
| echo $1 | ghc -e "interact (takeWhile (/= '-'))" | |
| } | |
| darcs_screened_context () { | |
| bname=`basename $1 .dpatch` | |
| darcs get --lazy http://darcs.net/screened --context $1 `take_until_hyphen $bname` | |
| # :-( this ain't git checkout ... | |
| notify-send "context fetched: $bname" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| CMD=$@ | |
| $CMD | |
| STATUS=$? | |
| CMD_SUMMARY=`echo $CMD` | |
| HOSTNAME=`hostname --short` | |
| NOTIFY=notify-send | |
| if [ $STATUS == 0 ]; then | |
| $NOTIFY "DONE: $CMD_SUMMARY ($HOSTNAME)" | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -include ../../config | |
| define clean-train | |
| cd $(<D) ; $(MOSES_SCRIPTS)/training/clean-corpus-n.perl $(notdir $(basename $<)) en mrl moses-corpus 1 100 | |
| mv $(basename $@).en $(basename $@).clean-en | |
| mv $(basename $@).mrl $(basename $@).clean-mrl | |
| endef | |
| ifdef DISABLE_MOSES_TUNING | |
| %/moses-corpus.clean-en : %/trainNdev-full-corpus.en %/trainNdev-full-corpus.mrl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.0188729391915491e-5 comprise_vvz v-administrative-area-level3-allerdale | |
| 1.035045154780056e-4 shelter_vvg k-administrative-area-level2 | |
| 1.0437847139195113e-3 transmitter_nn1 v-area-south_central_england | |
| 1.0497224601294965e-3 promote_vvn v-classification-xma |
This is a DATR file.
Try opening it in various text editors like Gedit or Yudit.
Note: with apologies to Arabic speakers, yes the Arabic bits really are just random characters :-)
Vim seems to less painful to work with (but you have to stomach reading from left to right, which is great for a non-Arabic speaker like me, but I imagine not so fun if you can read Arabic and have to fight your instincts)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % GenI surface realiser | |
| % Copyright (C) 2005 Carlos Areces and Eric Kow | |
| % | |
| % This program is free software; you can redistribute it and/or | |
| % modify it under the terms of the GNU General Public License | |
| % as published by the Free Software Foundation; either version 2 | |
| % of the License, or (at your option) any later version. | |
| % | |
| % This program is distributed in the hope that it will be useful, | |
| % but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Choice where | |
| data Choice a = Wanted a | Unwanted a | |
| wanted :: Choice a -> Maybe a | |
| wanted (Wanted s) = Just s | |
| wanted (Unwanted _) = Nothing | |
| -- | The item, regardless of whether it's wanted or not | |
| undiscriminate :: Choice a -> a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e -o pipefail | |
| pushd `dirname $0` > /dev/null | |
| SCRIPT_DIR=`pwd` | |
| popd > /dev/null | |
| ORIGINALS_DIR=data # treat as read-only! | |
| REFERENCE_DIR=${ORIGINALS_DIR}/hand-extracted | |
| WORK_DIR_SRC=${ORIGINALS_DIR}/document-pairs |