atulkumarin / declare Goto Github PK
View Code? Open in Web Editor NEWDeClarE: Debunking Fake News and False Claims using Evidence-Aware Deep Learning
DeClarE: Debunking Fake News and False Claims using Evidence-Aware Deep Learning
We should enforce this by default.
I am trying to run DeClarE using the DeClareMain.ipynb notebook in your repository.
When it gets to the cell containing snopes = DeClareDataset(SNOPES_LOC, glove_data_file)
I get the following error:
AttributeError Traceback (most recent call last)
in
----> 1 snopes = DeClareDataset(SNOPES_LOC, glove_data_file)
~/code/nlp_credibility/DeClare/data/datasets.py in init(self, news_dataset_path, glove_path)
35 self.vocab_vectors_path = os.path.join(os.path.dirname(news_dataset_path), 'vocab_vectors.npy')
36
---> 37 self._build_vocabulary()
38 self._build_source_vocabularies()
39
~/code/nlp_credibility/DeClare/data/datasets.py in _build_vocabulary(self)
76 self.vocab[word] = token_count
77 token_count += 1
---> 78 embeddings.append(self._vec(word))
79 else:
80 # Treat it as an unknown token
~/code/nlp_credibility/DeClare/data/datasets.py in _vec(self, w)
126
127 def _vec(self, w):
--> 128 return self.glove_df.loc[w].as_matrix()
129
130 def len(self):
~/miniconda/lib/python3.7/site-packages/pandas/core/generic.py in getattr(self, name)
5272 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5273 return self[name]
-> 5274 return object.getattribute(self, name)
5275
5276 def setattr(self, name: str, value) -> None:
AttributeError: 'Series' object has no attribute 'as_matrix'
I believe glove_df.loc is returning a _LocIndexer object which does not have an as_matrix() method. Could it be missing the method, or is self.glove_df.loc[w] supposed to return something different?
Although there will be no runtime issue due to the token in vocab, the model may not generalize well during inference. We can replace it with a universal vocab file (per-processced and fixed of appropriate size - some subset of GloVe vocabulary, taking the full Glove vocab will be memory intensive, so we can choose top frequent words on news sites).
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.