Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/endeveit/guesslanguage
Guess the natural language of a text in Go
https://github.com/endeveit/guesslanguage
Last synced: about 2 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 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T02:01:01.000Z (about 7 years ago)
- Last Synced: 2024-07-31T20:52:33.215Z (4 months 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)
- zero-alloc-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-extra - guesslanguage - 12-16T10:58:47Z|2017-11-08T02:01:01Z| (Bot Building / Language Detection)
README
# guesslanguage [![Build Status](https://travis-ci.org/endeveit/guesslanguage.svg?branch=master)](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 mainimport (
"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)
}
}
```