Class LanguageDetection.Builder

Enclosing class:
LanguageDetection

public static class LanguageDetection.Builder extends Attribute.Builder<LanguageDetection,LanguageDetection.Builder>
A builder for language detection results.
  • Constructor Details

    • Builder

      public Builder(int startOffset, int endOffset, List<LanguageDetection.DetectionResult> detectionResults)
      Constructs a builder from the required properties.
      Parameters:
      startOffset - the start offset of the region in characters
      endOffset - the end offset of the region in characters
      detectionResults - the list of detection results
    • Builder

      public Builder(LanguageDetection toCopy)
      Constructs a builder by copying the values from an existing language detection.
      Parameters:
      toCopy - the object to copy
  • Method Details