fenchri / mixture-tdsms Goto Github PK
View Code? Open in Web Editor NEWSource code for the ICSC 2018 paper: "Mixture of Topic-Based Distributional Semantic and Affective Models"
License: Apache License 2.0
Source code for the ICSC 2018 paper: "Mixture of Topic-Based Distributional Semantic and Affective Models"
License: Apache License 2.0
Hello, When I run the code, there will be an error below. Is there a missing file?hope for your reply~
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.