/language endpoint provides an additional, rule- and model-based algorithm that is more accurate than the regular algorithm for short inputs. By default, the short-string threshold is 0 and short-string language detection is inactive. To turn it on, set the threshold to a non-negative integer, such as 20. If the string contains fewer characters than this threshold, the
/language endpoint will perform short-string language detection.
To enable the short-string algorithm, edit the
rli-factory-config.yaml file and set
shortStringThreshold to your preferred value.