case class Gliner2SpanInfo(spanIdx: Array[Array[Array[Long]]], spanMask: Array[Array[Boolean]], spanRep: Option[Array[Array[Array[Float]]]], numWords: Int, maxWidth: Int) extends Product with Serializable
Span indices and representations for a single sample. Used for entity, relation, and structure extraction tasks.
Spans are generated for all possible consecutive token sequences up to maxWidth. Invalid spans (extending beyond text length) are masked.
- spanIdx
Span indices (num_words, max_width, 2) - start and end positions
- spanMask
Validity mask (num_words, max_width) - true for valid spans
- spanRep
Span representations from ONNX (num_words, max_width, 768) - optional
- numWords
Number of words in the text
- maxWidth
Maximum span width
- Alphabetic
- By Inheritance
- Gliner2SpanInfo
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Gliner2SpanInfo(spanIdx: Array[Array[Array[Long]]], spanMask: Array[Array[Boolean]], spanRep: Option[Array[Array[Array[Float]]]], numWords: Int, maxWidth: Int)
- spanIdx
Span indices (num_words, max_width, 2) - start and end positions
- spanMask
Validity mask (num_words, max_width) - true for valid spans
- spanRep
Span representations from ONNX (num_words, max_width, 768) - optional
- numWords
Number of words in the text
- maxWidth
Maximum span width
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val maxWidth: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val numWords: Int
-
def
safeSpanIdx: Array[Array[Long]]
Get safe span indices (replace invalid (-1, -1) with (0, 0)) for ONNX input.
- val spanIdx: Array[Array[Array[Long]]]
- val spanMask: Array[Array[Boolean]]
- val spanRep: Option[Array[Array[Array[Float]]]]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()