用WORD统计字符出现次数WordConcordancer
献给无产语言学者的检索工具
如果你什么检索软件都没有,特别是没有中文检索共具,特别是你还是一个尊重别人知识产权的典范,而且你还有如patric网友那样需要检索古汉语的。这里给大家介绍一个用宏做的词频统计方法。虽然操作上略显复杂,但使用起来实在简单。在Word里直接操作就可以。
**********
用WORD统计字符出现次数WordConcordancer
作者:逍遥浪子 改编者:许家金
第一步 セWord菜单[工具]→[宏]→[宏],输入宏的名称“FindText” ,然后单击[创建]按钮。
Step One: Find [Macro] from the dropdown menu [Tools]; and key in FindText as the Macro name, then click [Create] to start a new Macro.
第二步 在弹出的VisualBasic编辑器的代码窗口中完成以下内容:
Step Two: Clear all the codes in the popup VisualBasic Editor window and paste the following codes exactly as it is into the VisualBasic Editor window.
Sub FindText()
Text = InputBox("Type in any word or word string in the input box below", "Corpus4u_Word_Concord!")
With ActiveDocument.Content.Find
Do While .Execute(FindText:=Text) = True
tim = tim + 1
Loop
End With
MsgBox ("In the current text I have found " + Str(tim) + " instance(s) of " + Text), 48, "Search_Result"
End Sub
第三步 录入完毕后,单击菜单[文件]→[关闭并返回到Microsoft Word后]。
Step Three: Save and close the VB Editor to return Microsoft Word
第四步 单击菜单[工具]→[自定义],单击“命令”选项卡,在“类别”中选择“宏”,将右边的“Normal.NewMacros.FindText”命令拖入“编辑”菜单中,并右击拖入的命令,在“命名”框中重命名为“WordCount”。
Step Four: Find [Customize] from the dropdown menu [Tools]; click [Command] and find [Macro], you will a macro named “Normal.NewMacros.FindText”. Then drag the macro and drop onto anywhere on the Format Toolbar. Finally rename the macro by right-clicking the button, and change “Normal.NewMacros.FindText” to “WordConcord” or any other name.
以后要统计文本数量时,只要单击[WordConcord],按提示输入要查找的内容,单击[确定]就得到统计结果。
You can get the frequency of a key word or word string in the opened text by clicking the button, entering the key word.
Done.
Word版下载:
http://www.corpus4u.org/upload/forum/2005072216312263.doc
献给无产语言学者的检索工具
如果你什么检索软件都没有,特别是没有中文检索共具,特别是你还是一个尊重别人知识产权的典范,而且你还有如patric网友那样需要检索古汉语的。这里给大家介绍一个用宏做的词频统计方法。虽然操作上略显复杂,但使用起来实在简单。在Word里直接操作就可以。
**********
用WORD统计字符出现次数WordConcordancer
作者:逍遥浪子 改编者:许家金
第一步 セWord菜单[工具]→[宏]→[宏],输入宏的名称“FindText” ,然后单击[创建]按钮。
Step One: Find [Macro] from the dropdown menu [Tools]; and key in FindText as the Macro name, then click [Create] to start a new Macro.
第二步 在弹出的VisualBasic编辑器的代码窗口中完成以下内容:
Step Two: Clear all the codes in the popup VisualBasic Editor window and paste the following codes exactly as it is into the VisualBasic Editor window.
Sub FindText()
Text = InputBox("Type in any word or word string in the input box below", "Corpus4u_Word_Concord!")
With ActiveDocument.Content.Find
Do While .Execute(FindText:=Text) = True
tim = tim + 1
Loop
End With
MsgBox ("In the current text I have found " + Str(tim) + " instance(s) of " + Text), 48, "Search_Result"
End Sub
第三步 录入完毕后,单击菜单[文件]→[关闭并返回到Microsoft Word后]。
Step Three: Save and close the VB Editor to return Microsoft Word
第四步 单击菜单[工具]→[自定义],单击“命令”选项卡,在“类别”中选择“宏”,将右边的“Normal.NewMacros.FindText”命令拖入“编辑”菜单中,并右击拖入的命令,在“命名”框中重命名为“WordCount”。
Step Four: Find [Customize] from the dropdown menu [Tools]; click [Command] and find [Macro], you will a macro named “Normal.NewMacros.FindText”. Then drag the macro and drop onto anywhere on the Format Toolbar. Finally rename the macro by right-clicking the button, and change “Normal.NewMacros.FindText” to “WordConcord” or any other name.
以后要统计文本数量时,只要单击[WordConcord],按提示输入要查找的内容,单击[确定]就得到统计结果。
You can get the frequency of a key word or word string in the opened text by clicking the button, entering the key word.
Done.
Word版下载:
http://www.corpus4u.org/upload/forum/2005072216312263.doc