#[non_exhaustive]pub struct Relation<'p> {
pub head: usize,
pub deprel: &'p str,
pub label: usize,
pub head_prob: f32,
pub deprel_prob: f32,
}Expand description
Связь слова с вершиной
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.head: usizeНомер вершины среди слов предложения с 1; 0 - корень предложения
deprel: &'p strТип связи UD с подтипом, если он есть (nsubj, obl:tmod, root, …); root - только у слова
с вершиной 0
label: usizeНомер типа связи в Parser::relations
head_prob: f32Вероятность вершины по модели, от 0 до 1: softmax оценок всех кандидатов в вершины слова (у предложений длиннее 1024 слов - 64 слов с каждой стороны, корня и вершины, которую назначила сборка дерева)
deprel_prob: f32Вероятность типа связи при этой вершине, от 0 до 1: softmax оценок связей, кроме root; у связей,
которые ставит правило, - root корня и vocative упоминания @имя в начале предложения - 1
Trait Implementations§
impl<'p> Copy for Relation<'p>
impl<'p> StructuralPartialEq for Relation<'p>
Auto Trait Implementations§
impl<'p> Forget for Relation<'p>
impl<'p> Freeze for Relation<'p>
impl<'p> Move for Relation<'p>
impl<'p> RefUnwindSafe for Relation<'p>
impl<'p> Send for Relation<'p>
impl<'p> Sync for Relation<'p>
impl<'p> Unpin for Relation<'p>
impl<'p> UnsafeUnpin for Relation<'p>
impl<'p> UnwindSafe for Relation<'p>
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