livekit-plugins-nltk 0.7.dev0__py3-none-any.whl → 0.7.0.dev2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,10 +16,7 @@
16
16
  from .sentence_tokenizer import SentenceTokenizer
17
17
  from .version import __version__
18
18
 
19
- __all__ = [
20
- "SentenceTokenizer",
21
- "__version__",
22
- ]
19
+ __all__ = ["SentenceTokenizer", "__version__"]
23
20
 
24
21
 
25
22
  from livekit.agents import Plugin
@@ -42,7 +42,7 @@ class SentenceTokenizer(agents.tokenize.SentenceTokenizer):
42
42
  config.language = language
43
43
  return config
44
44
 
45
- def tokenize(self, *, text: str, language: str | None = None) -> list[str]:
45
+ def tokenize(self, text: str, *, language: str | None = None) -> list[str]:
46
46
  config = self._sanitize_options(language=language)
47
47
  sentences = nltk.tokenize.sent_tokenize(text, config.language)
48
48
  new_sentences = []
@@ -58,17 +58,12 @@ class SentenceTokenizer(agents.tokenize.SentenceTokenizer):
58
58
 
59
59
  return new_sentences
60
60
 
61
- def stream(
62
- self,
63
- *,
64
- language: str | None = None,
65
- ) -> agents.tokenize.SentenceStream:
61
+ def stream(self, *, language: str | None = None) -> agents.tokenize.SentenceStream:
66
62
  config = self._sanitize_options(language=language)
67
- return agents.tokenize.BufferedTokenStream(
63
+ return agents.tokenize.BufferedSentenceStream(
68
64
  tokenizer=functools.partial(
69
- nltk.tokenize.sent_tokenize,
70
- language=config.language,
65
+ nltk.tokenize.sent_tokenize, language=config.language
71
66
  ),
72
67
  min_token_len=self._config.min_sentence_len,
73
- ctx_len=self._config.stream_context_len,
68
+ min_ctx_len=self._config.stream_context_len,
74
69
  )
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "0.7.dev0"
15
+ __version__ = "0.7.0-dev.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: livekit-plugins-nltk
3
- Version: 0.7.dev0
3
+ Version: 0.7.0.dev2
4
4
  Summary: Agent Framework plugin for NLTK-based text processing.
5
5
  Home-page: https://github.com/livekit/agents
6
6
  License: Apache-2.0
@@ -18,9 +18,8 @@ Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3 :: Only
19
19
  Requires-Python: >=3.9.0
20
20
  Description-Content-Type: text/markdown
21
- Requires-Dist: livekit ~=0.11
21
+ Requires-Dist: livekit-agents ~=0.7
22
22
  Requires-Dist: nltk <4,>=3
23
- Requires-Dist: livekit-agents ~=0.8.dev0
24
23
 
25
24
  # LiveKit Plugins NLTK
26
25
 
@@ -0,0 +1,9 @@
1
+ livekit/plugins/nltk/__init__.py,sha256=ustr0uS4vVfvEnH1lR3cLKQZBEPHoqIes5cA-0r5I-c,1085
2
+ livekit/plugins/nltk/log.py,sha256=12Ta0eunqKM3KyIlyzp2QFyO_Y-PBLAtyjEWDiuJdKk,67
3
+ livekit/plugins/nltk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ livekit/plugins/nltk/sentence_tokenizer.py,sha256=IHYttpaNiGdMKUPRGWCz4zIFbJAK-1AXkoG5uNhBIR4,2170
5
+ livekit/plugins/nltk/version.py,sha256=LpPTO0u8YzF4Ep37Uh6FmXT3-n7H6OkH0IZmE0eXepE,606
6
+ livekit_plugins_nltk-0.7.0.dev2.dist-info/METADATA,sha256=-1Nrl0Hk7ACWkHeah1w4yN4CMyWpkl8d9MojWKavexA,1155
7
+ livekit_plugins_nltk-0.7.0.dev2.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
8
+ livekit_plugins_nltk-0.7.0.dev2.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
9
+ livekit_plugins_nltk-0.7.0.dev2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (71.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,9 +0,0 @@
1
- livekit/plugins/nltk/__init__.py,sha256=deM101uCRxPAD7m2xmPkxspW4ozp83jCJpFxoc9bT5U,1096
2
- livekit/plugins/nltk/log.py,sha256=12Ta0eunqKM3KyIlyzp2QFyO_Y-PBLAtyjEWDiuJdKk,67
3
- livekit/plugins/nltk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- livekit/plugins/nltk/sentence_tokenizer.py,sha256=Y2wXJwqqUxYMqSqPrAXn_OIeMQ1Q-18-Nvd-vog8Z40,2211
5
- livekit/plugins/nltk/version.py,sha256=6FvUHgu734iBP8Ik0HpxEIX1fw00kYq6VZ2JTFJ-EcE,603
6
- livekit_plugins_nltk-0.7.dev0.dist-info/METADATA,sha256=6TcOwZioOM2Unr9rdSv3kw9Xw2Al7Qv_riFmSlp_pq8,1188
7
- livekit_plugins_nltk-0.7.dev0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
8
- livekit_plugins_nltk-0.7.dev0.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
9
- livekit_plugins_nltk-0.7.dev0.dist-info/RECORD,,