Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Copy Japanese sentences and automatically generate translations or vocabulary lists using AI

License

NotificationsYou must be signed in to change notification settings

alac/clipboard_translate

Repository files navigation

Copy Japanese sentences and automatically generate translations or vocabulary lists using AI.Useful with a text hooking utility like Textractor.

"Recording of the live translation behavior"
Live translations, vocabulary lists.

"Recording of the ai questioning behavior"
Ask questions, with the previous lines as context. Uses ctrl+enter as a shortcut.

Additional features:

  • Keeps a history of previous lines, so that translations can be more accurate.
  • Allows for supplying a 'context' for a description of what you're translating (e.g. "These are twitter posts", or a list of characters in a story).

Setup

  1. Install withpip install -r requirements.txt andpython -m unidic download.
  2. Editsettings.toml to enable what you want.
  3. For AI behaviors, you can either set a Google Gemini API key in the settings file.
    Or, install Oobabooga's Text-Generation-WebUI, enable the API and configure it in the settings file.
  4. Start the app by enteringpython -m jp_vocab_monitor_ui [story_name].

Configuration

You can also configure the program by creating auser.toml in the root directory. Then, settings will be loaded fromsettings.toml first, with any overlapping values overridden byuser.toml.

Per story configuration is also possible by adding a[story_name].toml in thesettings folder.
In particular, you can add synopsis to guide the AI with theai_translation_context key.

Suggested Models

I've seen decent translation quality with the following local models:

If you're going toask the AI questions about Japanese, I'd recommend using Google's Gemini Pro via API (Gemini 1.5's accuracy is great; and the free-tier rate limiting should be fine for reading).

Credits

For definitions and katakana readings in non-ML mode, we use a modifiedJitendex, which is under theShareAlike license.

For breaking sentences into words, we usefugashi.

About

Copy Japanese sentences and automatically generate translations or vocabulary lists using AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp