colrev.env.language_service.LanguageService

class colrev.env.language_service.LanguageService[source]

Bases: object

Service to detect languages and handle language codes.

Initialize the instance.

Methods

compute_language

Compute the most likely language code.

compute_language_confidence_values

Compute the most likely languages of a string and their language codes.

unify_to_iso_639_3_language_codes

Unify 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]

Compute the most likely languages of a string and their language codes.

Return type:

list

unify_to_iso_639_3_language_codes(*, record)[source]

Unify 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