lingfeat icon indicating copy to clipboard operation
lingfeat copied to clipboard

KeyError: dtype('float32')

Open giangdip2410 opened this issue 2 years ago • 6 comments

Thank you for your great work. I test with a sentence: "The commutator is peculiar, consisting of only three segments of a copper ring, while in the simplest of other continuous current generators several times that number exist, and frequently 120! segments are to be found. These three segments are made so as to be removable in a moment for cleaning or replacement. They are mounted upon a metal support, and are surrounded on all sides by a free air space, and cannot, therefore, lose their insulated condition. This feature of air insulation is peculiar to this system, and is very important as a factor in the durability of the commutator. Besides this, the commutator is sustained by supports carried in flanges upon the shaft, which flanges, as an additional safeguard, are coated all over with hard rubber, one of the finest known insulators. It may be stated, without fear of contradiction, that no other commutator made is so thoroughly insulated and protected. The three commutator segments virtually constitute a single copper ring, mounted in free air, and cut into three equal pieces by slots across its face." When I call 3 API below it's error

WoKF = LingFeat.WoKF_() # Wikipedia Knowledge Features

WBKF = LingFeat.WBKF_() # WeeBit Corpus Knowledge Features

OSKF = LingFeat.OSKF_() # OneStopEng Corpus Knowledge Features

Do you know how to fix this issue. Thank you. I install library with second option on google colab: !git clone https://github.com/brucewlee/lingfeat.git !pip install -r lingfeat/requirements.txt

KeyError Traceback (most recent call last) in () ----> 1 WoKF = LingFeat.WoKF_() # Wikipedia Knowledge Features

6 frames /usr/local/lib/python3.7/dist-packages/gensim/models/ldamodel.py in inference(self, chunk, collect_sstats) 665 # phinorm is the normalizer. 666 # TODO treat zeros explicitly, instead of adding epsilon? --> 667 eps = DTYPE_TO_EPS[self.dtype] 668 phinorm = np.dot(expElogthetad, expElogbetad) + eps 669

KeyError: dtype('float32')

giangdip2410 avatar Feb 10 '22 15:02 giangdip2410