Giter VIP home page Giter VIP logo

quacknn-bopomofo's Introduction

quacknn-bopomofo

This project trys to emit Chinese text that looks like the input through the following procedure:

  • preprocess input material and replace Chinese text with bopomofo
  • pass it into an RNN as one-hot vectors
  • get the output and let an input method handle it

Using phonetic representations of Chinese help work around impractical vector sizes associated with the size of the charset. The model may learn to use phonetic puns.

Bopomofo is preferred to pinyin due to:

  • script separation: keeps the script difference (Latin vs. CJK)
  • well-formedness: valid bopomofo sequences can be constructed more easily
  • tone support: bopomofo IMs value tones more than pinyin IMs.

Dependncies

  • Preprocessing:
  • NN:
  • Input Method:

Preprocessing

The formatting of input files follow the good old one-unit-per-line rule. Each unit is passed into a monkey-patched version of pypinyin which yields bopomofo instead of pinyin.

Script or code point normalization is not mandatory as pypinyin accepts Unihan and GBK-PUA characters.

NN Dimensions

Our basic idea is one-hot vectors covering printable ASCII, bopomofo, and NUL/NL (as end of sequence marker) โ€” 127 - 31 + 41 = 137 dimensions. Extra 8-bit range may be considered for UTF-8 support as everyone loves to use emojis. With UTF-8 added, we have 137 + 128 - 13 = 252 dimensions. An extra 6+1 dimensions can be removed assuming all CJK Unified Ideographs are consumed, plus PUA ditched. ๐ŸŒš

Input Method

RIME should be the way to go.

quacknn-bopomofo's People

Contributors

artoria2e5 avatar gumblex avatar

Watchers

James Cloos avatar biergaizi avatar Star Brilliant avatar  avatar Ben (Bingxing) Wang avatar  avatar  avatar Tofu Soup avatar Han Dai avatar Nangcr 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.