yomigana-ebook


Nameyomigana-ebook JSON
Version 0.2.3 PyPI version JSON
download
home_pagehttps://github.com/rabbit19981023/yomigana-ebook
SummaryThe fastest converter to add yomigana(readings) to Japanese epub eBooks! (Using Mecab and Unidic)
upload_time2023-10-16 18:12:11
maintainer
docs_urlNone
authorYu Chen
requires_python>=3.11,<4.0
licenseMIT
keywords japanese lightnovel ebook epub furigana yomigana kanji mecab unidic nlp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # yomigana ebook

This project is aimed at making Japanese eBooks more friendly to those who are learning Japanese now by adding readings for every Kanji in the eBooks.

To achieve this, the project utilizes Mecab, a Japanese morphological analyzer, and Unidic, a dictionary developed by NICT, to tokenize words and obtain the corresponding yomigana (reading) of each word. This information is then inserted above or besides the kanji characters in the eBook text, allowing readers to easily read and understand the pronunciation of each word.

> This tool is also the fastest converter now. (compared to [Mumumu4/furigana4epub](https://github.com/Mumumu4/furigana4epub) & [itsupera/furiganalyse](https://github.com/itsupera/furiganalyse))

## Usage

1. install the package from `PyPI`:

    ```
    # install the package
    $ pip install yomigana-ebook

    # download the unidic dictionary
    $ python -m unidic download

    # you can convert your japanese ebooks now!
    $ yomigana_ebook [your-ebooks]
    ```

2. build from the source:

    ```
    $ git clone https://github.com/rabbit19981023/yomigana-ebook.git

    # install the project
    $ pip install ./yomigana-ebook

    # download the unidic dictionary
    $ python -m unidic download

    # you can convert your japanese ebooks now!
    $ yomigana_ebook [your-ebooks]
    ```

### For Windows Users

There's a known bug in Windows, see polm/fugashi#42 for more information

To solve it, you must install & use the package in an isolated `virtualenv`:

Here are some examples:

1. install the package from `PyPI`:

    ```
    # create the virtualenv
    $ python -m venv .venv

    # get into the virtualenv
    $ .venv\Scripts\activate

    # install the package
    $ pip install yomigana-ebook

    # download the unidic dictionary
    $ python -m unidic download

    # you can convert your japanese ebooks now!
    $ yomigana_ebook [your-ebooks]
    ```

2. build from source:

    ```
    $ git clone https://github.com/rabbit19981023/yomigana-ebook.git

    $ cd yomigana-ebook

    # create the virtualenv
    $ python -m venv .venv

    # get into the virtualenv
    $ .venv\Scripts\activate

    # install the project
    $ pip install .

    # download the unidic dictionary
    $ python -m unidic download

    # you can convert your japanese ebooks now!
    $ yomigana_ebook [your-ebooks]
    ```

To leave the `virtualenv`, just by a simple command:

```
$ deactivate
```

### Run the web demo via Docker

> NOTE: you NEED to run these commands in the project root, NOT in `web-demo` directory!

1. first we need to build the image:

    ```
    $ docker build -t yomigana-ebook/web-demo -f Dockerfile.web-demo .
    ```

2. then run the container:

    ```
    $ docker run --rm -p 8000:8000 yomigana-ebook/web-demo --host 0.0.0.0
    ```

3. finally just open your browser and navigate to `http://localhost:8000` to use it!

## Credits

This project was inspired by [Mumumu4/furigana4epub](https://github.com/Mumumu4/furigana4epub) & [itsupera/furiganalyse](https://github.com/itsupera/furiganalyse), and has some code from them.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rabbit19981023/yomigana-ebook",
    "name": "yomigana-ebook",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "japanese,lightnovel,ebook,epub,furigana,yomigana,kanji,mecab,unidic,nlp",
    "author": "Yu Chen",
    "author_email": "rabbit19981023@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c4/9a/62dcea8dc456cb62b261af8b6e25de749f0d9c1a7a6b1261ffcdba0f2c1a/yomigana_ebook-0.2.3.tar.gz",
    "platform": null,
    "description": "# yomigana ebook\n\nThis project is aimed at making Japanese eBooks more friendly to those who are learning Japanese now by adding readings for every Kanji in the eBooks.\n\nTo achieve this, the project utilizes Mecab, a Japanese morphological analyzer, and Unidic, a dictionary developed by NICT, to tokenize words and obtain the corresponding yomigana (reading) of each word. This information is then inserted above or besides the kanji characters in the eBook text, allowing readers to easily read and understand the pronunciation of each word.\n\n> This tool is also the fastest converter now. (compared to [Mumumu4/furigana4epub](https://github.com/Mumumu4/furigana4epub) & [itsupera/furiganalyse](https://github.com/itsupera/furiganalyse))\n\n## Usage\n\n1. install the package from `PyPI`:\n\n    ```\n    # install the package\n    $ pip install yomigana-ebook\n\n    # download the unidic dictionary\n    $ python -m unidic download\n\n    # you can convert your japanese ebooks now!\n    $ yomigana_ebook [your-ebooks]\n    ```\n\n2. build from the source:\n\n    ```\n    $ git clone https://github.com/rabbit19981023/yomigana-ebook.git\n\n    # install the project\n    $ pip install ./yomigana-ebook\n\n    # download the unidic dictionary\n    $ python -m unidic download\n\n    # you can convert your japanese ebooks now!\n    $ yomigana_ebook [your-ebooks]\n    ```\n\n### For Windows Users\n\nThere's a known bug in Windows, see polm/fugashi#42 for more information\n\nTo solve it, you must install & use the package in an isolated `virtualenv`:\n\nHere are some examples:\n\n1. install the package from `PyPI`:\n\n    ```\n    # create the virtualenv\n    $ python -m venv .venv\n\n    # get into the virtualenv\n    $ .venv\\Scripts\\activate\n\n    # install the package\n    $ pip install yomigana-ebook\n\n    # download the unidic dictionary\n    $ python -m unidic download\n\n    # you can convert your japanese ebooks now!\n    $ yomigana_ebook [your-ebooks]\n    ```\n\n2. build from source:\n\n    ```\n    $ git clone https://github.com/rabbit19981023/yomigana-ebook.git\n\n    $ cd yomigana-ebook\n\n    # create the virtualenv\n    $ python -m venv .venv\n\n    # get into the virtualenv\n    $ .venv\\Scripts\\activate\n\n    # install the project\n    $ pip install .\n\n    # download the unidic dictionary\n    $ python -m unidic download\n\n    # you can convert your japanese ebooks now!\n    $ yomigana_ebook [your-ebooks]\n    ```\n\nTo leave the `virtualenv`, just by a simple command:\n\n```\n$ deactivate\n```\n\n### Run the web demo via Docker\n\n> NOTE: you NEED to run these commands in the project root, NOT in `web-demo` directory!\n\n1. first we need to build the image:\n\n    ```\n    $ docker build -t yomigana-ebook/web-demo -f Dockerfile.web-demo .\n    ```\n\n2. then run the container:\n\n    ```\n    $ docker run --rm -p 8000:8000 yomigana-ebook/web-demo --host 0.0.0.0\n    ```\n\n3. finally just open your browser and navigate to `http://localhost:8000` to use it!\n\n## Credits\n\nThis project was inspired by [Mumumu4/furigana4epub](https://github.com/Mumumu4/furigana4epub) & [itsupera/furiganalyse](https://github.com/itsupera/furiganalyse), and has some code from them.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The fastest converter to add yomigana(readings) to Japanese epub eBooks! (Using Mecab and Unidic)",
    "version": "0.2.3",
    "project_urls": {
        "Homepage": "https://github.com/rabbit19981023/yomigana-ebook",
        "Repository": "https://github.com/rabbit19981023/yomigana-ebook"
    },
    "split_keywords": [
        "japanese",
        "lightnovel",
        "ebook",
        "epub",
        "furigana",
        "yomigana",
        "kanji",
        "mecab",
        "unidic",
        "nlp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22cbf293a422753b84f005ba52951438dc5cc331832c22288815d7246c9cb25c",
                "md5": "271d0cefffb843943b5d410ea90ed155",
                "sha256": "0e91e6649a3a43d7f36662098acf71cfc117ac596e13a5eb4cc172016ed93139"
            },
            "downloads": -1,
            "filename": "yomigana_ebook-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "271d0cefffb843943b5d410ea90ed155",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 7762,
            "upload_time": "2023-10-16T18:12:09",
            "upload_time_iso_8601": "2023-10-16T18:12:09.242472Z",
            "url": "https://files.pythonhosted.org/packages/22/cb/f293a422753b84f005ba52951438dc5cc331832c22288815d7246c9cb25c/yomigana_ebook-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c49a62dcea8dc456cb62b261af8b6e25de749f0d9c1a7a6b1261ffcdba0f2c1a",
                "md5": "79ad44259f438a1bb3d796760f8383b7",
                "sha256": "fe2a6eec9606c48ce71b5711b6e742e5b8ccb3fa4830d4e99ad803fdbeebc89a"
            },
            "downloads": -1,
            "filename": "yomigana_ebook-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "79ad44259f438a1bb3d796760f8383b7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 6110,
            "upload_time": "2023-10-16T18:12:11",
            "upload_time_iso_8601": "2023-10-16T18:12:11.020940Z",
            "url": "https://files.pythonhosted.org/packages/c4/9a/62dcea8dc456cb62b261af8b6e25de749f0d9c1a7a6b1261ffcdba0f2c1a/yomigana_ebook-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-16 18:12:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rabbit19981023",
    "github_project": "yomigana-ebook",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "yomigana-ebook"
}
        
Elapsed time: 0.12713s