miniCOIL clean_words mutates input and loses counts when normalized words collide
维护者通常 4 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 1/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
The issue identifies SparseVectorConverter.clean_words() and provides two offline regression cases, with examples for input mutation and lost counts when normalized words collide. Start by reading that method and inspect the linked pull request #878, which is already open. Done means the cleaned result combines counts while retaining the known word's vocabulary ID and embedding, and the caller's input remains unchanged.
由索引模型根据 Issue 内容生成。
描述
SparseVectorConverter.clean_words() changes the caller's WordEmbedding when an unknown word normalizes to a known word. It also loses the unknown word's count if the known word occurs later in the input mapping.
Reproduced on current main, without downloading a model:
from py_rust_stemmers import SnowballStemmer
from fastembed.sparse.utils.sparse_vectors_converter import SparseVectorConverter, WordEmbedding
converter = SparseVectorConverter(set(), SnowballStemmer("english"))
known = WordEmbedding("cat", ["cat"], 1, 1, [1.0, 0.0])
unknown = WordEmbedding("cat!", ["cat!"], 2, -1, [1.0])
sentence = {"cat": known, "cat!": unknown}
converter.clean_words(sentence)
print(known.count) # 3: caller's original count was 1
print(converter.clean_words(sentence)["cat"].count) # 5 instead of 3
With fresh inputs in the reverse order, the cleaned count is 1 instead of 3. The known word should retain its vocabulary ID and embedding while combining both counts, without changing the input. Two parameterized offline regression cases fail on main (one for input mutation, one for the lost count).
AI assistance: Codex inspected the source and ran the reproductions and tests.
- 主要语言
- Python
- 星标
- 3.3k
- 派生
- 314
- 平均合并
- 5 天 7 小时
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
qdrant/fastembed 的其他 Issue
-
[Bug]: Bm25 splits Tamil, Hindi, Sinhala and other words on their combining marks可能已有人在做 @Nipuna-Lakruwan 于 12 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 30/100
qdrant/fastembed#886 · 2 条评论 ·
维护者通常 4 天内回复
-
[Bug]: Revision-pinned HF downloads can falsely report intact files as corrupted可能已有人在做 @N7766 于 24 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 82/100
维护者通常 4 天内回复
-
[Bug]: URL-backed custom models with the same basename reuse the wrong cached model可能已有人在做 @rtmalikian 于 24 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
维护者通常 4 天内回复
-
[Bug]: rerank_pairs raises TypeError when pairs are passed as a tuple of pairs可能已有人在做 @michaelkillgta 于 54 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 22/100
维护者通常 4 天内回复
-
[Feature]: Support huggingface-hub 2.0可能重新可做 @joein 于 64 天前认领,目前没有进行中的 PR。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
qdrant/fastembed#742 · 已指派 1 人 ·
维护者通常 4 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
TigreGotico/orthography2ipa#2950 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
Unstructured-IO/unstructured#4876 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
openfoodfacts/openfoodfacts-python#579 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
fairagro/m4.2_sql_to_arc#388 ·
维护者通常 1 天内回复