Class: CLD3::NNetLanguageIdentifier::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/cld3.rb

Overview

Information about a predicted language. This is an instance of Struct with the following members:

language

This is symbol.

probability

Language probability. This is Numeric object.

reliable?

Whether the prediction is reliable. This is true or false.

proportion

Proportion of bytes associated with the language. If #find_language is called, this variable is set to 1. This is Numeric object.

byte_ranges

Specifies the byte ranges in UTF-8 that |language| applies to. This is an Array of SpanInfo.

Instance Attribute Summary collapse

Instance Attribute Details

#byte_rangesObject

Returns the value of attribute byte_ranges

Returns:

  • (Object)

    the current value of byte_ranges



46
47
48
# File 'lib/cld3.rb', line 46

def byte_ranges
  @byte_ranges
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



46
47
48
# File 'lib/cld3.rb', line 46

def language
  @language
end

#probabilityObject

Returns the value of attribute probability

Returns:

  • (Object)

    the current value of probability



46
47
48
# File 'lib/cld3.rb', line 46

def probability
  @probability
end

#proportionObject

Returns the value of attribute proportion

Returns:

  • (Object)

    the current value of proportion



46
47
48
# File 'lib/cld3.rb', line 46

def proportion
  @proportion
end

#reliable?Object

Returns the value of attribute reliable?

Returns:

  • (Object)

    the current value of reliable?



46
47
48
# File 'lib/cld3.rb', line 46

def reliable?
  @reliable?
end