detectlanguage alternatives and similar packages
Based on the "Natural Language Processing" category.
Alternatively, view detectlanguage alternatives based on common mentions on social networks and blogs.
-
prose
A library for text processing that supports tokenization, part-of-speech tagging, named-entity extraction, and more. -
gojieba
This is a Go implementation of jieba which a Chinese word splitting algorithm. -
gse
Go efficient text segmentation; support english, chinese, japanese and other. -
go-i18n
A package and an accompanying tool to work with localized text. -
when
A natural EN and RU language date/time parser with pluggable rules -
spaGO
Self-contained Machine Learning and Natural Language Processing library in Go. -
whatlanggo
A natural language detection package for Go. Supports 84 languages and 24 scripts (writing systems e.g. Latin, Cyrillic, etc). -
sentences
A sentence tokenizer: converts text into a list of sentences. -
locales
🌎 a set of locales generated from the CLDR Project which can be used independently or within an i18n package; these were built for use with, but not exclusive to https://github.com/go-playground/universal-translator -
universal-translator
💬 i18n Translator for Go/Golang using CLDR data + pluralization rules -
go-nlp
Utilities for working with discrete probability distributions and other tools useful for doing NLP work. -
RAKE.go
A Go port of the Rapid Automatic Keyword Extraction Algorithm (RAKE) -
gounidecode
Unicode transliterator (also known as unidecode) for Go -
segment
A Go library for performing Unicode Text Segmentation as described in Unicode Standard Annex #29 -
MMSEGO
This is a GO implementation of MMSEG which a Chinese word splitting algorithm. -
textcat
A Go package for n-gram based text categorization, with support for utf-8 and raw text -
stemmer
Stemmer packages for Go programming language. Includes English and German stemmers. -
paicehusk
Golang implementation of the Paice/Husk Stemming Algorithm -
petrovich
Petrovich is the library which inflects Russian names to given grammatical case. -
snowball
Snowball stemmer port (cgo wrapper) for Go. Provides word stem extraction functionality Snowball native. -
go-localize
Simple and easy to use i18n (Internationalization and localization) engine -
address
Handles address representation, validation and formatting. -
golibstemmer
Go bindings for the snowball libstemmer library including porter 2 -
iuliia-go
Transliterate Cyrillic → Latin in every possible way. -
icu
Cgo binding for icu4c C library detection and conversion functions. Guaranteed compatibility with version 50.1. -
libtextcat
Cgo binding for libtextcat C library. Guaranteed compatibility with version 2.2. -
go-tinydate
A tiny date object in Go. Tinydate uses only 4 bytes of memory -
gotokenizer
A tokenizer based on the dictionary and Bigram language models for Golang. (Now only support chinese segmentation) -
porter
This is a fairly straightforward port of Martin Porter's C implementation of the Porter stemming algorithm. -
gosentiwordnet
Sentiment analyzer using sentiwordnet lexicon in Go. -
go-eco
Similarity, dissimilarity and distance matrices; diversity, equitability and inequality measures; species richness estimators; coenocline models.
Scout APM - Leading-edge performance monitoring starting at $39/month
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of detectlanguage or a related project?
Popular Comparisons
README
Language Detection API Go Client
Detects language of the given text. Returns detected language codes and scores.
Before using Detect Language API client you have to setup your personal API key. You can get it by signing up at https://detectlanguage.com
Installation
go get -u github.com/detectlanguage/detectlanguage-go
Configuration
client := detectlanguage.New("YOUR API KEY")
Usage
Language detection
detections, err := client.Detect("Buenos dias señor")
if err != nil {
fmt.Fprintln(os.Stderr, "error detecting language:", err)
os.Exit(1)
return
}
fmt.Fprintln(os.Stdout, "Language:", detections[0].Language)
fmt.Fprintln(os.Stdout, "Reliable:", detections[0].Reliable)
fmt.Fprintln(os.Stdout, "Confidence:", detections[0].Confidence)
Single language code detection
If you need just a language code you can use DetectCode
. It returns first detected language code.
language, err := client.DetectCode("Buenos dias señor")
if err != nil {
fmt.Fprintln(os.Stderr, "error detecting language:", err)
os.Exit(1)
return
}
fmt.Fprintln(os.Stdout, "Language:", language)
Batch detection
It is possible to detect language of several texts with one request.
This method is significantly faster than doing one request per text.
To use batch detection just pass multiple texts to DetectBatch
method.
texts := []string{"labas rytas", "good morning"}
results, err := client.DetectBatch(texts)
if err != nil {
fmt.Fprintln(os.Stderr, "error detecting language:", err)
os.Exit(1)
return
}
fmt.Fprintln(os.Stdout, "First text language:", detections[0][0].Language)
fmt.Fprintln(os.Stdout, "Second text language:", detections[1][0].Language)
Getting your account status
result, err := client.UserStatus()
if err != nil {
fmt.Fprintln(os.Stderr, "error getting user status:", err)
os.Exit(1)
return
}
fmt.Fprintln(os.Stdout, "Status:", result.Status)
fmt.Fprintln(os.Stdout, "Requests sent today:", result.Requests)
fmt.Fprintln(os.Stdout, "Bytes sent today:", result.Bytes)
fmt.Fprintln(os.Stdout, "Plan:", result.Plan)
fmt.Fprintln(os.Stdout, "Plan expires:", result.PlanExpires)
fmt.Fprintln(os.Stdout, "Daily requests limit:", result.DailyRequestsLimit)
fmt.Fprintln(os.Stdout, "Daily bytes limit:", result.DailyBytesLimit)
fmt.Fprintln(os.Stdout, "Date:", result.Date)
Getting list supported languages
languages, err := client.Languages()
if err != nil {
fmt.Fprintln(os.Stderr, "error getting languages list:", err)
os.Exit(1)
return
}
fmt.Fprintln(os.Stdout, "Supported languages:", len(languages))
fmt.Fprintln(os.Stdout, "First language code:", languages[0].Code)
fmt.Fprintln(os.Stdout, "First language name:", languages[0].Name)
License
Detect Language API Go Client is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.
*Note that all licence references and agreements mentioned in the detectlanguage README section above
are relevant to that project's source code only.