Autarkia-Textkit 0.1.0__tar.gz → 0.1.1__tar.gz

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.
Files changed (18) hide show
  1. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/.gitignore +0 -0
  2. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/LICENSE +0 -0
  3. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/PKG-INFO +10 -9
  4. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/README.md +7 -6
  5. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/pyproject.toml +3 -3
  6. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/__init__.py +1 -1
  7. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/clean.py +0 -0
  8. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/emoji.py +0 -0
  9. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/force.py +0 -0
  10. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/merge.py +0 -0
  11. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/numbered.py +0 -0
  12. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/py.typed +0 -0
  13. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/rules.py +0 -0
  14. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/segmenter.py +1 -1
  15. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/src/autarkia_textkit/similarity.py +0 -0
  16. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/tests/test_clean.py +0 -0
  17. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/tests/test_segmenter.py +0 -0
  18. {autarkia_textkit-0.1.0 → autarkia_textkit-0.1.1}/tests/test_tools.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: Autarkia-Textkit
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Chinese chat text segmentation and set similarity measures: bubble splitting, cleaning, numbered lists, emoji gluing, Markdown span repair, IoMax/containment/Jaccard/ngram.
5
- Project-URL: Homepage, https://qishihao.icu/projects/autarkia
5
+ Project-URL: Homepage, https://qishihao.dev/projects/autarkia
6
6
  Project-URL: Repository, https://github.com/hakituo/Autarkia-Textkit
7
7
  Project-URL: Roadmap, https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md
8
8
  Project-URL: Autarkia Runtime, https://github.com/hakituo/Autarkia
9
- Project-URL: Author, https://qishihao.icu
9
+ Project-URL: Author, https://qishihao.dev
10
10
  Author-email: Shihao Qi <qishihao512@gmail.com>
11
11
  License-Expression: MIT
12
12
  License-File: LICENSE
@@ -42,6 +42,7 @@ Description-Content-Type: text/markdown
42
42
  <p align="center">
43
43
  <a href="https://pypi.org/project/Autarkia-Textkit/"><img alt="PyPI" src="https://img.shields.io/pypi/v/autarkia-textkit.svg"></a>
44
44
  <a href="https://pypi.org/project/Autarkia-Textkit/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/autarkia-textkit.svg"></a>
45
+ <a href="https://github.com/hakituo/Autarkia-Textkit/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/hakituo/Autarkia-Textkit/actions/workflows/ci.yml/badge.svg"></a>
45
46
  <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
46
47
  </p>
47
48
 
@@ -55,7 +56,7 @@ Description-Content-Type: text/markdown
55
56
 
56
57
  把模型**一段回复**切成**几条像人打出来的消息**,外加几个分母说得清的集合相似度函数。
57
58
 
58
- 来自长期在线的 [Autarkia](https://qishihao.icu/projects/autarkia) agent 运行时——那里的切分规则是对着真实 QQ / Android 聊天行为一条条调出来的。整个系列见[组件库路线图](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md)。
59
+ 来自长期在线的 [Autarkia](https://qishihao.dev/projects/autarkia) agent 运行时——那里的切分规则是对着真实 QQ / Android 聊天行为一条条调出来的。整个系列见[组件库路线图](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md)。
59
60
 
60
61
  ### 为什么:切气泡不是 `text.split("。")`
61
62
 
@@ -147,11 +148,11 @@ jaccard(a, b) # 并集分母
147
148
 
148
149
  ### 系列与链接
149
150
 
150
- - 项目页:<https://qishihao.icu/projects/autarkia>
151
+ - 项目页:<https://qishihao.dev/projects/autarkia>
151
152
  - 运行时仓库:<https://github.com/hakituo/Autarkia>
152
153
  - 本包:<https://github.com/hakituo/Autarkia-Textkit>
153
154
  - 组件库路线图:<https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md>
154
- - 作者:Shihao Qi — <https://qishihao.icu>
155
+ - 作者:Shihao Qi — <https://qishihao.dev>
155
156
 
156
157
  ### 许可
157
158
 
@@ -163,7 +164,7 @@ MIT
163
164
 
164
165
  Turn **one model reply** into **several messages that read like a human typed them** — plus set-similarity functions whose names state their actual denominator.
165
166
 
166
- Extracted from the [Autarkia](https://qishihao.icu/projects/autarkia) agent runtime, where these rules were tuned against real QQ/Android chat behavior. See the [component roadmap](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md).
167
+ Extracted from the [Autarkia](https://qishihao.dev/projects/autarkia) agent runtime, where these rules were tuned against real QQ/Android chat behavior. See the [component roadmap](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md).
167
168
 
168
169
  ### Why
169
170
 
@@ -255,11 +256,11 @@ jaccard(a, b) # union denominator
255
256
 
256
257
  ### The bigger picture
257
258
 
258
- - Project page: <https://qishihao.icu/projects/autarkia>
259
+ - Project page: <https://qishihao.dev/projects/autarkia>
259
260
  - Runtime repository: <https://github.com/hakituo/Autarkia>
260
261
  - This package: <https://github.com/hakituo/Autarkia-Textkit>
261
262
  - Roadmap: <https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md>
262
- - Author: Shihao Qi — <https://qishihao.icu>
263
+ - Author: Shihao Qi — <https://qishihao.dev>
263
264
 
264
265
  ### License
265
266
 
@@ -13,6 +13,7 @@
13
13
  <p align="center">
14
14
  <a href="https://pypi.org/project/Autarkia-Textkit/"><img alt="PyPI" src="https://img.shields.io/pypi/v/autarkia-textkit.svg"></a>
15
15
  <a href="https://pypi.org/project/Autarkia-Textkit/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/autarkia-textkit.svg"></a>
16
+ <a href="https://github.com/hakituo/Autarkia-Textkit/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/hakituo/Autarkia-Textkit/actions/workflows/ci.yml/badge.svg"></a>
16
17
  <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
17
18
  </p>
18
19
 
@@ -26,7 +27,7 @@
26
27
 
27
28
  把模型**一段回复**切成**几条像人打出来的消息**,外加几个分母说得清的集合相似度函数。
28
29
 
29
- 来自长期在线的 [Autarkia](https://qishihao.icu/projects/autarkia) agent 运行时——那里的切分规则是对着真实 QQ / Android 聊天行为一条条调出来的。整个系列见[组件库路线图](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md)。
30
+ 来自长期在线的 [Autarkia](https://qishihao.dev/projects/autarkia) agent 运行时——那里的切分规则是对着真实 QQ / Android 聊天行为一条条调出来的。整个系列见[组件库路线图](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md)。
30
31
 
31
32
  ### 为什么:切气泡不是 `text.split("。")`
32
33
 
@@ -118,11 +119,11 @@ jaccard(a, b) # 并集分母
118
119
 
119
120
  ### 系列与链接
120
121
 
121
- - 项目页:<https://qishihao.icu/projects/autarkia>
122
+ - 项目页:<https://qishihao.dev/projects/autarkia>
122
123
  - 运行时仓库:<https://github.com/hakituo/Autarkia>
123
124
  - 本包:<https://github.com/hakituo/Autarkia-Textkit>
124
125
  - 组件库路线图:<https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md>
125
- - 作者:Shihao Qi — <https://qishihao.icu>
126
+ - 作者:Shihao Qi — <https://qishihao.dev>
126
127
 
127
128
  ### 许可
128
129
 
@@ -134,7 +135,7 @@ MIT
134
135
 
135
136
  Turn **one model reply** into **several messages that read like a human typed them** — plus set-similarity functions whose names state their actual denominator.
136
137
 
137
- Extracted from the [Autarkia](https://qishihao.icu/projects/autarkia) agent runtime, where these rules were tuned against real QQ/Android chat behavior. See the [component roadmap](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md).
138
+ Extracted from the [Autarkia](https://qishihao.dev/projects/autarkia) agent runtime, where these rules were tuned against real QQ/Android chat behavior. See the [component roadmap](https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md).
138
139
 
139
140
  ### Why
140
141
 
@@ -226,11 +227,11 @@ jaccard(a, b) # union denominator
226
227
 
227
228
  ### The bigger picture
228
229
 
229
- - Project page: <https://qishihao.icu/projects/autarkia>
230
+ - Project page: <https://qishihao.dev/projects/autarkia>
230
231
  - Runtime repository: <https://github.com/hakituo/Autarkia>
231
232
  - This package: <https://github.com/hakituo/Autarkia-Textkit>
232
233
  - Roadmap: <https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md>
233
- - Author: Shihao Qi — <https://qishihao.icu>
234
+ - Author: Shihao Qi — <https://qishihao.dev>
234
235
 
235
236
  ### License
236
237
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "Autarkia-Textkit"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Chinese chat text segmentation and set similarity measures: bubble splitting, cleaning, numbered lists, emoji gluing, Markdown span repair, IoMax/containment/Jaccard/ngram."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -41,11 +41,11 @@ dependencies = []
41
41
  segmenter = ["jieba>=0.42"]
42
42
 
43
43
  [project.urls]
44
- Homepage = "https://qishihao.icu/projects/autarkia"
44
+ Homepage = "https://qishihao.dev/projects/autarkia"
45
45
  Repository = "https://github.com/hakituo/Autarkia-Textkit"
46
46
  Roadmap = "https://github.com/hakituo/Autarkia-tool/blob/main/ROADMAP.md"
47
47
  "Autarkia Runtime" = "https://github.com/hakituo/Autarkia"
48
- Author = "https://qishihao.icu"
48
+ Author = "https://qishihao.dev"
49
49
 
50
50
  [tool.pytest.ini_options]
51
51
  testpaths = ["tests"]
@@ -49,7 +49,7 @@ from .similarity import (
49
49
  token_ngrams,
50
50
  )
51
51
 
52
- __version__ = "0.1.0"
52
+ __version__ = "0.1.1"
53
53
 
54
54
  __all__ = [
55
55
  "__version__",
@@ -374,7 +374,7 @@ def split_chat_message(
374
374
  is_ellipsis_exclamation = False
375
375
  stripped_current = current.strip()
376
376
  if stripped_current.startswith("……") or stripped_current.startswith("..."):
377
- after_ellipsis = stripped_current.lstrip("……").lstrip("...")
377
+ after_ellipsis = stripped_current.lstrip("…").lstrip(".")
378
378
  if after_ellipsis and after_ellipsis[0] in exclamation_words_punct:
379
379
  is_ellipsis_exclamation = True
380
380
  if is_ellipsis_exclamation and char in ["?", "?", "!", "!"]: