Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YLDA_HOME environment variable #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# ignore emacs backup files
*~
2 changes: 1 addition & 1 deletion LDA.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

. ./functions.sh

Expand Down
1 change: 1 addition & 0 deletions LDALibs
12 changes: 10 additions & 2 deletions runLDA.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# input:
# $1 : 1 for Unigram_Model
# If a new model is implemented this can be used to access it
Expand Down Expand Up @@ -28,7 +28,15 @@
# your input and provide the directory containing the gzip files as
# <input-dir>

. ./functions.sh
# check to see if a YLDA_HOME environment variable has been set and,
# if so, change into that directory first. Otherwise it assumes that
# YLDA_HOME is the local directory. This makes it so that YLDA does
# not have to be run from the YLDA root
if [ -z ${YLDA_HOME} ]; then
YLDA_HOME=`pwd`;
fi;
cd ${YLDA_HOME}
. ${YLDA_HOME}/functions.sh

model=$1;
flags=$2;
Expand Down