cld2

package module
v0.0.0-...-a19d87e Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LangInfo

type LangInfo struct {
	Code       string
	Percent    int
	IsReliable bool
}

func Detect

func Detect(text string) []LangInfo

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

Jump to

Keyboard shortcuts

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