From 02eebe6b0fd3e0e4914475eee701fa6657c33e6f Mon Sep 17 00:00:00 2001 From: Chielo Date: Mon, 27 Nov 2023 13:00:03 +0800 Subject: [PATCH] feat: export inner data of GreedyTokenizer (#42) --- src/utils/tokenize.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/tokenize.rs b/src/utils/tokenize.rs index 13e5b43..6e7f445 100644 --- a/src/utils/tokenize.rs +++ b/src/utils/tokenize.rs @@ -64,10 +64,18 @@ impl< SAMRef: Deref>, > GreedyTokenizer { + pub fn get_sam(&self) -> &SAMRef { + &self.sam + } + pub fn get_sam_ref(&self) -> &GeneralSAM { &self.sam } + pub fn get_suffix_data(&self) -> &Vec> { + &self.suffix_data + } + pub fn inner_as_ref( &self, ) -> GreedyTokenizer> {