File: info.go

package info (click to toggle)
golang-github-abadojack-whatlanggo 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 444 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 370 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package whatlanggo

import "unicode"

//Info represents a full outcome of language detection.
type Info struct {
	Lang       Lang
	Script     *unicode.RangeTable
	Confidence float64
}

// IsReliable returns true if Confidence is greater than the Reliable Confidence Threshold
func (info *Info) IsReliable() bool {
	return info.Confidence > ReliableConfidenceThreshold
}