Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: dtype('float32') #1

Open
giangdip2410 opened this issue Feb 10, 2022 · 6 comments
Open

KeyError: dtype('float32') #1

giangdip2410 opened this issue Feb 10, 2022 · 6 comments

Comments

@giangdip2410
Copy link

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')

@brucewlee
Copy link
Owner

I'll look into this

@Kulisap1994
Copy link

Hi, your work is interesting. I look forward to testing out the knowledge features of your research work. :)

@brucewlee
Copy link
Owner

@giangdip2410
Currently, I'm a little busy for EMNLP 2022. I will fix the pointed out mistake in mid-June.

@Kulisap1994
Thank you for your interest!
If you need any assistance in reproducing the results, please email me or leave comment :)

@venkatsubash2003
Copy link

I'm getting the same keyError that @giangdip2410 got.Can you please help me out with this?

@brucewlee
Copy link
Owner

@venkatsubash2003 I'm building a new library that mitigates all such issues (lmk if you want to contribute). But try upgrading Gensim and tell me if it works!

@venkatsubash2003
Copy link

@brucewlee I would like to contribute as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants