import CharacterTextSplittertext_splitter = CharacterTextSplitter.from_huggingface_tokenizer(    tokenizer, chunk_size=100, chunk_overlap=0)texts = text_splitter.split_text(state_of_the_union)print(texts[0])    Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans.          Last year COVID-19 kept us apart. This year we are finally together again.         Tonight, we meet as Democrats Republicans and Independents. But most importantly as Americans.         With a duty to one another to the American people to the Constitution.PreviousRecursively split by characterNextLost in the middle: The problem with long contextstiktokenspaCySentenceTransformersNLTKHugging Face tokenizerCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Language models have a token limit. You should not exceed the token limit. When you split your text into chunks it is therefore a good idea to count the number of tokens. There are many tokenizers. When you count tokens in your text you should use the same tokenizer as used in the language model.
Language models have a token limit. You should not exceed the token limit. When you split your text into chunks it is therefore a good idea to count the number of tokens. There are many tokenizers. When you count tokens in your text you should use the same tokenizer as used in the language model. ->: import CharacterTextSplittertext_splitter = CharacterTextSplitter.from_huggingface_tokenizer(    tokenizer, chunk_size=100, chunk_overlap=0)texts = text_splitter.split_text(state_of_the_union)print(texts[0])    Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans.          Last year COVID-19 kept us apart. This year we are finally together again.         Tonight, we meet as Democrats Republicans and Independents. But most importantly as Americans.         With a duty to one another to the American people to the Constitution.PreviousRecursively split by characterNextLost in the middle: The problem with long contextstiktokenspaCySentenceTransformersNLTKHugging Face tokenizerCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.