Git Product home page Git Product logo

tag-translation-assistant's Introduction

88888888888   88888888888     d8888         
    888           888        d88888         
    888           888       d88P888         
    888   8888b.  888      d88P 888 .d8888b 
    888      "88b 888     d88P  888 88K     
    888  .d888888 888    d88P   888 "Y8888b.
    888  888  888 888   d8888888888      X88
    888  "Y888888 888  d88P     888  88888P'
                       Tag Translation Assistant

ko-fi

Requirements

  • Python 3.9+
  • A basic understanding of Poetry

Installation

  1. Clone this repository
  2. Navigate to the resulting folder in your favorite terminal
  3. Poetry install: poetry install or python -m poetry install or py -3.9 -m poetry install or equivalent

Usage

Basic requirements for running this module are either an input file with one tag per line or a space-delimeted list of tags passed via the terminal (tags with spaces can be passed using quotes).

This is the basic structure of a run command, including the full 'poetry run' portion:

python -m poetry run python -m tag_translation_assistant -i tagfile.txt -o resultfile.csv

Output will be a .csv file with the original tag in the first collumn and various translations in subsequent collumns.

DeepL

Upon first run, config.toml will be generated with a single entry:

[deepl]
apikey = ""

In order to use DeepL, you must visit the DeepL website, register an account and generate an API key, and then copy the api key into the configuration file. Next time you run, DeepL will be used.

It's important to note two things about DeepL, however. First, an account can only be used for either online translations or API translations, meaning if you already have an account and decide to create an API key on it, you will no longer be able to access the online translator. Second, DeepL is designed to work with sentences and paragraphs, not single words or short tags, so the results will often seem lower-quality in comparison to other translations. For these reasons, I don't consider it important to go through the work of setting up DeepL as an end user.

Help Output

Automatically machine-translate multiple tags

positional arguments:
  tags                  A space-delemited list of tags

optional arguments:
  -h, --help            show this help message and exit
  -i INFILE, --infile INFILE
                        A text file containing tags to be translated
  -o OUTFILE, --outfile OUTFILE
                        Path to a CSV file where results are saved
  -a, --artist          Perform an artist alias lookup instead of a normal tag lookup. Only uses Danbooru as a source.

tag-translation-assistant's People

Contributors

goawaynow avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.