detectLangs static method

List<Language> detectLangs(
  1. String text
)

Detect language of the input text and return Language codes and probabilities.

Implementation

static List<Language> detectLangs(String text) {
  Detector detector = DetectorFactory().create();
  detector.append(text);
  return detector.getProbabilities();
}