I'm trying to run a script to perform biterm topic modeling (BTM) (can be found here: https://github.com/xiaohuiyan/BTM). The code contains a runnable example, which can be executed via the following:
$ cd script
$ sh runExample.sh
I get an error message that reads:
=============== Index Docs =============
  File "indexDocs.py", line 18
    print(' '.join(map(str, wids)), file=wf)
                                        ^
SyntaxError: invalid syntax
=============== Topic Learning =============
runExample.sh: line 28: ../output/voca.txt: No such file or directory
g++  -c -pipe -O3 model.cpp -o model.o 
g++  -c -pipe -O3 infer.cpp -o infer.o 
g++  -c -pipe -O3 main.cpp -o main.o 
g++ model.o infer.o main.o -o btm
../src/btm est 20  2.500 0.005 5 501 ../output/doc_wids.txt ../output/model/
runExample.sh: line 31: 51872 Segmentation fault: 11  ../src/btm est $K $W $alpha $beta $niter $save_step $dwid_pt $model_dir
================ Infer P(z|d)===============
../src/btm inf sum_b 20 ../output/doc_wids.txt ../output/model/
Run inference:K=20, type sum_b ====
load p(z):../output/model/k20.pz
[Error] file not find:../output/model/k20.pz
================ Topic Display =============
Traceback (most recent call last):
I'm guessing that this is simply me using the wrong version of Python. If so, how do I change the version of Python that I am using? Or if this is an actual recognizable error in the code how do I correct it?
indexDocs.pya program that you wrot?