colrev.env.language_service.LanguageService

class LanguageService[source]

Bases: object

Service to detect languages and handle language codes

Methods

compute_language

Compute the most likely language code

compute_language_confidence_values

Computes the most likely languages of a string and their language codes

unify_to_iso_639_3_language_codes

Unifies a language_code string to the ISO 639-3 standard

validate_iso_639_3_language_codes

Validates whether a list of language codes complies with the ISO 639-3 standard

compute_language(*, text)[source]

Compute the most likely language code

Return type:

str

compute_language_confidence_values(*, text)[source]

Computes the most likely languages of a string and their language codes

Return type:

list

unify_to_iso_639_3_language_codes(*, record)[source]

Unifies a language_code string to the ISO 639-3 standard

Return type:

None

validate_iso_639_3_language_codes(*, lang_code_list)[source]

Validates whether a list of language codes complies with the ISO 639-3 standard

Return type:

None