Comments (5)
Unfortunately, I haven't stored the wikipedia corpuses any longer. They were downloaded on February 22th
I have upgraded my system since, and am trying again with the updated code, will keep you informed if it is now solved.
from deeptype.
Problem solved with latest version of code (commit 7271648) , Python 3.6rc5 on Ubuntu Bionic Beaver (18.04), and latest wikipedia dumps (as of 23th March 2018).
Thanks for your time !
from deeptype.
More changes are required : Human can be replaced by 'Q5', but Food cannot be replaced by 'Q2095'
issue running 'extraction/classifiers/type_classifier.py', please fix.
'enwiki/Q2095'
Traceback (most recent call last):
File "extraction/project_graph.py", line 123, in main
classification = classifier.classify(collection)
File "extraction/classifiers/type_classifier.py", line 32, in classify
FOOD = wkp(c, "Q2095")
File "extraction/classifiers/type_classifier.py", line 14, in wkp
return c.article2id['enwiki/' + name][0][0]
File "src/marisa_trie.pyx", line 578, in marisa_trie.BytesTrie.getitem (src/marisa_trie.cpp:10859)
KeyError: 'enwiki/Q2095'
from deeptype.
In classifiers two function help with construct indices from string names:
def wkp(c, name):
return c.article2id['enwiki/' + name][0][0]
def wkd(c, name):
return c.name2index[name]
the wkp
function uses Wikipedia titles to get a numeric id (but assumes the name is from the English wikipedia), while wkd
uses Wikidata's id scheme to get a numeric id. So you would have wkp(c, "Human") == wkd(c, "Q5")
.
Is there any other information you could give about this problem (e.g. Python version, wikipedia corpuses you extracted to run this) ?
Also, random theory: the issue might be bytes vs. str in the case you mentioned (e.g. do:
def wkp(c, name):
return c.article2id[('enwiki/' + name).encode("utf-8")][0][0]
If for some reason marisa-trie requires byte keys on your installed version
from deeptype.
Thanks! Please re-open when if the problem persists :)
from deeptype.
Related Issues (20)
- Getting NaN loss after few epochs ~30 HOT 1
- Evaluate Learnability does not give output graph as per the jupyter notebook LearnabilityStudy.ipynb
- FileNotFoundError: [Errno 2] No such file or directory: 'data/location_classification/classes.txt' HOT 1
- Getting coverage for only 6 million wikidata items in evolved type HOT 4
- How can I find associated types of an entity ? HOT 1
- how much disk for decompress the file latest-all.json.bz2 HOT 9
- No space left on device error when running full_preprocess.sh HOT 2
- where do you get candidate entities for a mention from? HOT 7
- How to write the function classify() in extraction/type_classifier.py? HOT 2
- Where is this file, or from which file and step it was generated? HOT 1
- How can i use an evolved type system only? HOT 1
- alpha in equation and how to select parameters in training type classifier HOT 1
- Compatibility with Tensorflow 1.14 HOT 2
- Train in a custom dataset HOT 4
- Is there a pre-trained, plug-n-play model that we can play with? HOT 5
- Use Python 3.6 and Cython 0.26 to install wikidata_linker_utils HOT 1
- FileNotFoundError: [Errno 2] No such file or directory: 'data/wikidata/wikidata_wikititle2wikidata.tsv' HOT 1
- Issue replicating accuracy of 0.98 HOT 2
- TypeError: 'NoneType' object is not iterable when running full_preprocess.sh HOT 3
- load_wikidata_ids tries to build a marisatrie.RecordTrie. Python runs out of memory.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deeptype.