[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-ottokart--punctuator2":3,"tool-ottokart--punctuator2":64},[4,17,25,39,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":10,"last_commit_at":23,"category_tags":24,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":26,"name":27,"github_repo":28,"description_zh":29,"stars":30,"difficulty_score":10,"last_commit_at":31,"category_tags":32,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[33,34,35,36,14,37,15,13,38],"图像","数据工具","视频","插件","其他","音频",{"id":40,"name":41,"github_repo":42,"description_zh":43,"stars":44,"difficulty_score":45,"last_commit_at":46,"category_tags":47,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,3,"2026-04-04T04:44:48",[14,33,13,15,37],{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":45,"last_commit_at":54,"category_tags":55,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74913,"2026-04-05T10:44:17",[15,33,13,37],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":45,"last_commit_at":62,"category_tags":63,"status":16},2181,"OpenHands","OpenHands\u002FOpenHands","OpenHands 是一个专注于 AI 驱动开发的开源平台，旨在让智能体（Agent）像人类开发者一样理解、编写和调试代码。它解决了传统编程中重复性劳动多、环境配置复杂以及人机协作效率低等痛点，通过自动化流程显著提升开发速度。\n\n无论是希望提升编码效率的软件工程师、探索智能体技术的研究人员，还是需要快速原型验证的技术团队，都能从中受益。OpenHands 提供了灵活多样的使用方式：既可以通过命令行（CLI）或本地图形界面在个人电脑上轻松上手，体验类似 Devin 的流畅交互；也能利用其强大的 Python SDK 自定义智能体逻辑，甚至在云端大规模部署上千个智能体并行工作。\n\n其核心技术亮点在于模块化的软件智能体 SDK，这不仅构成了平台的引擎，还支持高度可组合的开发模式。此外，OpenHands 在 SWE-bench 基准测试中取得了 77.6% 的优异成绩，证明了其解决真实世界软件工程问题的能力。平台还具备完善的企业级功能，支持与 Slack、Jira 等工具集成，并提供细粒度的权限管理，适合从个人开发者到大型企业的各类用户场景。",70612,"2026-04-05T11:12:22",[15,14,13,36],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":78,"owner_website":78,"owner_url":79,"languages":80,"stars":89,"forks":90,"last_commit_at":91,"license":92,"difficulty_score":45,"env_os":93,"env_gpu":94,"env_ram":93,"env_deps":95,"category_tags":101,"github_topics":102,"view_count":45,"oss_zip_url":78,"oss_zip_packed_at":78,"status":16,"created_at":107,"updated_at":108,"faqs":109,"releases":138},628,"ottokart\u002Fpunctuator2","punctuator2","A bidirectional recurrent neural network model with attention mechanism for restoring missing punctuation in unsegmented text","punctuator2 是一款专为恢复未分段文本中缺失标点而设计的开源 AI 模型。它主要解决纯文本因缺乏标点符号而导致阅读困难的问题，特别擅长处理语音识别系统输出的原始字符串，将连续的字串转化为通顺的句子。\n\n在技术实现上，punctuator2 采用双向循环神经网络结合注意力机制，能够精准判断句子边界及具体标点类型。其核心亮点在于支持双阶段训练：第一阶段仅依赖文本特征学习通用标点规则；第二阶段可引入停顿时长数据，帮助模型适应特定领域或优化语音转写后的标点还原效果，这在处理口语化内容时尤为有效。\n\npunctuator2 非常适合自然语言处理开发者、语音技术研究者以及需要自动化清洗文本数据的工程人员使用。尽管它目前主要针对英文语料进行了优化，但其架构思路为无标点文本处理提供了高效的解决方案。集成到工作流后，它能显著提升文本的可读性，并降低人工校对的成本，是构建高质量 NLP 应用的基础组件之一。","**[DEMO](http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator)** and **[DEMO2](http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\u002Fgame)**\n\n# Punctuator\n\nA bidirectional recurrent neural network model with attention mechanism for restoring missing inter-word punctuation in unsegmented text.\n\nThe model can be trained in two stages (second stage is optional):\n\n1. First stage is trained on punctuation annotated text. Here the model learns to restore puncutation based on textual features only.\n2. Optional second stage can be trained on punctuation *and* pause annotated text. In this stage the model learns to combine pause durations with textual features and adapts to the target domain. If pauses are omitted then only adaptation is performed. Second stage with pause durations can be used for example for restoring punctuation in automatic speech recognition system output.\n\n# How well does it work?\n\n* A working demo can be seen here: http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\n* You can try to compete with this model here: http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\u002Fgame\n\nRemember that all the scores given below are on _unsegmented_ text and we did not use prosodic features, so, among other things, the model has to detect sentence boundaries in addition to the boundary type (?QUESTIONMARK, .PERIOD or !EXCLAMATIONMARK) based entirely on textual features. The scores are computed on the test set.\n\nTraining speed with default settings, an optimal Theano installation and a modern GPU should be around 10000 words per second.\n\nPretrained models can be downloaded [here](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F0B7BsN5f2F1fZQnFsbzJ3TWxxMms?resourcekey=0-6yhuY9FOeITBBWWNdyG2aw&usp=sharing) (Demo + 2 models from the Interspeech paper).\n\n## English TED talks\nTraining set size: 2.1M words. First stage only. More details can be found in [this paper](http:\u002F\u002Fwww.isca-speech.org\u002Farchive\u002FInterspeech_2016\u002Fpdfs\u002F1517.PDF).\nFor comparison, our [previous model](https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator) got an overall F1-score of 50.8.\n\nPUNCTUATION      | PRECISION | RECALL    | F-SCORE\n--- | --- | --- | ---\n,COMMA           | 64.4 | 45.2 | 53.1\n?QUESTIONMARK    | 67.5 | 58.7 | 62.8\n.PERIOD          | 72.3 | 71.5 | 71.9\n_Overall_        | _68.9_ | _58.1_ | _63.1_\n\n## English Europarl v7\nTraining set size: 40M words. First stage only. Details in [.\u002Fexample](https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Ftree\u002Fmaster\u002Fexample).\n\nYou can try to compete with this model [here](http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\u002Fgame).\n\nPUNCTUATION      | PRECISION | RECALL    | F-SCORE\n---              | ---       | ---       | ---\n?QUESTIONMARK    | 77.7      |  73.2     |  75.4\n!EXCLAMATIONMARK | 50.0      |  0.1      |  0.1\n,COMMA           | 68.9      |  72.0     |  70.4\n-DASH            | 55.9      |  8.8      |  15.2\n:COLON           | 60.9      |  23.8     |  34.2\n;SEMICOLON       | 44.7      |  1.1      |  2.2\n.PERIOD          | 84.7      |  84.1     |  84.4\n_Overall_        | _75.7_    | _73.9_    | _74.8_\n\n# Requirements\n* Python 2.7\n* Numpy\n* Theano\n\n# Requirements for data:\n\n* Cleaned text files for training and validation of the first phase model. Each punctuation symbol token must be surrounded by spaces.\n\n  Example:\n  ```to be ,COMMA or not to be ,COMMA that is the question .PERIOD```\n* *(Optional)* Pause annotated text files for training and validation of the second phase model. These should be cleaned in the same way as the first phase data. Pause durations in seconds should be marked after each word with a special tag `\u003Csil=0.200>`. Punctuation mark, if any, must come after the pause tag.\n\n  Example:\n  ```to \u003Csil=0.000> be \u003Csil=0.100> ,COMMA or \u003Csil=0.000> not \u003Csil=0.000> to \u003Csil=0.000> be \u003Csil=0.150> ,COMMA that \u003Csil=0.000> is \u003Csil=0.000> the \u003Csil=0.000> question \u003Csil=1.000> .PERIOD```\n\n  Second phase data can also be without pause annotations to do just target domain adaptation.\n  \nMake sure that first words of sentences don't have capitalized first letters. This would give the model unfair hints about period locations. Also, the text files you use for training and validation must be large enough (at least minibatch_size x sequence_length of words, which is 128x50=6400 words with default settings), otherwise you might get an error.\n\n# Configuration\nVocabulary size, punctuation tokens and their mappings, and converted data location can be configured in the header of data.py.\nSome model hyperparameters can be configured in the headings of main.py and main2.py. Learning rate and hidden layer size can be passed as arguments.\n\n# Usage\n\nFirst step is data conversion. Assuming that preprocessed and cleaned *.train.txt, *.dev.txt and *.test.txt files are located in `\u003Cdata_dir>`, the conversion can be initiated with:\n\n`python data.py \u003Cdata_dir>`\n\nIf you have second stage data as well, then:\n\n`python data.py \u003Cdata_dir> \u003Csecond_stage_data_dir>`\n\n\n\nThe first stage can be trained with:\n\n`python main.py \u003Cmodel_name> \u003Chidden_layer_size> \u003Clearning_rate>`\n\ne.g `python main.py \u003Cmodel_name> 256 0.02` works well.\n\n\n\nSecond stage can be trained with:\n\n`python main2.py \u003Cmodel_name> \u003Chidden_layer_size> \u003Clearning_rate> \u003Cfirst_stage_model_path>`\n\n\n\nPreprocessed text can be punctuated with e.g:\n\n`cat data.dev.txt | python punctuator.py \u003Cmodel_path> \u003Cmodel_output_path>`\n\nor, if pause annotations are present in data.dev.txt and you have a second stage model trained on pause annotated data, then:\n\n`cat data.dev.txt | python punctuator.py \u003Cmodel_path> \u003Cmodel_output_path> 1`\n\nPunctuation tokens in data.dev.txt don't have to be removed - the punctuator.py script ignores them.\n\n\nError statistics in this example can be computed with:\n\n`python error_calculator.py data.dev.txt \u003Cmodel_output_path>`\n\n\nYou can play with a trained model with (assumes the input text is similarly preprocessed as the training data):\n\n`python play_with_model.py \u003Cmodel_path>`\n\nor with:\n\n`python play_with_model.py \u003Cmodel_path> 1`\n\nif you want to see, which words the model sees as UNKs (OOVs).\n\n\n# Citing\n\nThe software is described in:\n\n    @inproceedings{tilk2016,\n      author    = {Ottokar Tilk and Tanel Alum{\\\"a}e},\n      title     = {Bidirectional Recurrent Neural Network with Attention Mechanism for Punctuation Restoration},\n      booktitle = {Interspeech 2016},\n      year      = {2016}\n    }\n\nWe used the [release v1.0](https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Freleases\u002Ftag\u002Fv1.0) in the paper.\n\n# Alternatives\n* Punctuator reimplemented in Tensorflow: https:\u002F\u002Fgithub.com\u002Fcadia-lvl\u002Fpunctuation-prediction\u002Ftree\u002Fmaster\u002Fpunctuator2tf2\n* A fork from this repository that uses additional prosodic features: https:\u002F\u002Fgithub.com\u002Falpoktem\u002FpunkProse\n* Convolutional neural network with slightly smaller accuracy but much higher speed (50x faster): https:\u002F\u002Fgithub.com\u002Fvackosar\u002Fkeras-punctuator (additional details here: https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Fissues\u002F14)\n* A general sequence labeling model: https:\u002F\u002Fgithub.com\u002Fmarekrei\u002Fsequence-labeler that can be used for punctuation restoration with small modifications (example here: https:\u002F\u002Fgithub.com\u002Fottokart\u002Fsequence-labeler). Punctuator2 can be probably used for other sequence labeling problems as well.\n* Our previous approach with unidirectional LSTM (less accurate, but useful if you don't want to use Theano): https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator\n","**[演示](http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator)** and **[演示 2](http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\u002Fgame)**\n\n# Punctuator\n\n一个带有注意力机制（Attention Mechanism）的双向循环神经网络（Bidirectional Recurrent Neural Network）模型，用于恢复未分词（Unsegmented Text）文本中缺失的词间标点。\n\n该模型可以分两个阶段进行训练（第二阶段可选）：\n\n1. 第一阶段在带标点标注的文本上进行训练。在此阶段，模型仅基于文本特征学习恢复标点。\n2. 可选的第二阶段可以在带标点和停顿（Pause）标注的文本上进行训练。在此阶段，模型学习结合停顿时长与文本特征，并适应目标领域。如果省略停顿，则仅执行适应。带有停顿时长的第二阶段可用于例如自动语音识别（Automatic Speech Recognition）系统输出的标点恢复。\n\n# 效果如何？\n\n* 此处可见运行中的演示：http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\n* 您可以尝试在此处与该模型竞争：http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\u002Fgame\n\n请记住，下面给出的所有分数都是针对_unsegmented_（未分词）文本的，我们没有使用韵律（Prosodic）特征，因此，除其他外，模型必须完全基于文本特征检测句子边界以及边界类型（?QUESTIONMARK, .PERIOD 或 !EXCLAMATIONMARK）。分数是在测试集上计算的。\n\n使用默认设置、优化的 Theano 安装和现代 GPU，训练速度应约为每秒 10000 个单词。\n\n预训练模型可在此下载 [here](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F0B7BsN5f2F1fZQnFsbzJ3TWxxMms?resourcekey=0-6yhuY9FOeITBBWWNdyG2aw&usp=sharing)（演示版 + Interspeech 论文中的 2 个模型）。\n\n## 英文 TED 演讲\n训练集大小：210 万单词。仅第一阶段。更多详情见 [这篇论文](http:\u002F\u002Fwww.isca-speech.org\u002Farchive\u002FInterspeech_2016\u002Fpdfs\u002F1517.PDF)。\n作为对比，我们的 [先前模型](https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator) 获得了 50.8 的整体 F1 分数。\n\n标点 | 精确率 | 召回率 | F 分数\n--- | --- | --- | ---\n,COMMA           | 64.4 | 45.2 | 53.1\n?QUESTIONMARK    | 67.5 | 58.7 | 62.8\n.PERIOD          | 72.3 | 71.5 | 71.9\n_总计_        | _68.9_ | _58.1_ | _63.1_\n\n## 英文 Europarl v7\n训练集大小：4000 万单词。仅第一阶段。详情见 [.\u002Fexample](https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Ftree\u002Fmaster\u002Fexample)。\n\n您可以尝试在此处与该模型竞争 [here](http:\u002F\u002Fbark.phon.ioc.ee\u002Fpunctuator\u002Fgame)。\n\n标点 | 精确率 | 召回率 | F 分数\n---              | ---       | ---       | ---\n?QUESTIONMARK    | 77.7      |  73.2     |  75.4\n!EXCLAMATIONMARK | 50.0      |  0.1      |  0.1\n,COMMA           | 68.9      |  72.0     |  70.4\n-DASH            | 55.9      |  8.8      |  15.2\n:COLON           | 60.9      |  23.8     |  34.2\n;SEMICOLON       | 44.7      |  1.1      |  2.2\n.PERIOD          | 84.7      |  84.1     |  84.4\n_总计_        | _75.7_    | _73.9_    | _74.8_\n\n# 环境要求\n* Python 2.7\n* Numpy\n* Theano\n\n# 数据要求：\n\n* 用于第一阶段模型训练和验证的清理后的文本文件。每个标点符号标记必须用空格包围。\n\n  示例：\n  ```to be ,COMMA or not to be ,COMMA that is the question .PERIOD```\n* *(可选)* 用于第二阶段模型训练和验证的停顿标注文本文件。这些文件的清理方式应与第一阶段数据相同。以秒为单位的停顿时长应在每个单词后使用特殊标签 `\u003Csil=0.200>` 标记。如果有标点符号，必须在停顿标签之后。\n\n  示例：\n  ```to \u003Csil=0.000> be \u003Csil=0.100> ,COMMA or \u003Csil=0.000> not \u003Csil=0.000> to \u003Csil=0.000> be \u003Csil=0.150> ,COMMA that \u003Csil=0.000> is \u003Csil=0.000> the \u003Csil=0.000> question \u003Csil=1.000> .PERIOD```\n\n  第二阶段数据也可以没有停顿标注，仅用于目标领域适应。\n  \n请确保句子的首单词不要有大写首字母。这会给模型关于句号位置的不公平提示。此外，你用于训练和验证的文本文件必须足够大（至少 minibatch_size x sequence_length 个单词，默认设置下为 128x50=6400 个单词），否则可能会出错。\n\n# 配置\n词汇表大小、标点标记及其映射，以及转换数据的位置可以在 data.py 的头部进行配置。\n一些模型超参数（Hyperparameters）可以在 main.py 和 main2.py 的头部进行配置。学习率（Learning Rate）和隐藏层大小（Hidden Layer Size）可以作为参数传递。\n\n# 使用方法\n\n第一步是数据转换。假设预处理和清理后的 *.train.txt, *.dev.txt 和 *.test.txt 文件位于 `\u003Cdata_dir>` 中，可以使用以下命令启动转换：\n\n`python data.py \u003Cdata_dir>`\n\n如果你也有第二阶段数据，那么：\n\n`python data.py \u003Cdata_dir> \u003Csecond_stage_data_dir>`\n\n\n\n第一阶段可以通过以下方式训练：\n\n`python main.py \u003Cmodel_name> \u003Chidden_layer_size> \u003Clearning_rate>`\n\n例如 `python main.py \u003Cmodel_name> 256 0.02` 效果良好。\n\n\n\n第二阶段可以通过以下方式训练：\n\n`python main2.py \u003Cmodel_name> \u003Chidden_layer_size> \u003Clearning_rate> \u003Cfirst_stage_model_path>`\n\n\n\n预处理文本可以通过以下方式添加标点，例如：\n\n`cat data.dev.txt | python punctuator.py \u003Cmodel_path> \u003Cmodel_output_path>`\n\n或者，如果 data.dev.txt 中存在停顿标注且你有一个在停顿标注数据上训练的第二阶段模型，那么：\n\n`cat data.dev.txt | python punctuator.py \u003Cmodel_path> \u003Cmodel_output_path> 1`\n\ndata.dev.txt 中的标点标记不需要移除 - punctuator.py 脚本会忽略它们。\n\n\n此示例中的错误统计信息可以通过以下方式计算：\n\n`python error_calculator.py data.dev.txt \u003Cmodel_output_path>`\n\n\n你可以使用以下方式玩弄训练好的模型（假设输入文本的预处理方式与训练数据类似）：\n\n`python play_with_model.py \u003Cmodel_path>`\n\n或者使用：\n\n`python play_with_model.py \u003Cmodel_path> 1`\n\n如果你想查看模型将哪些词视为 UNKs（未知词，Out-of-Vocabulary）。\n\n\n# 引用\n\n该软件描述于：\n\n    @inproceedings{tilk2016,\n      author    = {Ottokar Tilk and Tanel Alum{\\\"a}e},\n      title     = {Bidirectional Recurrent Neural Network with Attention Mechanism for Punctuation Restoration},\n      booktitle = {Interspeech 2016},\n      year      = {2016}\n    }\n\n我们在论文中使用了 [release v1.0](https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Freleases\u002Ftag\u002Fv1.0)。\n\n# 替代方案\n* Punctuator 使用 TensorFlow（深度学习框架）重新实现：https:\u002F\u002Fgithub.com\u002Fcadia-lvl\u002Fpunctuation-prediction\u002Ftree\u002Fmaster\u002Fpunctuator2tf2\n* 此仓库的一个分支，使用了额外的韵律特征：https:\u002F\u002Fgithub.com\u002Falpoktem\u002FpunkProse\n* 卷积神经网络（CNN），准确率略低但速度快得多（50 倍）：https:\u002F\u002Fgithub.com\u002Fvackosar\u002Fkeras-punctuator（更多详情见此处：https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Fissues\u002F14）\n* 一个通用的序列标注模型：https:\u002F\u002Fgithub.com\u002Fmarekrei\u002Fsequence-labeler，经过少量修改即可用于标点恢复（示例见此处：https:\u002F\u002Fgithub.com\u002Fottokart\u002Fsequence-labeler）。Punctuator2 可能也可用于其他序列标注问题。\n* 我们之前使用单向 LSTM（长短期记忆网络）的方法（准确率较低，但如果你不想使用 Theano（深度学习库）则很有用）：https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator","# punctuator2 快速上手指南\n\n**punctuator2** 是一个基于双向循环神经网络（RNN）和注意力机制的开源工具，用于在未分词文本中恢复缺失的标点符号。支持纯文本训练及结合停顿时长进行自适应训练。\n\n## 1. 环境准备\n\n本工具对运行环境有特定要求，请确保满足以下条件：\n\n*   **操作系统**: Linux \u002F macOS \u002F Windows\n*   **Python 版本**: **Python 2.7** (重要：不支持 Python 3)\n*   **核心依赖**:\n    *   Numpy\n    *   Theano\n*   **数据格式要求**:\n    *   训练\u002F验证文本需清理过，每个标点符号 Token 前后必须有空格。\n    *   示例：`to be ,COMMA or not to be ,COMMA that is the question .PERIOD`\n    *   若使用第二阶段模型，需在单词后标记停顿时间，如 `\u003Csil=0.200>`。\n\n## 2. 安装步骤\n\n### 2.1 获取代码\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2.git\ncd punctuator2\n```\n\n### 2.2 安装依赖\n建议使用国内镜像源加速安装过程：\n```bash\npip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple numpy theano\n```\n\n### 2.3 下载预训练模型（可选）\n如需直接使用，可从 Google Drive 下载预训练模型：\n[下载地址](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F0B7BsN5f2F1fZQnFsbzJ3TWxxMms?resourcekey=0-6yhuY9FOeITBBWWNdyG2aw&usp=sharing)\n将下载的文件放入项目根目录或指定路径。\n\n## 3. 基本使用\n\n### 3.1 数据转换\n在训练前，需将原始文本转换为模型可识别的格式。假设预处理后的文件位于 `\u003Cdata_dir>`：\n\n```bash\npython data.py \u003Cdata_dir>\n```\n若有第二阶段数据（含停顿标注），则：\n```bash\npython data.py \u003Cdata_dir> \u003Csecond_stage_data_dir>\n```\n\n### 3.2 模型训练（可选）\n**第一阶段训练**（仅基于文本特征）：\n```bash\npython main.py \u003Cmodel_name> \u003Chidden_layer_size> \u003Clearning_rate>\n# 示例：python main.py my_model 256 0.02\n```\n\n**第二阶段训练**（结合停顿时长，可选）：\n```bash\npython main2.py \u003Cmodel_name> \u003Chidden_layer_size> \u003Clearning_rate> \u003Cfirst_stage_model_path>\n```\n\n### 3.3 标点恢复（推理）\n使用训练好的模型对文本进行标点预测。假设输入文件为 `data.dev.txt`，模型路径为 `\u003Cmodel_path>`：\n\n**基础模式：**\n```bash\ncat data.dev.txt | python punctuator.py \u003Cmodel_path> \u003Cmodel_output_path>\n```\n\n**带停顿标注模式**（需使用第二阶段模型且输入包含停顿标签）：\n```bash\ncat data.dev.txt | python punctuator.py \u003Cmodel_path> \u003Cmodel_output_path> 1\n```\n*注：输入文件中的原有标点 Token 无需移除，脚本会自动忽略。*\n\n### 3.4 交互式测试\n可直接加载模型进行本地交互测试：\n```bash\npython play_with_model.py \u003Cmodel_path>\n```","某在线教育平台的内容团队每天需处理大量语音讲座录音，将其转换为文字稿供学生复习。面对未经分割且缺失标点的原始转录文本，人工整理成本高昂且效率低下。\n\n### 没有 punctuator2 时\n- 人工逐字校对耗时极长，一篇 1 小时的讲座文本往往需要数小时才能完成基础标点修复。\n- 简单的正则规则无法理解语义，经常将长难句错误切分，导致逻辑断裂。\n- 语音识别输出的停顿信息未被利用，无法区分疑问句与陈述句的语气差异。\n- 批量处理困难，遇到生僻词或特定领域术语时准确率急剧下降。\n\n### 使用 punctuator2 后\n- punctuator2 基于双向循环神经网络自动恢复标点，处理速度达到每秒 1 万词，效率提升百倍。\n- 模型能结合上下文特征精准判断句子边界，显著改善长难句的阅读流畅度。\n- 支持引入停顿时长数据训练第二阶段，有效适配不同讲师的语速和发音习惯。\n- 在英文 TED 演讲等测试集上整体 F1 分数超 60%，大幅降低了人工审核的工作量。\n\npunctuator2 通过深度学习技术将非结构化语音文本转化为高质量的可读内容，彻底解放了内容生产流程。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fottokart_punctuator2_ffe2919c.png","ottokart","Ottokar Siirak","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fottokart_717739d3.png",null,"https:\u002F\u002Fgithub.com\u002Fottokart",[81,85],{"name":82,"color":83,"percentage":84},"Python","#3572A5",98.6,{"name":86,"color":87,"percentage":88},"Shell","#89e051",1.4,683,193,"2026-03-06T07:35:07","MIT","未说明","非必需，提及“现代 GPU”可提升训练速度至约 10000 词\u002F秒，无具体型号\u002F显存\u002FCUDA 要求",{"notes":96,"python":97,"dependencies":98},"1. 工具基于较旧的 Python 2.7 和 Theano 框架，现代系统运行可能需要兼容层；2. 输入文本需预处理，标点符号前后必须包含空格；3. 支持两阶段训练，第二阶段可选加入停顿时长标注以提升领域适应性；4. 预训练模型可通过 Google Drive 获取。","2.7",[99,100],"numpy","theano",[15],[103,104,100,105,106],"punctuation","recurrent-neural-networks","attention","demo","2026-03-27T02:49:30.150509","2026-04-06T06:53:19.716400",[110,115,119,124,129,134],{"id":111,"question_zh":112,"answer_zh":113,"source_url":114},2576,"如何正确初始化数据目录和文件结构？","需要在仓库内创建 `data` 文件夹并放入 `data.train.txt`, `data.dev.txt`, `data.test.txt`。运行命令 `python data.py \u003Cdata_dir>` 进行转换。注意：为了避免报错，所有源文件（train\u002Fdev\u002Ftest）中的单词总数必须至少达到 `MAX_SEQUENCE_LEN * MINIBATCH_SIZE`（默认 MAX_SEQUENCE_LEN 为 200），否则会导致空批次错误。","https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Fissues\u002F1",{"id":116,"question_zh":117,"answer_zh":118,"source_url":114},2577,"为什么训练时 minibatch 循环未启动且样本数为零？","这通常是因为数据集规模不足以满足最小批次要求。请检查 `get_minibatch` 函数（main.py 第 41 行附近），确保输入数据的单词数量符合 `MAX_SEQUENCE_LEN * MINIBATCH_SIZE` 的约束。如果使用的是旧版 raw_data 仍报错，可能需要更新代码或增加数据量。",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},2578,"如何排除特定单词的标点处理或修正专有名词大小写？","该工具主要处理标点，不直接处理大小写（Truecasing）或硬编码词汇。建议对输出结果进行后处理：编写自定义脚本将文本分割为单词，检查是否在预定义字典中，若匹配则替换（例如将 'librispeech' 替换为 'LibriSpeech'）。","https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Fissues\u002F55",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},2579,"Python 3 环境下运行报错 `_pickle` 无属性 `HIGHEST_PROTOCOL` 怎么办？","这是 Python 2 到 3 迁移导致的兼容性问题。Python 3 不再支持该属性。解决方案是更新代码以移除 `protocol=cPickle.HIGHEST_PROTOCOL` 参数。维护者已在 commit 8edec70 中修复此问题，请拉取最新代码。","https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Fissues\u002F53",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},2580,"训练过程中出现 NaN 值（困惑度变为 nan）是什么原因？","这通常表示模型过拟合（Overfitting）。完美困惑度为 1.0，当训练集 PPL 降至 1.0 而验证集不降时，说明模型已过度学习。建议在验证集 PPL 停止下降时立即停止训练，而不是盲目增加 epoch 数。","https:\u002F\u002Fgithub.com\u002Fottokart\u002Fpunctuator2\u002Fissues\u002F46",{"id":135,"question_zh":136,"answer_zh":137,"source_url":133},2581,"训练多少个 epoch 合适？好的困惑度（Perplexity）值是多少？","经验表明 2-5 个 epoch 通常足够（相当于模型浏览了 29M 句句子两次）。验证集 PPL 在 1.28 左右表现良好。建议启用早停机制（Early Stopping），保存每个 epoch 的模型并在验证集上选择 PPL 最低的那个，而不是依赖固定 epoch 数。",[139],{"id":140,"version":141,"summary_zh":142,"released_at":143},102086,"v1.0","The version that was used in the paper _Bidirectional Recurrent Neural Network with Attention Mechanism for Punctuation Restoration_","2017-03-03T18:12:01"]