olety / epwing2kindle Goto Github PK
View Code? Open in Web Editor NEWConverting EPWING dictionaries into something you can actually use (mobi)
License: GNU General Public License v3.0
Converting EPWING dictionaries into something you can actually use (mobi)
License: GNU General Public License v3.0
The Tab to Opf conversion step does not create a file when running the standard tool, and the japanese-specific tool gives a UnicodeEncodeError.
Standard Tool
Reading keys: 534710keys [00:04, 125764.89keys/s]
Writing html: 43files [00:04, 8.96files/s]
Writing opf:
Japanese-Specific
Reading keys
Writing keys
Traceback (most recent call last):
File "D:\grant\Downloads\epwing2kindle-master\tab2opf-master\tab2opf.py", line 329, in <module>
ndicts = writekeys(defns, name)
File "D:\grant\Downloads\epwing2kindle-master\tab2opf-master\tab2opf.py", line 252, in writekeys
writekey(to, key, defns[key])
File "D:\grant\Downloads\epwing2kindle-master\tab2opf-master\tab2opf.py", line 229, in writekey
to.write('; '.join(ndefn for _, ndefn, _ in g))
File "C:\Python\Python36-32\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 2-9: character maps to <undefined>
I looked into the closed issue that covered a similar problem, but it didn't seem to be applicable to this one. I tried with a different dictionary and it gave me a unicode error as well.
As per said in the title, I tried running yomi2tab.py on an already created json (specifically a korean-japanese one) and got this, on Linux 20.03:
$ python3 yomi2tab.py -o ko-jadict.tab yomi_output/
Processing files: 0%| | 0/1 [00:00<?, ?file/s]/home/musrar/Documents/korean dict/epwing2kindle-master/yomi2tab.py:90: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos]
if 'β' in row[0]:
Processing files: 100%|βββββββββββββββββββββββββ| 1/1 [03:48<00:00, 228.24s/file]
Traceback (most recent call last):
File "/home/musrar/Documents/korean dict/epwing2kindle-master/yomi2tab.py", line 229, in
result = process_folder(args.folder, simplify=args.simplify)
File "/home/musrar/Documents/korean dict/epwing2kindle-master/yomi2tab.py", line 169, in process_folder
result.replace('', pd.np.nan, inplace=True)
AttributeError: module 'pandas' has no attribute 'np'
The result was a 0 bytes "koja-dict.tab"
I could provied the .json file if needed be.
Describe the bug
I wanted to convert my existing jmdict_german dictionary to a Kindle compatible file. But I just get syntax errors. IDK why this is happening. Additional, even if it would work, I wasn't really able to find a kindlegen setup or which version I need at least and Amazon doesn't offer it as a download any more.
To ReproduceD
Steps to reproduce the behavior:
Expected behavior
I thought it would convert my JSON files into Tab files so that I can forward with the whole process.
Desktop (please complete the following information):
Additional context
/
Currently inflection recognition seems pretty random, some times it actually founds the verb but a lot of the time it just display a noun.
For instance:
When looking for εγγ¦ it shows the definitions of "εγ" where it should be displaying "εγγ"
When looking for ζ₯γ it shows the definitions of "ζ₯" where it should be displaying "ζ₯γ"
but
When looking for ι£²γΎγͺγγ£γ it correctly displays ι£²γ
jdmict-kindle seems to have much better inflection recognition so perhaps it may be worth a look?
https://github.com/jrfonseca/jmdict-kindle
Processing files: 0%| | 0/30 [00:00<?, ?file/s] Traceback (most recent call last): File "yomi2tab.py", line 229, in <module> result = process_folder(args.folder, simplify=args.simplify) File "yomi2tab.py", line 127, in process_folder 'unknown3', 'def', 'id', 'unknown4'] File "/home/ubuntu/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 3094, in __setattr__ return object.__setattr__(self, name, value) File "pandas/_libs/src/properties.pyx", line 65, in pandas._libs.lib.AxisProperty.__set__ (pandas/_libs/lib.c:45255) File "/home/ubuntu/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 473, in _set_axis self._data.set_axis(axis, labels) File "/home/ubuntu/.local/lib/python3.6/site-packages/pandas/core/internals.py", line 2836, in set_axis (old_len, new_len)) ValueError: Length mismatch: Expected axis has 3 elements, new values have 8 elements
Hello!
I am trying to convert some dictionaries from: yomichan and i got the error above.
I skipped the yomichan-import phase since the dictionaries there are already in json format. So i just unzip and then use the command:
python3 yomi2tab.py -o innocent_corpus.tab yomi_output/
The dictionaries i want to convert are innocent_corpus.zip, kanjidic_english.zip, kireicake.zip.
Is it because the dictionaries on yomichan are not compatible with the script, or is something wrong with my python installation?
Thank you!
Describe the bug
In the 3rd step, converting the JSON to Tab, python on my computer doesn't seem to be able to recognise yomi2tab.py and gives me the error in the screenshot. I have yomi2tab.py in my working folder. Should I try to use 3.6 instead? I might be messing up something really obvious, I've never used Python before
PS:
For clarification; I used "py -3.7" in the screenshot above but it returns the same error if i write "py -3" and if i use a different directory on a different disc
Hi! I am Xavier22 from the koohii thread, thanks so much for making this. I am not sure if it's okay to post technical support questions in the issues section, but I was trying to install the requirements and was not able to. I just got this screen here:
Do you have any idea what I might be doing wrong?
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.