gorf provides an interface to communicate with the Frog server through Go
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
gorf.go

README.md

Overview

Twitter GoDoc

Frog is Natural Language Processing software developed for Dutch. Frog provides a server, which can be accessed through TCP. This library tries to simplify working and communicating with this server.

Gorf provides a simple interface to communicate with a running frog server.

Not everything for the Token struct is implemented, contributions are welcome :).

License

Gorf is licensed under a MIT license.

Installation

A simple go get github.com/Machiel/gorf should suffice.

Usage

Example

package main

import (
    "fmt"

    "github.com/Machiel/gorf"
)

func main() {

    client, err := gorf.NewClient("192.168.99.100:9919")

    if err != nil {
        panic(err)
    }

    sentences, err := client.Parse("Hoi, ik ben Machiel. Hebben we verbinding?")

    if err != nil {
        panic(err)
    }

    for i, sentence := range sentences {
        fmt.Printf("Sentence %d\n", i)

        for _, token := range sentence {
            fmt.Println(token.Lemma)
        }
    }
}