concrete.language package

class concrete.language.ttypes.LanguageIdentification(uuid=None, metadata=None, languageToProbabilityMap=None)

Bases: object


A theory about what languages are present in a given communication
or piece of communication. Note that it is possible to have more
than one language present in a given communication.

Attributes:
- uuid: Unique identifier for this language identification.
- metadata: Information about where this language identification came from.
- languageToProbabilityMap: A list mapping from a language to the probability that that
language occurs in a given communication. Each language code should
occur at most once in this list. The probabilities do <i>not</i>
need to sum to one – for example, if a single communication is known
to contain both English and French, then it would be appropriate
to assign a probability of 1 to both langauges. (Manually
annotated LanguageProb objects should always have probabilities
of either zero or one; machine-generated LanguageProbs may have
intermediate probabilities.)

Note: The string key should represent the ISO 639-3 three-letter code.


read(iprot)
validate()
write(oprot)