TangentCFT
TangentCFT copied to clipboard
can only concatenate str (not "NoneType") to str
when I input the command:python3 tangent_cft_front_end.py -cid 1 -ds '/online/haoyu.hao/formula_semantic/TangentCFT-0909/DataSet/NTCIR-12/MathTagArticles' --slt False -em 'encoder.csv' --mp 'opt_model' --t False --rf res_1
I got
raceback (most recent call last):
File "tangent_cft_front_end.py", line 94, in
I just run the code, with the same configuration as you have shown, although please note that for OPT, we recommend the config file with id 2. I did not run into the issue you mentioned.
We are currently at maintenance issue, and there was an update (correction) on the encoder_tuple_level yesterday, have you applied that?
Is there a stable version? Different versions report different errors. Many thanks
I switch to the newest master version
When I input the command:python3 tangent_cft_front_end.py -cid 2 -ds '/online/haoyu.hao/formula_semantic/TangentCFT-0913/DataSet/NTCIR-12/MathTagArticles' --slt False -em 'encoder.csv' --mp 'opt_model' --t False --rf res_1
I got:
ERROR:root:'all ngrams for word \uea60\uf368\uea69\uea6aǽ absent from model'
Traceback (most recent call last):
File "/online/haoyu.hao/formula_semantic/TangentCFT-0913/tangent_cft_module.py", line 109, in __get_vector_representation
temp_vector = self.model.get_vector_representation(encoded_tuple)
File "/online/haoyu.hao/formula_semantic/TangentCFT-0913/tangent_cft_model.py", line 44, in get_vector_representation
return self.model.wv[encoded_math_tuple]
File "/root/anaconda3/lib/python3.8/site-packages/gensim/models/keyedvectors.py", line 169, in getitem
return self.get_vector(entities)
File "/root/anaconda3/lib/python3.8/site-packages/gensim/models/keyedvectors.py", line 277, in get_vector
return self.word_vec(word)
File "/root/anaconda3/lib/python3.8/site-packages/gensim/models/keyedvectors.py", line 1622, in word_vec
raise KeyError('all ngrams for word %s absent from model' % word)
KeyError: 'all ngrams for word \uea60\uf368\uea69\uea6aǽ absent from model'
Traceback (most recent call last):
File "tangent_cft_front_end.py", line 91, in
@haoyu09 I'm running into this same issue. Were you able to find a solution for it?