https://github.com/endeveit/guesslanguage
Guess the natural language of a text in Go
https://github.com/endeveit/guesslanguage
Last synced: 9 months ago
JSON representation
Guess the natural language of a text in Go
- Host: GitHub
- URL: https://github.com/endeveit/guesslanguage
- Owner: endeveit
- License: mit
- Created: 2014-12-16T10:58:47.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T02:01:01.000Z (about 8 years ago)
- Last Synced: 2024-07-31T20:52:33.215Z (over 1 year ago)
- Language: Go
- Size: 250 KB
- Stars: 58
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- awesome-go - guesslanguage - Guess the natural language of a text in Go - ★ 39 (Text Processing)
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Text Processing / Advanced Console UIs)
- awesome-go-plus - guesslanguage - Functions to determine the natural language of a unicode text.  (Natural Language Processing / Language Detection)
- fucking-awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- awesome-go - guesslanguage - | - | - | (Text Processing / HTTP Clients)
- awesome-go-cn - guesslanguage
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- fucking-awesome-go - :octocat: guesslanguage - Functions to determine the natural language of a unicode text. :star: 21 :fork_and_knife: 4 (Text Processing / Advanced Console UIs)
- awesome-go-cn - guesslanguage
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (<span id="文字处理-text-processing">文字处理 Text Processing</span> / <span id="高级控制台用户界面-advanced-console-uis">高级控制台用户界面 Advanced Console UIs</span>)
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. - :arrow_down:2 - :star:21 (Text Processing / HTTP Clients)
- awesome-go-cn - guesslanguage
- awesome-go-zh - guesslanguage
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- awesome-go-extra - guesslanguage - 12-16T10:58:47Z|2017-11-08T02:01:01Z| (Bot Building / Language Detection)
- zero-alloc-awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- awesome-go-with-stars - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Natural Language Processing / Language Detection)
- awesome-Char - guesslanguage - Functions to determine the natural language of a unicode text. (Text Processing / HTTP Clients)
- awesome-go-cn - guesslanguage
- awesome-go - guesslanguage - Functions to determine the natural language of a unicode text. (Text Processing / HTTP Clients)
README
# guesslanguage [](https://travis-ci.org/endeveit/guesslanguage)
This is a Go version of python [guess-language](http://code.google.com/p/guess-language>).
guesslanguage provides a simple way to detect the natural language of unicode string and detects over 60 languages listed in the [models](https://github.com/endeveit/guesslanguage/tree/master/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:
```go
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)
}
}
```