1
IRSTLM=$HOME/irstlm

I need help setting this variable up. Was wondering if this is correct syntax

IRSTLM=/home/user/irstlm

Is that possible to run from root? I need it to be done in root in order to access certain files, I can also add the rest of the command I am trying to run if you'd like to see the context it's being used inn.

New problem, don't know why but shouldn't this output the file with extension .arpa ? i dont seem to get that file and I require it to run the next command to finish compiling this program.

~/irstlm/bin/add-start-end.sh  < ~/corpus/news-commentary-v7.fr-en.true.en > news-commentary-v7.fr-en.sb.en export IRSTLM=$HOME/irstlm; ~/irstlm/bin/build-lm.sh -i  news-commentary-v7.fr-en.sb.en  -t ./tmp  -p -s improved-kneser-ney -o news-commentary-v7.fr-en.lm.en 

Here is the full command:

/home/user/irstlm/bin/add-start-end.sh  < /home/user/corpus/news-commentary-v7.fr-en.true.en > news-commentary-v7.fr-en.sb.en export IRSTLM=$HOME/irstlm; /home/user/irstlm/bin/build-lm.sh -i  news-commentary-v7.fr-en.sb.en  -t ./tmp  -p  -s improved-kneser-ney -o news-commentary-v7.fr-en.lm.en 
2
  • Please do provide more context! rootie tootie toot :)
    – ish
    Jun 26, 2012 at 15:26
  • I updated the post with the full command
    – Ferdinand
    Jun 26, 2012 at 15:34

2 Answers 2

3

If it's a one-off command, you're better of just setting it for that command, i.e.:

IRSTLM=/home/user/irstlm /home/user/irstlm/bin/add-start-end.sh  \
  < /home/user/corpus/news-commentary-v7.fr-en.true.en > news-commentary-v7.fr-en.sb

If it is part of a script use:

export IRSTLM=/home/user/irstlm
/home/user/irstlm/bin/add-start-end.sh < /home/user/corpus/news-commentary-v7.fr-en.true.en > news-commentary-v7.fr-en.sb
1
  • 1
    And if it needs to be persistent across shell sessions, use the .bashrc or whatever other dotfiles are relevant.
    – belacqua
    Jun 26, 2012 at 15:52
0

I figured it out, thanks for the suggestions, they definitely helped, here the final command I ran, it seems I wasn't correctly setting the variable as "irstlm=/root/irstlm" final command:

 /root/irstlm/bin/add-start-end.sh < /home/user/corpus/news-commentary-v7.fr-en.true.en> news-commentary-v7.fr-en.sb.enexport IRSTLM=$HOME/irstlm; /root/irstlm/bin/build-lm.sh -i news-commentary-v7.fr-en.sb.en -t ./tmp -p -s improved-kneser-ney -o news-commentary-v7.fr-en.lm.en 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .