Skip to content

📔 教育部《重編國語辭典修訂本》 網路爬蟲 :: A live web crawler for the Chinese-Chinese dictionary published by the Ministry of Education in Taiwan

License

lnishan/ChiChew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChiChew

教育部《重編國語辭典修訂本》 網路爬蟲 (即時資料查詢)
A live web crawler for the Chinese-Chinese dictionary published by the Ministry of Education in Taiwan.

需求 Dependencies

  • Python 3
  • 模組 Modules
    • re
    • requests
    • argparse
    • bs4 (BeautifulSoup 4)
    • urllib

使用方式 Usage

python3 chichew.py [-o output_file] [-s format_string] [list_of_keywords | -f input_file] 

關於格式字串 Regarding Format String (-s):

  • 說明 Description
    • %w:字詞 Word
    • %b:注音 Bopomofo
    • %p:漢語拼音 Pinyin
    • %m:釋義 Meaning
  • 預設 Default: "%w:%m"

使用範例 Sample Usage

> python3 chichew.py 狗 貓 可愛
狗:[名]食肉犬科動物的通稱。種類很多,嗅覺和聽覺都很靈敏,可訓練來追蹤、守衛、導盲、救生或飼為寵物,且性忠誠,為人類之友。姓。如漢代有狗未央。[動]諂媚奉承。如:「底下的人專會狗著他。」
貓:[名]動物名。哺乳綱食肉目。面圓齒銳,耳殼短小,眼大,瞳孔會因光線強弱而變大小,聽視覺都很敏銳,四肢較短,腳有銳爪,掌有肉墊,行動敏捷,善捕鼠。[動]北平方言。指躲藏。如:「他貓起來了,害大夥兒找不著。」
可愛:討人喜愛。《書經.大禹謨》:「可愛非君?可畏非民?」宋.陸游《老學庵筆記.卷四》:「荊棘中有崖石,刻樹石二大字,奇古可愛。」流行語。可憐沒人愛。如:「你說她長得可愛?哼!可憐沒人愛!」
> cat input.txt
狗 貓 可愛
> python3 chichew.py -f input.txt -o output.txt
> cat output.txt
狗:[名]食肉犬科動物的通稱。種類很多,嗅覺和聽覺都很靈敏,可訓練來追蹤、守衛、導盲、救生或飼為寵物,且性忠誠,為人類之友。姓。如漢代有狗未央。[動]諂媚奉承。如:「底下的人專會狗著他。」
貓:[名]動物名。哺乳綱食肉目。面圓齒銳,耳殼短小,眼大,瞳孔會因光線強弱而變大小,聽視覺都很敏銳,四肢較短,腳有銳爪,掌有肉墊,行動敏捷,善捕鼠。[動]北平方言。指躲藏。如:「他貓起來了,害大夥兒找不著。」
可愛:討人喜愛。《書經.大禹謨》:「可愛非君?可畏非民?」宋.陸游《老學庵筆記.卷四》:「荊棘中有崖石,刻樹石二大字,奇古可愛。」流行語。可憐沒人愛。如:「你說她長得可愛?哼!可憐沒人愛!」
> python3 chichew.py -s '%w (%b, %p): %m' 調皮
調皮 (ㄊㄧㄠˊ ㄆㄧˊ, tiáo pí): 頑皮淘氣。如:「調皮的孩子不一定是壞孩子。」狡滑奸詐。元.無名氏《度柳翠.楔子》:「你這和尚,風張風勢,說謊調皮,沒些兒至誠的。」

授權 License

The MIT License (MIT)

Copyright © 2016 Jasmine Chen

教育部公眾授權

《重編國語辭典修訂本》公眾授權使用說明

中華民國教育部(Ministry of Education, R.O.C.)。《重編國語辭典修訂本》(版本編號:2015_20151208)網址:http://dict.revised.moe.edu.tw/

About

📔 教育部《重編國語辭典修訂本》 網路爬蟲 :: A live web crawler for the Chinese-Chinese dictionary published by the Ministry of Education in Taiwan

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages