Giter VIP home page Giter VIP logo

furigana-converter's Introduction

Japanese text transliteration

Overview

This is a sample iOS app for converting Japanese text with kanji to hiragana, katakana, or Latin alphabet.

Sample app in action

Functionality

There are 3 options for converting text.

A JSON API to convert Japanese text with kanji to either hiragana or katakana.

An XML API to put ruby (furigana) over Japanese text with kanji. In this app it is used to convert text to either hiragana or Latin alphabet.

3. Core Foundation

CFStringTokenizer can be used to generate Latin transcription of Japanese text on device without using network. From that, a String transformation can be applied to get hiragana or katakana transliterations.

Configuration

To use network APIs you must first register a developer account with Goo and Yahoo! Japan (both are in Japanese only) and obtain App IDs for each.

Then fill them in furigana-converter/secrets.xcconfig. Don't use quotation marks, e.g.:

GOO_APP_ID = 12345abcd
YAHOO_APP_ID = 12345abcd

Next steps

This sample app can be improved in several ways.

  1. Implement tests.

  2. Introduce 3rd party frameworks to reduce complexity.

Stuff like Moya or/and Alamofire for network abstraction, RxSwift for better state handling.

  1. Add new functionality.
  • Copying the result to clipboard.
  • Take full advantage of Yahoo API and surface different options to user, or show results as actual furigana.
  • Put UI into table view and implement showing and managing history of requests.

furigana-converter's People

Contributors

auramagi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.