cld2

package module
v0.0.0-...-1ae7d68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

README

cld2

-- import "cld2"

Package cld2 implements language detection using the Compact Language Detector.

This package includes the relevant sources from the cld2 project, so it doesn't require any external dependencies. For more information about CLD2, see https://code.google.com/p/cld2/.

Usage

func Detect
func Detect(text string) string

Detect returns the language code for detected language in the given text.

Documentation

Overview

Package cld2 implements language detection using the Compact Language Detector.

This package includes the relevant sources from the cld2 project, so it doesn't require any external dependencies. For more information about CLD2, see https://code.google.com/p/cld2/.

Index

Constants

View Source
const UnknownLanguage = "un"

UnknownLanguage language code for unknown languages.

View Source
const UnknownLanguageName = "UNKNOWN_LANGUAGE"

UnknownLanguageName label for unknown languages.

Variables

This section is empty.

Functions

func DetectLang

func DetectLang(text string) (string, bool)

DetectLang returns the language code for detected language in the given text.

func LanguageNameFromCode

func LanguageNameFromCode(code string) string

LanguageNameFromCode returns a human readable language name

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL