Coder Social home page Coder Social logo

ner's Introduction

NER

NER is not Enough Readable.

REQUIREMENTS

INSTALL dependent python packages

pyenv install 3.11
pipenv install

INSTALL nltk dataset/model

python -m nltk.downloader popular

USAGE

python launcher.py <COMMAND> [<PATH-of-origin-PDF-file>]

List of COMMAND

COMMAND DESCRIPTION
help Display help
$ python launcher.py translate <PATH-of-origin-PDF-file>
translate Translate the specified file. config.yml can be edited to change the translation service and fonts to be used. The output file name is the basename of the followed by "_new".

example:
    test.pdf -> test_new.pdf
$ python launcher.py translate <PATH-of-origin-PDF-file>
combine Combine the original and translated(suffix "_new") files. By displaying them as a spread, you can compare the original and the translated text.
$ python launcher.py translate <PATH-of-origin-PDF-file>

Config file

We need to prepare a configuration file. This will contain information about the translation service, fonts, etc. The name of the configuration file should be "config.yml". An example configuration is available as "config_sample.yml".

PRIORITY: 'GOOGLE'
GOOGLE:
  URL: 'https://google.com'
TEXTRA:
  NAME: sample
  KEY: keysamplekeysamplekeysamplekeysamplekeysample
  SECRET: secretsamplesecretsamplesecretsamplesecretsample
  URL: 'https://mt-auto-minhon-mlt.ucri.jgn-x.jp/api/mt/generalNT_en_ja/'
FONT: '~/example.ttf'

Config

You can use two translation services, みんなの自動翻訳@TexTra and Google Translate.(DeepL is not supported) If you use みんなの自動翻訳@TexTra, you can choose from several endpoints. For English-Japanese translation, the following two options are available:

The meaning of each setting will be added soon.

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.