/fasttext-go-wrapper

A simple Golang wrapper for fastText text classification library

Primary LanguageC++MIT LicenseMIT

FastText Golang Wrapper

Overview

Here's my attempt at wrapping FastText C++ library with Golang CGO.

Requirements

Compiling

  • Clone the FastText git repository & compile it.

    $ git clone https://github.com/facebookresearch/fastText
    # Cloning...
    
    $ cd fastText && make
    # Compiling...
  • Clone this repository & copy all the .o from previous compile result into directory inside fastText/obj.

    $ git clone https://github.com/taufik-rama/fasttext-go-wrapper
    # Cloning...
    
    $ mkdir fastText/obj
    
    $ cp /path/to/previous/repo/*.o fastText/obj/
  • Compile the C project

    $ cd fastText && make
    # Compiling...
  • Build the Go package normally

    $ go build
    # Compiling...