Nodeschool Public Materials

    wordcut-ts
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.3 • Public • Published

    Wordcut ported to TypeScript

    Thai word breaker library for Node.js

    Under development ...

    Installation

    yarn add wordcut-ts
    

    Usage

    import { Wordcut } from "wordcut-ts";
     
    var wordcut = new Wordcut(); 
    wordcut.initNoDict();
     
    console.log(wordcut.cut("กากา"));

    With additional custom dictionary

    wordcut.init("customdict/*.txt" ,true);

    Web API

    node server.js
    curl -X POST --data-binary '{"line":"กากา"}' http://localhost:8882/segment

    Development

    Install

    npm i wordcut-ts

    DownloadsWeekly Downloads

    3

    Version

    0.0.3

    License

    none

    Last publish

    Collaborators

    • wearetherock