Skip to content

Commit

Permalink
feat: export inner data of GreedyTokenizer (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChieloNewctle authored Nov 27, 2023
1 parent f59629b commit 02eebe6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/tokenize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,18 @@ impl<
SAMRef: Deref<Target = GeneralSAM<TransTable>>,
> GreedyTokenizer<TransTable, TokenIDType, SAMRef>
{
pub fn get_sam(&self) -> &SAMRef {
&self.sam
}

pub fn get_sam_ref(&self) -> &GeneralSAM<TransTable> {
&self.sam
}

pub fn get_suffix_data(&self) -> &Vec<SuffixInTrieData<TokenIDType>> {
&self.suffix_data
}

pub fn inner_as_ref(
&self,
) -> GreedyTokenizer<TransTable, TokenIDType, &GeneralSAM<TransTable>> {
Expand Down

0 comments on commit 02eebe6

Please sign in to comment.