pgaskin / ePubViewer

ePub viewer with dictionary, themes, search, offline support, and more
http://pgaskin.net/ePubViewer
MIT License
338 stars 74 forks source link

Suggestion: A fork for kanji lookup #18

Closed ninep9up closed 3 years ago

ninep9up commented 3 years ago

There's an API for Japanese words lookup at https://kanjiapi.dev/

Can you make a fork for that? Your epub-viewer is the kickassest, it would mean a world to the students who get their days by by converting japanese pdf books to epub just so they'd be practical to use.

Just try to get all the kana out and request the words written with up to several kanjis to https://kanjiapi.dev/v1/words/.

I'd do that myself. But I don't know javascript and it's too hard for me to get through your code. I'm also an artist, and programming makes my head hurt. I admire the God guy, he's like took these classes together, but where I live it's even hard to find a guy who needs a thing drawn and can pay 50 rubles for it. Talk about all that Nihonnese escapism.

pgaskin commented 3 years ago

What you're looking for is here:

https://github.com/pgaskin/ePubViewer/blob/6fe236896fa1c8ac9e3889fd66bfb13c94a258f6/script.js#L612-L662

ninep9up commented 3 years ago

Well, your art is breathtaking.

ninep9up commented 3 years ago

What I'm saying is, I can analyze code to a degree, I can't write it. Obviously, my reasoning behind you adding an additional fetching from an API was due to the fact that I've read that part of it.

ninep9up commented 3 years ago

Also, I'm having doubts from experience that selecting a single kanji char would work, which is kind of crucial. Jesus, you're really trying to make a Kojima Productions out of one man. With all my to-be-skills a reason to skip this matrix episode altogether will become extremely sophisticated.

ninep9up commented 3 years ago

I dare to question my existence when all of the things to happen to me that really merit actually imply that I live in a simulation. I try to skip the part with getting educated due to that fact, it's hard to really wanna do something, when the shit's gonna ignore you anyway. Russian outskirt is already a bulimia of existentialism.

ninep9up commented 3 years ago

I mailed Sapolsky once a retelling of my extremely mystic experience of a dream that bore a piece of information I could not know as well as an experience which was phenomenologically questionable so he could tell me what it was. No reply.

ninep9up commented 3 years ago

Let artists be artists, atheists be atheists and programmers be programmers. It's not my notion.

ninep9up commented 3 years ago

I try to overcome myself every fucking time. Every fucking time there's an invisible wall that just shits on my idea behind the fact I came to it even though I'd put all my time and resources to do so.

ninep9up commented 3 years ago

How's the weather in Ontario?

ninep9up commented 3 years ago

The hardest part was when I had feelings. Now I'm just a quiet scrutiny of ideas, a shell of a man, a lousy skeptic.

ninep9up commented 3 years ago

I don't want things, I do them just for the sake of it. A samurai for a brahman.

ninep9up commented 3 years ago

Just tell me I'm a delusional egomaniac. Better spam Sapolsky though.

pgaskin commented 3 years ago

Umm... ok then... what exactly would you want the lookup to show?

ninep9up commented 3 years ago

Does Japan really exist. Just kidding.

All there is to response of https://kanjiapi.dev/v1/words/{word}, for example https://kanjiapi.dev/v1/words/案

It happens, the words I'd really like to check upon, like 七輪 or 公案 aren't really there. It means, there aren't several-kanji words available through that API. I feel like an idiot. Change of plans. After a quick lookup the best option would be Jisho API.

https://jisho.org/api/v1/search/words?keyword={word} https://jisho.org/api/v1/search/words?keyword=七輪 https://jisho.org/api/v1/search/words?keyword=公案

I guess, people would like to see: The Word Itself Alternative spellings with kana or, if that happens for single-kanji words, Kun and On readings (they are under japanese: in word: and reading:) A part of speech, a tag for specifics (if any, the one under senses:)

List of definitions

Wikipedia lookup links are optional, I guess, but I wouldn't leave them out.

You are the cool guy that moves things forward. Despite the sound of the things I said, I admire you.

You probably should also add an option to flip through different meanings if the word has many: https://jisho.org/api/v1/search/words?keyword=人

ninep9up commented 3 years ago

Jesus, it feels like a lot, but you're the guy who had the straightest hands to write a epub-viewer that looks like something, so it means you're capable.

ninep9up commented 3 years ago

I don't want to sound pretentious and naive, by the way. The ability to act normal dies in an artist pretty fast. I like the guys who think rational is the only thing out there, but if you look at our kind, it seems a bit of an overstretch. If this half of the things that made me me wasn't really there, it's already a reason for a public hysteria, as I tend to think. Yeah, that's how I probably comply with my behaviour.

aledemajo commented 3 years ago

Give him a minute, I'm sure he'll look into it 😃

ninep9up commented 3 years ago

Give him a minute, I'm sure he'll look into it 😃

10k of these.

ninep9up commented 3 years ago

Looks like he sapolskis me.

ninep9up commented 3 years ago

I can hardly blame him. Everyone sapolskis me.

pgaskin commented 3 years ago

Sorry about the delay. I was busy with a work and a few other projects. I'll work on this sometime in the next few days.

ninep9up commented 3 years ago

Sorry about the delay. I was busy with a work and a few other projects. I'll work on this sometime in the next few days.

Backed from my experience, the merrier it goes the better everything gets. I'm a bit critical about everything in the world because of the fences people stumble upon, but maybe all there is is the feeling about being stumbled and determined about taking 100 more steps what I with my ressentiment quitter culture don't partake. That places a notion as a kitschy sometimes, but looking over the presumably fictional history, it doesn't really look like anything great was created with a backhand.

You probably shouldn't be apologizing. If the suggestion doesn't strike you as needed, maybe there's nothings but explained sentences in that book. Maybe I take a God's word for more than it's worth. Maybe we all. Maybe all this f-ry is just a dump of crisis thoughts and dumb foundations. Nobody wants that but it just doesn't take to get another view of it which has a slight bit of hope to it. It's not even September, and people already starting to act depressed (talking about me, yeah) is just plain wrong in my analysis. But I'm never right.

An hurricane hit me in my dream what felt a bit like sandstorm with visibility close to zero. Like I was giving a fuck, lol. I crouched for one that moment, and one guy had a blue glowing under him. That's poetic, it is, but I'll never have guts to imagine this myself. Maybe people convert their souls to mechanisms, maybe you should stop doing it. Maybe it's all but a social gesture to the greeded crowd, and I'm the greeded crowd. There's not enough to the world, that's all I know. Most of the time my partaking is somewhat ignored, that's what I see. That's a plain oxymoronic thesis to grow anything on. Maybe I should stop and just stare at the ceiling. I won't though, like hell I will.

ninep9up commented 3 years ago

Somehow this rose overnights. https://github.com/thelong0705/jisho_tooltip

I'll test it out to see if it's any good.

ninep9up commented 3 years ago

Somehow this rose overnights. https://github.com/thelong0705/jisho_tooltip

I'll test it out to see if it's any good.

Looks like a mess.

ninep9up commented 3 years ago

Somehow this rose overnights. https://github.com/thelong0705/jisho_tooltip I'll test it out to see if it's any good.

Looks like a mess.

Does not work in a Firefox, loading times are suicidal, lots of stuff to be considered.

ninep9up commented 3 years ago

Japanese doesn't exist so far, considering it takes an eternity to look up a bunch of kanjis.

While this thing runs in a blink, has the same theoretical structure, it's just Chinese. Which does exist probably. https://bkrs.info/p46

ninep9up commented 3 years ago

Man, if you just build the thing, you'd be like the guy who made the first not-obnoxious epub reader, plus the ultimate kanji lookup tool. Rikaichan just isn't right for the education. It takes precision hovering to stuff, keeping it there, mumbling words. It's like a disaster javascriptic rationalization for my solipsistic nightmare.

ninep9up commented 3 years ago

Jisho uses some dumb cross-origin policy, I hope there's a tribune in hell to ask God why's that's even a thing. I'm just so close to doing something screaming WHY ARE THE THINGS THIS WAY IS IT EVEN POSSIBLE TO BE COUNTERPRODUCTIVE BY DEFINITION WITHOUT PRODUCING

ninep9up commented 3 years ago

All these all-inclusivity by design in all the extensions and services without, actually, practical things in it, it's just so wrong. No one's learning while the mouse is in the hands - it makes your brain concentrate on topology instead of the word. No one reviews words he has learned, it's not sports, come on, it's just a do-know by a repetition. All these dogmas are so premature, aarrrghhhh.

ninep9up commented 3 years ago

This is gonna sound difficult, now that I even don't seem to care anymore, but maybe the best way is to: mecab a sentence to bits, set a mobile user-agent while blocking oversized domains like

https://static00.forvo.com/_presentation/assets/css/ https://static00.forvo.com/_presentation/assets/img/ https://tangorin.com/vendors https://tangorin.com/app

and just scrape, while getting a sounding from https://forvo.com/search/七輪/#ja with full-word meaning from the corner and optional kanji look-ups from below of https://tangorin.com/kanji?search=七輪

Jisho just doesn't look like it. I don't know. This all just seems too silly.

ninep9up commented 3 years ago

Either way it's still ignore CORS/X-frame by browser extensions in the end. With all that web with it as it is now.

ninep9up commented 3 years ago

Just need to scrape these. With like Opera/9.80 (J2ME/MIDP; Opera Mini/5.0 (SymbianOS/24.838; U; en) Presto/2.5.25 Version/10.54

html.no-js.noflash body.ltr div#wrap div#displayer div.mainpage.fullpage.page_search section.main_section article.search_words div.results_match ul.word-play-list-icon-size-l li span

.altResultGroup > dl:nth-child(1)

I don't know if these are permanent, but from the looks of it they sort of are.

ninep9up commented 3 years ago

I just put up what it would look like, just needs some padding for the button plus the border. Though I'm still thinking on getting sentence to bits. There's a parser in a furigana inserter (under utilities.js). It should work? It was written before web-extensions, don't know if it's gonna work. Untitled furiganainserter@zorkzero.net.zip

ninep9up commented 3 years ago

Do all artists who just wanna learn Japanese need to bring their scraped collection of binaries with them just so the future listens. I mean, it's dumb. Aren't you programmers need to maintain stuff and automatize it and bring it to life. I just want to draw. It's the only thing I do good besides, like, getting angry at corporations, standards and the Aristos bunch.

ninep9up commented 3 years ago

From the looks of it, you're very Kobo, maybe you'd do well with just https://github.com/rakuten-nlp/rakutenma though. I mean, what a coincidence that my current narrative has a Rakuten' Canadian subsidiary to develop for them. You're like a super-part of this ontology. You were like born to do it, or, like imagined to be born by this all-powered deity who sort of ignores me still.

ninep9up commented 3 years ago

Jesus, I hate Sapolsky. Is it ok to believe in Jesus more.