add serde for Keyword (#465)

Co-authored-by: guillaume-be <guillaume.becquin@gmail.com>
This commit is contained in:
oiwn 2024-08-18 16:10:58 +07:00 committed by GitHub
parent 3df3816219
commit eabebc61a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,