Giter VIP home page Giter VIP logo

mixture-tdsms's People

Contributors

fenchri avatar

Watchers

 avatar

mixture-tdsms's Issues

Lack of .bin files

Hello, When I run the code, there will be an error below. Is there a missing file?hope for your reply~

18:49:00 : INFO : loading projection weights from results\dsms\50\cbow_d300_w5\0.bin

FileNotFoundError Traceback (most recent call last)
in
76 'LR': mix2.lr_train(tmp, pairs, max([p.score for p in tmp]))}
77 else:
---> 78 mix = M(pairs, topic_dsms, topics, topic_model, topic_sims_dir, load=sim_load)
79 scores = {'MaxSim': utils.spearman_cor(truth=ground_truth, predict=[mix.MaxSim(p) for p in pairs]),
80 'AvgSim': utils.spearman_cor(truth=ground_truth, predict=[mix.AvgSim(p) for p in pairs]),

~\Desktop\2019-07-29 混合情感分析和分布式模型的主题模型mixture-tdsms-master\mixture.py in init(self, pairs, tdsms, topics, topic_model, topic_sims_dir, load)
31 self.tdsms[t_] = tdsms[t_].load_similarities(os.path.join(topic_sims_dir, str(t_)))
32 else:
---> 33 self.tdsms[t_] = tdsms[t_].extract_similarities(pairs, os.path.join(topic_sims_dir, str(t_)))
34
35 self.topic_model = topic_model.load_model()

~\Desktop\2019-07-29 混合情感分析和分布式模型的主题模型mixture-tdsms-master\modules.py in extract_similarities(self, data, filename)
246 filename (str): filename to store similarities (pickle format)
247 """
--> 248 dsm_vecs = self.vectors()
249 dsm_vocab = dsm_vecs.wv.vocab
250

~\Desktop\2019-07-29 混合情感分析和分布式模型的主题模型mixture-tdsms-master\modules.py in vectors(self)
234 Get semantic vectors stored in binary format.
235 """
--> 236 wv_from_bin = KeyedVectors.load_word2vec_format(self.bin_file, binary=True)
237 return wv_from_bin
238

d:\anaconda20190415\lib\site-packages\gensim\models\keyedvectors.py in load_word2vec_format(cls, fname, fvocab, binary, encoding, unicode_errors, limit, datatype)
1496 return _load_word2vec_format(
1497 cls, fname, fvocab=fvocab, binary=binary, encoding=encoding, unicode_errors=unicode_errors,
-> 1498 limit=limit, datatype=datatype)
1499
1500 def get_keras_embedding(self, train_embeddings=False):

d:\anaconda20190415\lib\site-packages\gensim\models\utils_any2vec.py in _load_word2vec_format(cls, fname, fvocab, binary, encoding, unicode_errors, limit, datatype)
340
341 logger.info("loading projection weights from %s", fname)
--> 342 with utils.open(fname, 'rb') as fin:
343 header = utils.to_unicode(fin.readline(), encoding=encoding)
344 vocab_size, vector_size = (int(x) for x in header.split()) # throws for invalid file format

d:\anaconda20190415\lib\site-packages\smart_open\smart_open_lib.py in open(uri, mode, buffering, encoding, errors, newline, closefd, opener, ignore_ext, transport_params)
305 buffering=buffering,
306 encoding=encoding,
--> 307 errors=errors,
308 )
309 if fobj is not None:

d:\anaconda20190415\lib\site-packages\smart_open\smart_open_lib.py in _shortcut_open(uri, mode, ignore_ext, buffering, encoding, errors)
510 #
511 if six.PY3:
--> 512 return _builtin_open(parsed_uri.uri_path, mode, buffering=buffering, **open_kwargs)
513 elif not open_kwargs:
514 return _builtin_open(parsed_uri.uri_path, mode, buffering=buffering)

FileNotFoundError: [Errno 2] No such file or directory: 'results\dsms\50\cbow_d300_w5\0.bin'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.