Giter Site home page Giter Site logo

vsop's Introduction

vsop

Build

Command line translation tool using CTranslate2.

This tool employs a client-server approach to avoid loading the model every time a text needs to be translated.

Basic Usage

Since this tool consists of a client and a server, the server vsops needs to be started first. This command runs the server in the background:

vsops &

Then, run the client vsop to translate text. This command launches vsop, which opens an editor for entering the text to be translated:

vsop

After saving and closing the editor, the text is translated.

Installation

brew install jkawamoto/tap/vsop

Prebuilt binaries are also available on the release page.

Compilation

This tool works on Linux and Mac, using several backend libraries such as OpenBLAS, Intel MKL, Ruy, and Apple Accelerate.

See the ct2rs documentation for instructions on how to compile this tool using these backends.

Commands

This tool provides the following commands.

vsop

A client application for vsops, a translation server using CTranslate2.

This application opens an editor specified by the EDITOR environment variable and sends a translation request with the written text to the server. If a file path is provided using the --file flag, the text in the file will be used for the translation request. If the --stdin flag is given, it reads from stdin to obtain the text for translation.

To communicate with the server, it uses a domain socket. It attempts to connect to the socket file located in the user's data directory. However, if a different path is specified with the --socket-file flag, it will connect to the socket file at that specified location.

vsops

A translation server using CTranslate2.

This server creates a UNIX domain socket, listens for translation requests, and handles them accordingly.

By default, a socket file is created in the user’s data directory. If the --socket-file flag is used to specify an alternative path, the socket file will be created at that location.

The model specified by the --model flag will be downloaded from Hugging Face and loaded. If the --model-dir flag is used to specify a directory path, the model within that directory will be loaded instead.

License

This application is released under the MIT License. For details, see the LICENSE file.

vsop's People

Contributors

jkawamoto avatar dependabot[bot] 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.