Git Product home page Git Product logo

khaiii-rs's Introduction

khaiii-rs

Documentation

khaiii bindings for Rust.

[dependencies]
khaiii-rs = "0.1"

Requirements

The following software is required to use khaiii-rs:

  • CMake 3.10 or up
  • Python3
  • Stable Rust. (khaiii-rs was developed with Rust 1.65.0 but should work with most stable Rust versions)

Version of khaiii

Currently this library requires khaiii 0.4. The source for khaiii is included within the khaiii-sys crate. If khaiii is not already pre-installed on your system you can use the vendored-khaiii feature flag so that the build script will compile, link and generate the khaiii resources for you instead.

Building khaiii-rs

Systems with khaiii pre-installed:

$ git clone https://github.com/ka1wa/khaiii-rs
$ cd khaiii-rs
$ cargo build

Build with vendored source:

$ git clone https://github.com/ka1wa/khaiii-rs
$ cd khaiii-rs
$ cargo build -F vendored-khaiii

Testing

Simple tests for the khaiii-rs wrapper are included and can be run through the following command. Similarly to the build command with khaiii pre-installed you can simply run:

$ cargo test

Testing with vendored source:

$ cargo test -F vendored-khaiii

Usage

Using khaiii-rs is easiest with khaiii pre-installed on the system.

In the examples/ folder are two Rust files demonstrating how to initialize the khaiii API and how to analyze Korean text.

Critically, before the API can analyze text it has to load a couple of resources. On a pre-installed system these can be found under the default /usr/local/share/khaiii directory. On systems without a global installation, the resource files can be found in the khaiii-rs/share/khaiii folder after performing a cargo build with the vendored-khaiii feature enabled as previously shown in the building section of this README.

Operating systems

As of right now khaiii-sys, (and therefore khaiii-rs), is only developed for and tested on Linux. While, like khaiii itself, it might work on MacOS (non-ARM) I am unfortunately unable to test and support it.

License

This project is licensed under Apache License, Version 2.0, (LICENSE or https://www.apache.org/licenses/LICENSE-2.0)

khaiii-rs's People

Contributors

ka1wa avatar

Stargazers

 avatar

Watchers

 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.