Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

bountylabs/guesslanguage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

guesslanguage Build Status

This is a Go version of python guess-language.

guesslanguage provides a simple way to detect the natural language of unicode string and detects over 60 languages listed in the models directory.

Supported Go versions

guesslanguage is regularly tested against Go 1.1, 1.2, 1.3 and tip.

Usage

Install in your ${GOPATH} using go get -u github.com/endeveit/guesslanguage

Then call it:

package main

import (
	"fmt"
	"github.com/endeveit/guesslanguage"
)

func main() {
	lang, err := guesslanguage.Guess("This is a test of the language checker.")

	// Output:
	// en
	if err != nil {
		fmt.Println(lang)
	}
}

About

Guess the natural language of a text in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%