How to set properly STANFORD_MODELS VARIABLE?

My bashrc lines

export STANFORD_MODELS="/home/milenko/stanford-ner-2018-10-16/classifiers/english.all.3class.distsim.crf.ser.gz"
export STANFORD_MODELS="/home/milenko/stanford-ner-2018-10-16/classifiers/english.conll.4class.distsim.crf.ser.gz"
export STANFORD_MODELS="/home/milenko/stanford-ner-2018-10-16/classifiers/english.muc.7class.distsim.crf.ser.gz"
export STANFORD_MODELS="/home/milenko/stanford-ner-2018-10-16/classifiers/example.serialized.ncc.ncc.ser.gz"

When I go to Python shell

print (os.environ.get('STANFORD_MODELS'))
/home/milenko/stanford-ner-2018-10-16/classifiers/example.serialized.ncc.ncc.ser.gz

Why is only the last one printed out?

Should I change my .bashrc?

1 answer

  • answered 2018-11-08 08:36 tripleee

    Apparently you can set the variable to a colon-separated list of entries, just like the standard PATH variable.

    export STANFORD_MODELS="/home/milenko/stanford-ner-2018-10-16/classifiers/english.all.3class.distsim.crf.ser.gz:/home/milenko/stanford-ner-2018-10-16/classifiers/english.conll.4class.distsim.crf.ser.gz:/home/milenko/stanford-ner-2018-10-16/classifiers/english.muc.7class.distsim.crf.ser.gz:/home/milenko/stanford-ner-2018-10-16/classifiers/example.serialized.ncc.ncc.ser.gz"