pub struct Segment<'a> { /* private fields */ }Expand description
The segmentation task, over one turn.
Implementations§
Trait Implementations§
impl<'a> Copy for Segment<'a>
Source§impl ModelTask for Segment<'_>
impl ModelTask for Segment<'_>
Source§fn agree(&self, left: &Segmentation, right: &Segmentation) -> bool
fn agree(&self, left: &Segmentation, right: &Segmentation) -> bool
Readings that differ only by a single word at a unit’s edge agree: one keeps a word joining two parts that the other leaves out, and both say the same of the message.
Source§type Output = Segmentation
type Output = Segmentation
The answer, as the schema allows it.
Source§fn prompt_name(&self) -> &str
fn prompt_name(&self) -> &str
The prompt name a prompt source is asked for, such as
understand.segment.Source§fn instructions(&self) -> &str
fn instructions(&self) -> &str
The built-in instructions, used when no source supplies the prompt.
Source§fn schema(&self, _input: &()) -> Value
fn schema(&self, _input: &()) -> Value
The answer’s JSON Schema for this input, with its closed sets filled in.
Source§fn check(
&self,
_input: &(),
output: &Segmentation,
) -> Result<(), StructuralError>
fn check( &self, _input: &(), output: &Segmentation, ) -> Result<(), StructuralError>
Structural checks the schema cannot express, such as a pointer in range. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Segment<'a>
impl<'a> !UnwindSafe for Segment<'a>
impl<'a> Freeze for Segment<'a>
impl<'a> Send for Segment<'a>
impl<'a> Sync for Segment<'a>
impl<'a> Unpin for Segment<'a>
impl<'a> UnsafeUnpin for Segment<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more