Packages

t

com.johnsnowlabs.nlp.annotators.seq2seq

SummarizationParams

trait SummarizationParams extends Params

Task-level parameters shared between the Summarization estimator and the fitted SummarizationModel.

Linear Supertypes
Params, Serializable, Serializable, Identifiable, AnyRef, Any
Known Subclasses
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. SummarizationParams
  2. Params
  3. Serializable
  4. Serializable
  5. Identifiable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def copy(extra: ParamMap): Params
    Definition Classes
    Params
  2. abstract val uid: String
    Definition Classes
    Identifiable

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def $[T](param: Param[T]): T
    Attributes
    protected
    Definition Classes
    Params
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. val chunkOverlap: IntParam

    Number of sentences repeated between consecutive chunks (Default: 1).

  7. val chunkSize: IntParam

    Chunk size in approximate tokens used for hierarchical summarization (Default: 0 = derive automatically from the model's context limit).

  8. final def clear(param: Param[_]): SummarizationParams.this.type
    Definition Classes
    Params
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  10. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  11. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  15. def explainParams(): String
    Definition Classes
    Params
  16. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  17. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. val focus: Param[String]

    Optional free-text focus hint included in the LLM prompt, e.g.

    Optional free-text focus hint included in the LLM prompt, e.g. "main findings" (Default: ""). Only applies to the llm method.

  20. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  21. def getChunkOverlap: Int

  22. def getChunkSize: Int

  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  25. def getFocus: String

  26. def getGpuLayers: Int

  27. def getLongDocumentStrategy: String

  28. def getMaxSummaryLength: Int

  29. def getMethod: String

  30. def getMinSummaryLength: Int

  31. def getMmrLambda: Float

  32. def getModel: String

  33. def getNoRepeatNgramSize: Int

  34. def getNumBeams: Int

  35. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  36. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  37. def getPositionBias: Float

  38. def getSummaryStyle: String

  39. def getTemperature: Float

  40. def getTopP: Float

  41. val gpuLayers: IntParam

    Number of model layers offloaded to the GPU for the llm method (Default: 99 = offload all).

    Number of model layers offloaded to the GPU for the llm method (Default: 99 = offload all). Set to 0 on CPU-only clusters. Ignored by the other methods.

  42. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  43. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  44. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  45. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  46. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  47. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  48. val longDocumentStrategy: Param[String]

    Strategy for documents longer than the model context: auto, truncate or hierarchical (Default: auto).

    Strategy for documents longer than the model context: auto, truncate or hierarchical (Default: auto). auto summarizes directly when the document fits and falls back to hierarchical chunk-then-combine summarization when it does not. Since hierarchical also summarizes a fitting document in a single pass, auto and hierarchical currently behave identically; only truncate differs (it cuts the document to the context budget).

  49. val maxSummaryLength: IntParam

    Target maximum summary length in words/tokens, approximate (Default: 250).

  50. val method: Param[String]

    Summarization method: llm, encoder_decoder or extractive (Default: llm).

    Summarization method: llm, encoder_decoder or extractive (Default: llm).

    • llm: an instruction-tuned GGUF LLM (via AutoGGUFModel / llama.cpp) prompted for summarization.
    • encoder_decoder: a specialized abstractive summarization model (DistilBART).
    • extractive: selects the most central sentences of the original document (embedding-based centrality with position prior and MMR redundancy control).
  51. val minSummaryLength: IntParam

    Minimum summary length in words/tokens, generative methods only (Default: 20).

  52. val mmrLambda: FloatParam

    MMR trade-off between relevance and redundancy in extractive selection, higher = more relevance-driven (Default: 0.7).

    MMR trade-off between relevance and redundancy in extractive selection, higher = more relevance-driven (Default: 0.7). Only applies to the extractive method.

  53. val model: Param[String]

    Optional pretrained model name overriding the method's default model (Default: "" = use the method's default).

  54. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  55. val noRepeatNgramSize: IntParam

    Size of n-grams that may not repeat in the generated summary (Default: 3).

    Size of n-grams that may not repeat in the generated summary (Default: 3). Only applies to the encoder_decoder method; 0 disables the constraint.

  56. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  57. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  58. val numBeams: IntParam

    Number of beams for beam search (Default: 4).

    Number of beams for beam search (Default: 4). Only applies to the encoder_decoder method.

  59. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  60. val positionBias: FloatParam

    Weight of the lead-position prior in extractive sentence ranking (Default: 0.3).

    Weight of the lead-position prior in extractive sentence ranking (Default: 0.3). Only applies to the extractive method.

  61. final def set(paramPair: ParamPair[_]): SummarizationParams.this.type
    Attributes
    protected
    Definition Classes
    Params
  62. final def set(param: String, value: Any): SummarizationParams.this.type
    Attributes
    protected
    Definition Classes
    Params
  63. final def set[T](param: Param[T], value: T): SummarizationParams.this.type
    Definition Classes
    Params
  64. def setChunkOverlap(value: Int): SummarizationParams.this.type

  65. def setChunkSize(value: Int): SummarizationParams.this.type

  66. final def setDefault(paramPairs: ParamPair[_]*): SummarizationParams.this.type
    Attributes
    protected
    Definition Classes
    Params
  67. final def setDefault[T](param: Param[T], value: T): SummarizationParams.this.type
    Attributes
    protected[org.apache.spark.ml]
    Definition Classes
    Params
  68. def setFocus(value: String): SummarizationParams.this.type

  69. def setGpuLayers(value: Int): SummarizationParams.this.type

  70. def setLongDocumentStrategy(value: String): SummarizationParams.this.type

  71. def setMaxSummaryLength(value: Int): SummarizationParams.this.type

  72. def setMethod(value: String): SummarizationParams.this.type

  73. def setMinSummaryLength(value: Int): SummarizationParams.this.type

  74. def setMmrLambda(value: Float): SummarizationParams.this.type

  75. def setModel(value: String): SummarizationParams.this.type

  76. def setNoRepeatNgramSize(value: Int): SummarizationParams.this.type

  77. def setNumBeams(value: Int): SummarizationParams.this.type

  78. def setPositionBias(value: Float): SummarizationParams.this.type

  79. def setSummaryStyle(value: String): SummarizationParams.this.type

  80. def setTemperature(value: Float): SummarizationParams.this.type

  81. def setTopP(value: Float): SummarizationParams.this.type

  82. val summaryStyle: Param[String]

    Summary style used to build the LLM prompt: concise, detailed or bullets (Default: concise).

    Summary style used to build the LLM prompt: concise, detailed or bullets (Default: concise). Only applies to the llm method.

  83. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  84. val temperature: FloatParam

    Generation temperature (Default: 0.2).

    Generation temperature (Default: 0.2). Applies to the llm method.

  85. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  86. val topP: FloatParam

    Top-p (nucleus) sampling (Default: 0.9).

    Top-p (nucleus) sampling (Default: 0.9). Applies to the llm method.

  87. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  88. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  89. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

getParam

param

setParam

Ungrouped