|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
   『第 16 楼』:
使用 LLM 解释/回答一下
正如3742668所说的那样,词库的格式是非常重要的,要用CMD查找词库的匹配内容,非findstr莫属。初步写了一段代码,要求词库的格式是:单词独占一行(不区分大小写);翻译的内容另起一行(不允许出现纯字母行),可以有多行。
代码:
@echo off
:begin
cls
set input=
set /p input=请输入要查找的单词(要退出请直接回车):
if not defined input exit
for /f "tokens=1,2 delims=:" %%i in ('findstr /n . test.txt') do (
if /i "%%j"=="%input%" (set line=%%i&&goto display)
)
echo _________________________________
echo.
echo 没有找到 %input% 的记录
echo _________________________________
echo.
pause
goto begin
:display
echo _________________________________
echo.
echo %input%:
for /f "skip=%line% tokens=*" %%i in (test.txt) do (
echo %%i|findstr "^*$">nul &&goto end||echo %%i%
)
:end
echo _________________________________
echo.
pause
goto begin
测试内容格式举例:
China
n.
中国, 瓷器
DOS
n.
磁盘操作系统
name
n.
名字, 名称, 姓名, 名誉
vt.
命名, 提名, 叫出, 指定
adj.
姓名的, 据以取名的
who
pron.
谁, 那...的(人)
有兴趣的请用更多的内容来进行测试。
Last edited by namejm on 2006-10-12 at 08:19 ]
Just as 3742668 said, the format of the lexicon is very important. To find matching content in the lexicon using CMD, findstr is the best choice. A preliminary code is written, requiring the format of the lexicon to be: each word occupies one line (case - insensitive); the translation content starts a new line (pure - letter lines are not allowed), and there can be multiple lines.
Code:
@echo off
:begin
cls
set input=
set /p input=Please enter the word to be searched (press Enter directly to exit):
if not defined input exit
for /f "tokens=1,2 delims=:" %%i in ('findstr /n. test.txt') do (
if /i "%%j"=="%input%" (set line=%%i&&goto display)
)
echo _________________________________
echo.
echo No record of %input% found
echo _________________________________
echo.
pause
goto begin
:display
echo _________________________________
echo.
echo %input%:
for /f "skip=%line% tokens=*" %%i in (test.txt) do (
echo %%i|findstr "^*$">nul &&goto end||echo %%i%
)
:end
echo _________________________________
echo.
pause
goto begin
Test content format example:
China
n.
China, porcelain
DOS
n.
Disk operating system
name
n.
name, name, name, reputation
vt.
name, nominate, call out, designate
adj.
name - related, named - after
who
pron.
who, the one... (person)
Those interested can use more content for testing.
Last edited by namejm on 2006 - 10 - 12 at 08:19 ]
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-10-12 08:02 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
Re namejm:
记得上次在某个帖子里就提到过,把findstr防止循环外面和防在循环里面两种方法的效率会大不一样。 用你上面的方法在处理起数万行记录的时候效率就非常低下了,所以最好是先findstr,再for。时间关系,写个流程:
@echo off
for /f "delims=:" %%i in ('findstr /nirc:"^%单词% .*" 词库.txt') do set /a col=%%i + 1
for /f "delims= skip=%col%" %%i in (词库.txt) do echo %%i && goto :next
:next
.
.
.
上面的方法效率应该会高很多,兄弟买了新手机,我去帮下音乐去了,闪了。
Re namejm:
Remember that in a previous post, I mentioned that the efficiency of using findstr inside or outside the loop can be very different. Using your above method is very inefficient when processing tens of thousands of lines of records. So it's best to use findstr first and then for. Due to time constraints, write a process:
@echo off
for /f "delims=:" %%i in ('findstr /nirc:"^%word% .*" word library.txt') do set /a col=%%i + 1
for /f "delims= skip=%col%" %%i in (word library.txt) do echo %%i && goto :next
:next
.
.
.
The above method should be much more efficient. Bro, I bought a new phone, I'm going to help with the music, bye.
|
|
2006-10-12 08:38 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
呵呵,是的,放在for内部和外部的效率差别是很大的,因为杀软刚换成卡巴,更新频繁,一更新CPU占用往往达到100%,卡得很,那个代码我只测试了一小段内容,看来我得把卡巴禁用一下再测试。
Hehe, yes, the efficiency difference between putting it inside and outside the for is quite big. Because the antivirus software has just been changed to Kaspersky, and the updates are frequent. Once updated, the CPU usage often reaches 100%, and it's very laggy. I only tested a small segment of that code. It seems I need to disable Kaspersky and then test again.
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-10-12 08:56 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
namejm兄的代码不错,顶一个先.......
Brother namejm's code is good, give a thumbs up first.......
|
|
2006-10-12 09:12 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
 『第 20 楼』:
使用 LLM 解释/回答一下
修改了16楼的代码如下,在本机上测试3W行内容,结果转瞬间就出来了。请各位测试更多更复杂的内容,看看效率和准确性如何:
@echo off
:: 要求词库的格式是:单词独占一行(不区分大小写);
:: 翻译的内容另起一行(不允许出现纯字母行),可以有多行。
:begin
cls
set input=
set line=
set /p input=请输入要查找的单词(要退出请直接回车):
if not defined input exit
for /f "tokens=1* delims=:" %%i in ('findstr /nirc:"^%input%" 词库.txt') do (if /i "%%j"=="%input%" set line=%%i)
if not "%line%"=="" (goto display) else (
echo _________________________________
echo.
echo 没有找到 %input% 的记录
echo _________________________________
echo.
pause
goto begin)
:display
echo _________________________________
echo.
echo %input%:
for /f "skip=%line% delims=" %%i in (词库.txt) do (
echo %%i|findstr "^*$">nul &&goto end||echo %%i
)
:end
echo _________________________________
echo.
pause
goto begin
The code for floor 16 has been modified as follows. When testing 30,000 lines of content on my local machine, the result comes out in an instant. Please各位test more complex content and see how the efficiency and accuracy are:
@echo off
:: The format of the word list is: each word occupies one line (case-insensitive);
:: The translation content starts a new line (pure alphabet lines are not allowed), and there can be multiple lines.
:begin
cls
set input=
set line=
set /p input=Please enter the word to look up (press Enter directly to exit):
if not defined input exit
for /f "tokens=1* delims=:" %%i in ('findstr /nirc:"^%input%" 词库.txt') do (if /i "%%j"=="%input%" set line=%%i)
if not "%line%"=="" (goto display) else (
echo _________________________________
echo.
echo No record of %input% found
echo _________________________________
echo.
pause
goto begin)
:display
echo _________________________________
echo.
echo %input%:
for /f "skip=%line% delims=" %%i in (词库.txt) do (
echo %%i|findstr "^*$">nul &&goto end||echo %%i
)
:end
echo _________________________________
echo.
pause
goto begin
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-10-12 09:52 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
Originally posted by 3742668 at 2006-10-12 07:25:
纯粹地用批处理来处理本主题的要求的话,搞定了效率就难以搞定词库格式,如果降低词库的要求那么效率又不堪入目。在二者不可得兼的情况下,一 ...
『第 15 楼』这个真有意思~:)
连未来的词库录入原理都做出来了,哈哈……
Last edited by redtek on 2006-10-12 at 09:54 ]
Originally posted by 3742668 at 2006-10-12 07:25:
Purely using batch processing to handle the requirements of this topic, once the efficiency is achieved, the lexicon format is difficult to handle. If the requirements for the lexicon are lowered, then the efficiency is unsatisfactory. In the case where both cannot be achieved, one...
『Building 15』This is really interesting~:)
Even the principle of future lexicon entry has been worked out, haha...
Last edited by redtek on 2006-10-12 at 09:54 ]
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-12 09:53 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
建议做成双向翻译的。不光阴译汉,还能汉译阴。
另外关于20F的代码觉得似乎存在一些瑕疵:
第一个for语句中,建议在%input%后面加上$,否则可能导致搜索结果出错。
for /f "delims=:" %%i in ('findstr /nirc:"^%input%$" 词库.txt') do if not defined line set line=%%i
纸上谈兵而已,均未实践。
It is suggested to make it a bidirectional translation. Not only translate Chinese to English, but also English to Chinese.
In addition, there seem to be some flaws in the code of 20F:
It is suggested to add $ after %input% in the first for statement, otherwise it may lead to incorrect search results.
for /f "delims=:" %%i in ('findstr /nirc:"^%input%$" 词库.txt') do if not defined line set line=%%i
Just armchair theorizing, not practiced yet.
|
|
2006-10-12 11:44 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
Originally posted by 3742668 at 2006-10-12 11:44:
建议做成双向翻译的。不光阴译汉,还能汉译阴。
另外关于20F的代码觉得似乎存在一些瑕疵:
第一个for语句中,建议在%input%后面加上$,否则可能导致搜索结果出错。
应该不会出错的,因为我在do后用if /i "%%j"=="%input%"来完全匹配了。之所以不采用加$的格式,是因为最开始测试的时候加了却没有成功,后来发现,如果最后一行的内容为要查找的%input%的话,则不会检测到单词,应该是findstr正则表达式在匹配最后一行的时候有bug,所以换成了if的格式——虽然加$的方法在这个具体的应用中没什么问题。
至于做成汉译英,这个就有点超高难度了,我甚至有点怀疑CMD能否完成这个任务。如果可以的话,那还得在词库的格式上找到突破点。
Originally posted by 3742668 at 2006-10-12 11:44:
It is suggested to make it bidirectional translation. Not only Chinese to English, but also English to Chinese.
In addition, there seem to be some flaws in the code of 20F:
It is suggested to add $ after %input% in the first for statement, otherwise it may lead to incorrect search results.
It should not be wrong because I used if /i "%%j"=="%input%" after do to match completely. The reason why I didn't use the format of adding $ is that when I tested at the beginning, adding $ didn't succeed. Later, I found that if the content of the last line is the %input% to be searched, the word will not be detected. It should be that there is a bug in the findstr regular expression when matching the last line, so I changed to the if format - although the method of adding $ has no problem in this specific application.
As for making Chinese to English, this is a bit extremely difficult. I even have some doubts whether CMD can complete this task. If it is possible, then we still need to find a breakthrough in the format of the word bank.
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-10-12 12:16 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
如果在词库格式上找突破,
就越来越像是在寻找并重新研究突破一个最适合批处理使用的 纯文本数据库系统 了~:)
If looking for breakthroughs in the dictionary format, it's more and more like looking for and re - researching a plain - text database system most suitable for batch processing~:)
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-12 13:12 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
如果做成汉译英功能,
那么同一文件内的英文单词所对应的中文解释里可能会含有任何中文词汇,
如:“是”、“代表”、“含意”等这些中文词或小到中文的单字,
它们几乎遍及了每一个英文单词的中文翻译内,
findstr整个文件查找一个中文词或中文字所对应的英文,
很可能会找到一大堆不相关的别的单词解释内所含有的相混的内容:)
除非,让英文单词与它的中文解释各占一个文件,
即英文单词库存一个文件,每个单词占一行。
英文单词的中文解释也存一个文件,中文解释必须也仅占一行。
然后,这个英文单词与它的中文解释虽不在同一文件内,但它们必须是相同的行号。
这样,在找到任何一个行号内的中文解释时,或找到任何一个英文词,
只要知道它的行号,就可以 for /f "skip=来直接跳过多少行在另一个文件中直接提取内容。
但是,一个英文可能有多个中文解释,
而这多个中文解释的词汇很可能在多达十万条英文单词的中文解释的内容中产生极大雷同,Findstr很可能一查某个中文词就会找到非常多……
If a Chinese-English translation function is made, then the Chinese explanations corresponding to English words in the same file may contain any Chinese words, such as "is", "represent", "meaning", etc. These Chinese words or even single Chinese characters are almost everywhere in the Chinese translations of every English word. Finding a Chinese word or single Chinese character in the entire file with findstr may very likely find a large number of mixed contents contained in the explanations of other irrelevant words : )
Unless, the English word and its Chinese explanation each occupy one file, that is, the English word inventory is in one file, and each word occupies one line. The Chinese explanation of the English word is also stored in one file, and the Chinese explanation must also occupy only one line. Then, although the English word and its Chinese explanation are not in the same file, they must be in the same line number. Then, when finding any line number's Chinese explanation or finding any English word, as long as you know its line number, you can directly extract the content in the other file by using for /f "skip= to skip how many lines.
However, one English word may have multiple Chinese explanations, and the vocabulary of these multiple Chinese explanations is very likely to have great similarities in the content of up to 100,000 English word Chinese explanations. Findstr is very likely to find a lot when looking up a certain Chinese word...
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-12 13:26 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
做一个小实验:)
============ 实验版中译英/英译中互译 ===============
e.bat
@echo off
echo.
echo =======================================
echo 实验版,只能翻译如下内容:
echo.
echo 中国 美国 日本 计算机
echo china usa japan computer
echo =======================================
echo.
set /p go=[汉译英/英译汉]请输入要翻译的词:
goto :%go%
:china
:中国
echo china : 中国
goto :eof
:usa
:美国
echo usa : 美国
goto :eof
:japan
:日本
echo japan : 日本
goto :eof
:computer
:计算机
echo computer : 计算机
执行过程:
C:\TEMP>e.bat
=======================================
实验版,只能翻译如下内容:
中国 美国 日本 计算机
china usa japan computer
=======================================
[汉译英/英译汉]请输入要翻译的词:美国
usa : 美国
C:\TEMP>e.bat
=======================================
实验版,只能翻译如下内容:
中国 美国 日本 计算机
china usa japan computer
=======================================
[汉译英/英译汉]请输入要翻译的词:china
china : 中国
C:\TEMP>e.bat
=======================================
实验版,只能翻译如下内容:
中国 美国 日本 计算机
china usa japan computer
=======================================
[汉译英/英译汉]请输入要翻译的词:中国
china : 中国
批处理支持中文标签goto(好奇,正好瞎试出来的),
反正:computer标签执行完它后面也没GOTO,
:计算机的标签也会跟着执行,干脆把多个标签放一块!
不管输入的是中文还是英文什么的,
怎么都能让它指正确了:)
这一堆相关连的标签只有遇到goto的时候才能出去,哈哈:)
(权当玩笑,哈哈……)
Last edited by redtek on 2006-10-12 at 14:04 ]
Do a small experiment :)
============ Experimental version of Chinese-English/English-Chinese translation ===============
e.bat
@echo off
echo.
echo =======================================
echo Experimental version, can only translate the following content:
echo.
echo China USA Japan Computer
echo china usa japan computer
echo =======================================
echo.
set /p go=Please enter the word to translate :
goto :%go%
:china
:China
echo china : 中国
goto :eof
:usa
:USA
echo usa : 美国
goto :eof
:japan
:Japan
echo japan : 日本
goto :eof
:computer
:Computer
echo computer : 计算机
Execution process:
C:\TEMP>e.bat
=======================================
Experimental version, can only translate the following content:
China USA Japan Computer
china usa japan computer
=======================================
Please enter the word to translate : USA
usa : 美国
C:\TEMP>e.bat
=======================================
Experimental version, can only translate the following content:
China USA Japan Computer
china usa japan computer
=======================================
Please enter the word to translate : china
china : 中国
C:\TEMP>e.bat
=======================================
Experimental version, can only translate the following content:
China USA Japan Computer
china usa japan computer
=======================================
Please enter the word to translate : China
china : 中国
Batch processing supports Chinese labels for goto (curious, just happened to try it out),
Anyway, after the :computer label is executed, there is no GOTO behind it,
The :Computer label will also execute, so just put multiple labels together!
No matter whether the input is Chinese or English,
How can it point correctly :)
This pile of related labels can only go out when encountering goto, haha :)
(Just for fun, haha...)
Last edited by redtek on 2006-10-12 at 14:04 ]
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-12 13:58 |
|
|
pengfei
银牌会员
    
积分 1218
发帖 485
注册 2006-7-21 来自 湖南.娄底
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
各位的讨论很精彩, 如果进行单词检索, 现实生活中翻字典就是一个非常好的算法.
中文字典就有拼音和笔画查找等.
而英语字典就是按开始的字母一个个的查找其对应的页码. 这样的算法人工查找都非常地快, 如果计算机来完成相信速度一定不错.
The discussions of everyone are very wonderful. If we carry out word retrieval, looking up a dictionary in real life is a very good algorithm.
Chinese dictionaries have methods like looking up by pinyin and stroke count, etc.
And English dictionaries are to look up the corresponding page numbers one by one according to the starting letter. Such an algorithm is very fast for manual lookup. If a computer does it, I believe the speed must be good.
|
|
2006-10-13 01:04 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
于是诞生了DOS版新华字典,哈哈……
Then the DOS version of the Xinhua Dictionary was born, haha...
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-13 01:08 |
|
|
pengfei
银牌会员
    
积分 1218
发帖 485
注册 2006-7-21 来自 湖南.娄底
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
呵呵~ 这里如果把所有的英文单词都做为标签, 速度也不可能太快, 原因搜索这么多的标签也是要一定时间的.
而给单词分类跳过前面的数据从匹配行开始查找, 这样计算前几个字母的相应位置后再搜索, 可能只需要搜索几十几百个单词就会出现你要查找的结果.
Hehe~ If all English words are used as tags here, the speed still can't be too fast. The reason is that searching so many tags also takes some time.
And classifying words and skipping the previous data to start searching from the matching line, in this way, after calculating the corresponding positions of the first few letters, then searching, it may only need to search dozens or hundreds of words to find the result you want.
|
|
2006-10-13 01:13 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
终于找到了一个适合汉译英的词库格式,请看下面的初步代码及格式举例。测试3W行数据依然只是转瞬间的工夫,目前只做出了精确查询模式。因时间关系,来不及仔细测试,各位有时间有兴趣的可以拿来折磨一下自己的机器^_^。
代码:
@echo off
:: 功能:从词库中查询汉语词汇对应的英文
:: 要求词库的格式是:
:: 文件第一行内容必须为空,或者不出现要查找内容的正文
:: 一个段落块的首行必须为纯英文词汇
:: 中文翻译内容另起一行(不允许出现纯字母行),可以有多行
:: 翻译之下可以有举例内容
:: 每个解释前后分别加空格和中文半角状态下的分号,此解释可以在同一行,也可在不同行
:: 解释之下的举例内容尽量避免出现空格和中文半角状态下的分号连用的情况
:: 每个段落块允许使用空行分隔
:begin
cls
set input=
set line=
set /p input=请输入要查找的汉语词汇(要退出请直接回车):
if not defined input exit
for /f "tokens=1* delims=:" %%i in ('findstr /nrc:" %input%;" 词库.txt') do if not "%%j"=="" set /a line=%%i-2&& goto display
echo _________________________________
echo.
echo 没有找到 %input% 的记录
echo _________________________________
echo.
pause
goto begin
:display
echo _________________________________
echo.
echo %input%:
:loop
for /f "skip=%line% delims=" %%i in (词库.txt) do (
echo %%i|findstr "^*$">nul &&(echo %%i&&goto end)||(set /a line=%line%-1&& goto loop)
)
:end
echo _________________________________
echo.
pause
goto begin
格式举例:
(此行为顶行,不允许出现要查找内容的正文)
china
n.
中国; 瓷器;
说明:……
china
DOS
n.
磁盘操作系统;
DOS
优化了代码的算法,使得词库内容的英文单词行不用重复标记,可以使词库的体积得到减少。
Last edited by namejm on 2006-10-13 at 06:31 ]
Finally found a suitable thesaurus format for Chinese-to-English translation. Please see the following initial code and format examples. Testing 30,000 lines of data is still just a matter of moments. Currently, only the exact query mode has been made. Due to time constraints, there is no time to test carefully. Those who have time and interest can take it to torture their own machines ^_^.
Code:
@echo off
:: Function: Query the English corresponding to Chinese words from the thesaurus
:: Requirement: The format of the thesaurus is:
:: The first line of the file must be empty, or the text where the content to be found does not appear
:: The first line of a paragraph block must be a pure English word
:: The Chinese translation content starts a new line (no pure letter line is allowed), and there can be multiple lines
:: Examples can be below the translation
:: Add a space and a Chinese half-width semicolon before and after each explanation respectively. This explanation can be in the same line or in different lines
:: Try to avoid the consecutive use of spaces and Chinese half-width semicolons in the example content below the explanation
:: Empty lines can be used to separate each paragraph block
:begin
cls
set input=
set line=
set /p input=Please enter the Chinese word to be queried (press Enter directly to exit):
if not defined input exit
for /f "tokens=1* delims=:" %%i in ('findstr /nrc:" %input%;" 词库.txt') do if not "%%j"=="" set /a line=%%i-2&& goto display
echo _________________________________
echo.
echo No record of %input% found
echo _________________________________
echo.
pause
goto begin
:display
echo _________________________________
echo.
echo %input%:
:loop
for /f "skip=%line% delims=" %%i in (词库.txt) do (
echo %%i|findstr "^*$">nul &&(echo %%i&&goto end)||(set /a line=%line%-1&& goto loop)
)
:end
echo _________________________________
echo.
pause
goto begin
Format example:
(This line is the top line, and the text where the content to be found is not allowed)
china
n.
中国; 瓷器;
说明:……
china
DOS
n.
磁盘操作系统;
DOS
The algorithm of the code has been optimized, so that the English word lines in the thesaurus content do not need to be repeatedly marked, which can reduce the volume of the thesaurus.
Last edited by namejm on 2006-10-13 at 06:31 ]
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2006-10-13 01:39 |
|
|