icetindil | 82838a2 | 2013-10-11 16:41:18 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Ian Maxon | 928bbd1 | 2015-09-14 17:12:48 -0700 | [diff] [blame] | 2 | # Licensed to the Apache Software Foundation (ASF) under one |
| 3 | # or more contributor license agreements. See the NOTICE file |
| 4 | # distributed with this work for additional information |
| 5 | # regarding copyright ownership. The ASF licenses this file |
| 6 | # to you under the Apache License, Version 2.0 (the |
| 7 | # "License"); you may not use this file except in compliance |
| 8 | # with the License. You may obtain a copy of the License at |
icetindil | 82838a2 | 2013-10-11 16:41:18 -0700 | [diff] [blame] | 9 | # |
Ian Maxon | 928bbd1 | 2015-09-14 17:12:48 -0700 | [diff] [blame] | 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
icetindil | 82838a2 | 2013-10-11 16:41:18 -0700 | [diff] [blame] | 11 | # |
Ian Maxon | 928bbd1 | 2015-09-14 17:12:48 -0700 | [diff] [blame] | 12 | # Unless required by applicable law or agreed to in writing, |
| 13 | # software distributed under the License is distributed on an |
| 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | # KIND, either express or implied. See the License for the |
| 16 | # specific language governing permissions and limitations |
| 17 | # under the License. |
| 18 | |
icetindil | 82838a2 | 2013-10-11 16:41:18 -0700 | [diff] [blame] | 19 | |
| 20 | DIR=`dirname $0`; if [ "${DIR:0:1}" == "." ]; then DIR=`pwd`"${DIR:1}"; fi |
| 21 | source $DIR/conf.sh |
| 22 | |
| 23 | ARGS=1 # Required number of arguments |
| 24 | E_BADARGS=85 # Wrong number of arguments passed to script. |
| 25 | if [ $# -lt "$ARGS" ] |
| 26 | then |
| 27 | echo "Usage: `basename $0` dataset" |
| 28 | echo "Example: `basename $0` dblp-small" |
| 29 | exit $E_BADARGS |
| 30 | fi |
| 31 | |
| 32 | $SSJOIN/tokenizer $DATA/$1/raw-000/part-00000 $2 |
| 33 | mkdir $DATA/$1/$IN |
| 34 | mv $DATA/$1/raw-000/part-00000.bin $DATA/$1/$IN/part-00000 |
| 35 | |