mirror of
https://github.com/guillaume-be/rust-bert.git
synced 2024-10-03 23:57:15 +03:00
add serde for Keyword (#465)
Co-authored-by: guillaume-be <guillaume.becquin@gmail.com>
This commit is contained in:
parent
3df3816219
commit
eabebc61a8
@ -31,12 +31,13 @@ use crate::pipelines::sentence_embeddings::{
|
||||
use crate::{Config, RustBertError};
|
||||
use regex::Regex;
|
||||
use rust_tokenizers::Offset;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::borrow::Cow;
|
||||
use std::cmp::min;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
/// # Keyword generated by a `KeywordExtractionModel`
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Keyword {
|
||||
/// String representation of the keyword
|
||||
pub text: String,
|
||||
|
Loading…
Reference in New Issue
Block a user