Skip to content

Zawgyi-One and standard Myanmar Unicode detector library for Angular applications.

License

Notifications You must be signed in to change notification settings

myanmartools/ng-zawgyi-detector

Repository files navigation

Zawgyi and Standard Myanmar Unicode Detector for Angular

GitHub Actions Status Azure Pipelines Status codecov npm version Gitter

Zawgyi-One and standard Myanmar Unicode detector library for Angular applications.

Features

  • Accurate & performance optimized detection for both Zawgyi-One (ဇော်ဂျီ) and standard Myanmar Unicode (မြန်မာ ယူနီကုဒ်)
  • Intelligent chunk by chunk detection on mix-typed input (Mixed Zawgyi and Unicode)
  • Fully tested with Myanmar Spelling Book (မြန်မာ စာလုံးပေါင်း သတ်ပုံကျမ်း) data
  • Deep detection on A That (အသက်), Pahsin (ပါဌ်ဆင့်), Kinsi (ကင်းစီး), etc.
  • Work with latest version of Angular
  • Compatible with Angular Universal (Node.js Server Side Rendering - SSR)
  • Open source and MIT license!

Get Started

Installation

npm

npm install @myanmartools/ng-zawgyi-detector

or yarn

yarn add @myanmartools/ng-zawgyi-detector

Module Setup (app.module.ts)

import { ZawgyiDetectorModule } from '@myanmartools/ng-zawgyi-detector';

@NgModule({
  imports: [
    // Other module imports

    // ng-zawgyi-detector module
    ZawgyiDetectorModule
  ]
})
export class AppModule { }

Usage (app.component.ts)

import { Component } from '@angular/core';

import { ZawgyiDetector } from '@myanmartools/ng-zawgyi-detector';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
  constructor(private readonly _zawgyiDetector: ZawgyiDetector) {
    const result = this._zawgyiDetector.detect('ျမန္မာစာ');
      if (result.detectedEnc === 'zg') {
          console.log('ZAWGYI DETECTED');
      } else if (result.detectedEnc === 'uni') {
          console.log('UNICODE DETECTED');
      }
  }
}

Usage and Application

See Zawgyi Unicode Converter Angular PWA repo.

Live Application

Zawgyi Unicode Converter

Feedback and Contributing

Check out the Contributing page to see the best places to log issues and start discussions.

License

This repository is licensed with the MIT license.