TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Japanese language helper (WASM, PWA, no back-end)

4 点作者 Birch-san大约 6 年前
My web application makes it easier to read Japanese sentences.<p>Where does a word begin and end? (there&#x27;s no spaces) How do I pronounce the word? (phonetics are missing) How do I look up the word in the dictionary? (it&#x27;s necessary to know how to type it, and how to deconjugate verbs)<p>We can overcome these gaps with good software.<p>MeCab (compiled to WebAssembly) provides morphological analysis (guesses where words start and end, and what kind of word it is) Dictionaries are embedded, for client-side searching. As a result: there is no backend. The application is a Progressive Web Application, so it can be saved for offline use (141MB).<p><a href="https:&#x2F;&#x2F;birchlabs.co.uk&#x2F;mecab-web&#x2F;" rel="nofollow">https:&#x2F;&#x2F;birchlabs.co.uk&#x2F;mecab-web&#x2F;</a> (Warning: 37MB webpage)<p><i></i>Technical notes:<i></i><p>There&#x27;s a serious amount of dictionary included. I culled Kanjidic from 15.5MB to 0.7MB. Remaining dictionaries gzip pretty well (138MB -&gt; 36MB).<p>Apache is configured for streaming compilation and pre-computes gzips.<p>I wanted to explore whether we actually _need_ a bundler in 2019. I used @pika&#x2F;web to grab libraries as ES modules.<p>HTTP&#x2F;2 + gzip used instad of bundler. Source _is_ distribution; old school. No backend, so application can be served statically from a CDN.<p>Preact&#x2F;htm&#x2F;unistore are used instead of React&#x2F;JSX&#x2F;Redux. Libraries weigh &lt;100KB.<p>Workbox is used to generate a service-worker. Saves source code and assets so that the webpage can be saved as a PWA and used offline. Offline dictionaries have been done before (e.g. apps), but this is a particularly small one, and perhaps the first to provide sentence tokenization via MeCab.<p>I&#x27;d love to hear your feedback, be it on language concerns, technology, or user experience.

暂无评论

暂无评论