当前位置: 首页 > news >正文

河南科技园网站建设免费在线代理网站

河南科技园网站建设,免费在线代理网站,freeserver 免费服务器申请,codex wordpress org教程目录#xff1a;rime中州韵小狼毫须鼠管安装配置教程 保姆级教程 100增强功能配置教程 在word中#xff0c;我们可以轻易的给汉字加上拼音#xff0c;如下#x1f447;#xff1a; 但是#xff0c;如何单独的输入拼音呢#xff1f;例如输入 pīn yīn, 再如 zhōn…教程目录rime中州韵小狼毫须鼠管安装配置教程 保姆级教程 100增强功能配置教程 在word中我们可以轻易的给汉字加上拼音如下 但是如何单独的输入拼音呢例如输入 pīn yīn, 再如 zhōng guō。今天我们分享一个使用rime中州韵小狼毫须鼠管输入法配置的输入汉语拼音的输入方案。功能简单但十分好用。 先睹为快 pīnyīn输入方案可以快捷的输入带有声调的汉语拼音输出直观选词快捷录入体验优良。 pinyin.schema.yaml pinyin.schema.yaml 是我们的输入方案的方案文档我们在 用户文件夹 下创建一个 txt 文档然后改名为 pinyin.schema.yaml,pinyin.schema.yaml文档内容如下 __build_info:rime_version: 1.5.3timestamps:default: 1626914460default.custom: 1651399897easy_en.custom: 0easy_en.schema: 1491118644key_bindings: 1561218646key_bindings.custom: 0punctuation: 1561218646punctuation.custom: 0 switches:- name: ascii_mode # 默认为中文输出模式reset: 0states: [ 中文, 西文 ]- name: full_shape # 字符默认半角输出reset: 0states: [ 半角, 全角 ]- name: ascii_punct # 默认使用中文标点reset: 0states: [ 。, ]- name: debug # 默认debug开关为关闭状态reset: 0states: [Off, ] engine:processors:- ascii_composer- key_binder- speller- recognizer- punctuator- selector- navigator- express_editorsegmentors:- matcher- ascii_segmentor- abc_segmentor- punct_segmentor- fallback_segmentor key_binder:import_preset: default recognizer:import_preset: default speller:alphabet: zyxwvutsrqponmlkjihgfedcbadelimiter: schema:author:- dyy douyaoyuan126.comdescription: pīn yīn 输入name: pīn yīnschema_id: pinyinversion: 0.0 在上述脚本配置中我们的schema节点中配置了以下内容 schema_idpinyin这个schema_id将会在下文的default.custom.yaml中用到namepīn yīn这个name的值pīn yīn将会出现在方案选单中 pinyin.custom.yaml 一如既往方案名.custom.yaml是对应方案文档的补丁文档这个pinyin.custom.yaml文档中配置了用户的个性化的配置项目此处pinyin.custom.yaml文档的配置如下 patch:translator/enable_user_dict: false # false自动造词及动态词频功能失效true启用自动造词和动态词频style/inline_preedit: false # 是否在输入行内进行预测生成true 表示不单独显示输入字符engine/translators:- lua_translatorpinyin_translator # 添加 pinyin_translator lua 翻译器engine/filters: # 设置以下filter- simplifier- lua_filterpinyin_Filter # 这个过滤器用于给拼音候选词组增加一个尾部空格- uniquifier # 过滤重复候选项依赖 simplifierswitches/: #增加以下开关- name: space # 一个标志开头用来控制是否在拼音选项组词后自动加一个空格reset: 0states: [无,空格]在以上配置中我们为pinyin输入方案指定了以下关键配置 翻译器lua_translatorpinyin_translator这个pinyin_translator的脚本文档将在下文中介绍。滤镜lua_filterpinyin_Filter这个pinyin_Filter的脚本文档将在下文中介绍开关space这个开关的作用是用来控制是否在拼音词组中加入一个空格以提高输入效率 default.custom.yaml 上文中我们定义了新的输入方案 pinyin我们需要在 default.custom.yaml 中的方案选单中配置该输入方案以便我们可以选择使用pinyin输入方案。default.custom.yaml中的配置如下 patch:ascii_composer/switch_key:Caps_Lock: commit_code # 候选状态下按 Caps_Lock 后编码上屏Control_L: noop # 左 ctrl 键无使用效果Control_R: noop # 右 ctrl 键无使用效果Eisu_toggle: clear # 按 Esc 键清除候选编码退出候选框Shift_L: commit_code # 候选状态下按 左 Shift 后编码上屏Shift_R: commit_code # 候选状态下按 右 Shift 后编码上屏ascii_composer:good_old_caps_lock: true # true 通过 caps lock 键切换入英文模式后保持大写输入状态engine/filters:- simplifier # 引入简体拼音输入法过滤器- uniquifier # 过滤重复候选项依赖 simplifierkey_binder/bindings:- {accept: semicolon, send: 2, when: has_menu} # 使用 ; 键选择第 2 候选词- {accept: apostrophe, send: 3, when: has_menu} # 使用 . 键选择第 3 候选词- {accept: bracketleft, send: Page_Up, when: paging} # 使用 PageUp 键向上翻页- {accept: bracketright, send: Page_Down, when: has_menu} # 使用 PageDown 键向下翻页menu/page_size: 10 # 存在候选词选项时每一页显示的候选词数量最大是 10recognizer/patterns/punct: ^/([0-9]0?|[A-Za-z])$ # 标点符号识别模式schema_list:- {schema: wubi_pinyin} # 五笔・拼音 输入方案- {schema: easy_en} # 英文输入方案- {schema: pinyin} # 拼音输入switcher:abbreviate_options: true # 功能选项显示为简写模式caption: 〔方案选单〕 # 选项菜单的名字fold_options: true # 功能选项折叠显示hotkeys: [F8] # 使用 F8 键调出 方案选单以上配置中请注音观察schema_list节点下最后一个schema的内容。 rime.lua pinyin 输入方案中我们使用到了lua_translator和lua_filter我们在rime.lua中增加一个translator翻译器和一个filter滤镜rime.lua中的配置如下 help_translator require(help) inputShow_translator require(inputShow) inputShow_Filter require(inputShow_Filter) Upper_Filter require(Upper_Filter) dic_4w_Filter require(dic_4w_Filter) phraseReplace_Filter require(phraseReplace_Filter) pinyinAdding_Filter require(pinyinAdding_Filter) dateTime_Filter require(dateTime_filter) dynamicPhrase_Filter require(dynamicPhrase_Filter) phraseExt_Filter require(phraseExt_Filter) phraseComment_Filter require(phraseComment_Filter) pinyin_translator require(pinyin_translator) pinyin_Filter require(pinyin_Filter)以上lua脚本中注意观察最后两行内容。 注意 以上所述default.custom.yaml、pinyin.custom.yaml、pinyin.schema.yaml、rime.lua 四个文档应该位于 用户文件夹 下如下 pinyin_translator.lua pinyin_translator.lua 是一个lua脚本脚本实现了rime引擎的lua_translator翻译器接口pinyin_translator.lua脚本实现了用户输入编码向拼音词组翻译的功能。pinyin_translator.lua脚本内容如下 --lua语言中的注释用“--” --[[ pinyin_translator.lua -- Copyright (C) 2023 yaoyuan.dou douyaoyuan126.com 这是一个lua translator 翻译器负责将用户输入的拼音生成带有声调的拼音例如 pīn yīn ]]local logEnable, log pcall(require, runLog) if logEnable thenlog.writeLog()log.writeLog(log from pinyin_translator.lua) endlocal a {ā,á,ǎ,à,a} local o {ō,ó,ǒ,ò,o} local e {ē,é,ě,è,e} local i {ī,í,ǐ,ì,i} local u {ū,ú,ǔ,ù,u} local v {ǖ,ǘ,ǚ,ǜ,ü} local jv {jū,jú,jǔ,jù,ju} local qv {qū,qú,qǔ,qù,qu} local xv {xū,xú,xǔ,xù,xu} local iu {iū,iú,iǔ,iù,iu} local ui {uī,uí,uǐ,uì,ui}local aoeListDict {[a]a,[o]o,[e]e,[i]i,[u]u,[v]v,[jv]jv,[qv]qv,[xv]xv,[iu]iu,[ui]ui}local aoeList {a,o,e,ui,iu,i,u,jv,qv,xv,v}function translator(input, seg)-- 遍历检查韵母, 找到对应的 aoeKey 值local aoeKey for j,aoeK in ipairs(aoeList) doif nil ~ string.match(input,.*..aoeK...*) thenaoeKey aoeKbreakendendlocal inputStr input-- 如果没有 aoeKey则在input后面加入一个 a以提供有效的拼音选项if aoeKey thenaoeKey ainputStr input ..aend--这个 aoeK 存在于 input 中则将 input 中第一个 aoeK 替换成对应的注音字符然后抛出作为选项local aoeL aoeListDict[aoeKey]for j,aoe in ipairs(aoeL) doyield(Candidate(pinyin, seg.start, seg._end,string.gsub(inputStr,aoeKey,aoe,1),))if 4 j and false then-- 如果这是第四个选项四声则填充5个None选项,目的是为了使轻声出现在序号为 0 的位置, 如果你希望这样请将判定中的 false 改为truefor kk5,9 doyield(Candidate(pinyin, seg.start, seg._end,None..tostring(kk),))endendif 4 j and true then--是否输出轻声选项如果不想输出轻声选项如果拼音中不包含 v轻声可以通过 Enter 键直接将字母上屏即可请保持判断条件为trueif string.find(inputStr,v) 1 then--如果确实没有 v 的存在则可以跳过轻声选项breakendendend endreturn translator pinyin_Filter.lua pinyin_Filter.lua是一个lua脚本定义的lua_filter滤镜。pinyin_Filter.lua所定义的滤镜的功能是根据space开关的状态决策是否向候选词组中加入空格。pinyin_Filter.lua脚本的内容如下 -- pinyin_Filter.lua -- Copyright (C) 2023 yaoyuan.dou douyaoyuan126.com --[[ 这个过滤器的主要作用是在拼音候选词组的尾部增加一个空格 ]]local logEnable, log pcall(require, runLog) if logEnable thenlog.writeLog()log.writeLog(log from pinyin_Filter.lua) endlocal function pinyin_Filter(input, env)--获取选项space(空格)开关状态local spaceSwitchFlg env.engine.context:get_option(space) or falsefor cand in input:iter() doif spaceSwitchFlg thenyield(Candidate(word, cand.start, cand._end, cand.text.. , cand.comment))elseyield(cand)endend endreturn pinyin_Filter注意 上述pinyin_translator.lua和pinyin_Filter.lua两个脚本文档均应该位于 用户文件夹下的lua文件夹内如下 配置文档 以上所述配置文档你可以在 rime中州韵小狼毫须鼠管输入法 汉语拼音输入方案配置包.zip 下载取用。 如果你可以访问gitHub你也可以在 dyyRime 中找到完全版本的配置包。 效果欣赏 当你完成了以上的所有设置时你需要重新部署你的rime然后通过F4/F8调出方案选单你应该可以看到pīnyīn输入方案如下 选择pīnyīn输入方案后就可以愉快的开始体验拼音输入了。 如果希望输入的拼音后面自动加上一个空格可以将space开关打开如下 小结 本文分享了一中在rime中州韵小狼毫须鼠管输入法中配置pīn yīn输入方案的方法从而实现了汉语拼音的快速录入并且根据需要可以在录入词组后自动加上空格。
http://www.dnsts.com.cn/news/179355.html

相关文章:

  • 机关网站建设工作总结国外开源代码网站
  • 四平网站建设哪家效果好3d建模视频教学
  • 怎么制作网站建设建设工程网站什么时候可以同步
  • 网站建设服务宗旨网站系统商城
  • h5美食制作网站模板泰州网页设计需要多少钱
  • 类似小红书网站开发费用怎么棋牌网站建设
  • 广水网站建设福州短视频seo服务
  • 用自己电脑做网站 dns网站目录链接怎么做
  • 工信部企业网站备案qq是哪年开始有的
  • 专业建站公司设计方案成都网站建设私单
  • 建一个商城型网站海拉尔做网站的公司
  • 站长资讯网站名加引号
  • 贵阳网站建开发wordpress页面布局插件
  • 简述企业网站建设的目的有哪些成都十大广告公司排名
  • 做营销网站视频嵌入式培训心得
  • 2017网站开发前景丹东网站seo
  • 淘宝联盟网站模板宣传片拍摄预算表
  • soho做网站谷歌推广网站做关键词搜索要好多钱
  • 百度医疗网站建设网站建设相关职业岗位职责
  • 远洋国际建设有限公司网站做网站怎么接广告赚钱
  • 做手机网站的好处wordpress插件文件夹
  • 技术好的手机网站建设湖南品牌网站建站可定制
  • 找人做任务网站有哪些那个网站教你做毕设的
  • 小城镇建设的网站文献商丘市做1企业网站的公司
  • 舟山做网站的公司凡客诚品首页html
  • 上海做网站备案要多久电商平台怎么搭建
  • 网站怎么做免费seo搜索引擎资兴市网站建设专业
  • 企业网站首页设计公司沈阳网络优化培训
  • 网站建设有啥费用用python 做网站
  • 网站建设的基础服务九江做网站开发需要多少钱