11# Copyright (c) 2024 Microsoft Corporation.
22# Licensed under the MIT License
33
4- """A module containing _get_num_total, chunk, run_strategy and load_strategy methods definitions."""
4+ """A module containing chunk_text method definitions."""
55
66from typing import Any , cast
77
@@ -54,7 +54,7 @@ def chunk_text(
5454 strategy: sentence
5555 ```
5656 """
57- strategy_exec = load_strategy (strategy )
57+ strategy_exec = _load_strategy (strategy )
5858
5959 num_total = _get_num_total (input , column )
6060 tick = progress_ticker (callbacks .progress , num_total )
@@ -67,7 +67,7 @@ def chunk_text(
6767 input .apply (
6868 cast (
6969 "Any" ,
70- lambda x : run_strategy (
70+ lambda x : _run_strategy (
7171 strategy_exec ,
7272 x [column ],
7373 config ,
@@ -79,7 +79,7 @@ def chunk_text(
7979 )
8080
8181
82- def run_strategy (
82+ def _run_strategy (
8383 strategy_exec : ChunkStrategy ,
8484 input : ChunkInput ,
8585 config : ChunkingConfig ,
@@ -111,7 +111,7 @@ def run_strategy(
111111 return results
112112
113113
114- def load_strategy (strategy : ChunkStrategyType ) -> ChunkStrategy :
114+ def _load_strategy (strategy : ChunkStrategyType ) -> ChunkStrategy :
115115 """Load strategy method definition."""
116116 match strategy :
117117 case ChunkStrategyType .tokens :
0 commit comments