Dictionary services (for linguistic research) #6
Pinned
MasterInQuestion
started this conversation in
Linguistic
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Various dictionary services and their query parameters.
Covered: English, French, Chinese, Arabic-Persian
First read # English, French ; for technical background.
(primarily Google things and URI/URL)
== English, French ==
Wiktionary:
https://en.wiktionary.org/wiki/Special:Search?ns0=1&search=
; not passing "ns0=1" may cause 1 unnecessary redirect.
Also viable for most MediaWiki services. (Wikipedia etc.)
E.g. https://zh.wikisource.org/wiki/Special:Search?ns0=1&fulltext=1&limit=100&search=-intitle:/%5C/全%5B覽览覧%5D/+
See also: https://www.mediawiki.org/wiki/Help:CirrusSearch#Filters
Google Dictionary:
[ 218.190.230.240 @ CE 2021-05-29 07:04:18 UTC:
https://en.wiktionary.org/?diffonly=0&diff=prev&oldid=62622324
Enjoy it or not, a present for all:
https://www.google.com/search?hl=en&gl=us&num=1&expnd=1&q=define:present
https://www.google.com/search?hl=en&gl=us&num=1&expnd=1&q=define:%22at+present%22
Parameter explanation:
|*| "
hl
": Home Locale|*| "
gl
": Geo-Location|*| "
num
": Number (of results to return)|*| "
expnd
": Expand (the Dictionary interface automatically)|*| "
q
": Query.
In which:
"
%22
" (URI encoded representation of `"
` (Quotation Mark) (U+0022, 0x22, ") ) may be replaced with literal `"
` if viable.[ E.g. https://github.com/orgs/community/discussions/142344#discussion-7355016 ]
"
+
" may be replaced with "%20
" without affecting semantic meaning.Presenting Google Dictionary:
I suspect not many know that Google may be used this way.
=== Further reading ===
[
|*| XML API reference appendices # International Values
|*| https://developers.google.com/custom-search/docs/xml_results_appendices#international-values ]
[
|*| XML API reference
|*| https://developers.google.com/custom-search/docs/xml_results
|*| Note:
[[
How to google guide.
|*| Query Terms: #query-terms
|*| WebSearch Query Parameter Definitions: #websearch-query-parameter-definitions
|*| Special Query Terms: #special-query-terms
]] ] ]
Google Translate:
https://translate.google.com/?hl=en&sl=auto&tl=en&text=
https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=
; the 2nd is for page translation. ("
u
" is URI encoded URL)"
sl
": Source Language"
tl
": To LanguageMerriam-Webster:
https://www.merriam-webster.com/dictionary/
https://www.merriam-webster.com/thesaurus/
; use "
%20
" to represent Space, canonically. ("+
" may work, may not).
Alike: https://github.com/orgs/community/discussions/110250#discussion-6279732
("
_
" won't translate to Space for GitHub repository files)OneLook Dictionary Search:
https://onelook.com/?w=
; "
w
" supports wildcard.E.g. https://onelook.com/?sswo=1&scwo=1&w=p*let
"
sswo
": Search Single Words Only"
scwo
": Search Common Words Only[ Useful for listing words. ]
Etymonline - Online Etymology Dictionary:
https://www.etymonline.com/word/
Centre National de Ressources Textuelles et Lexicales:
https://cnrtl.fr/definition/
== Chinese ==
Baidu Translate:
https://fanyi.baidu.com/mtpe-individual/multimodal?lang=en2zh&query=
https://fanyi.baidu.com/mtpe-individual/multimodal?lang=zh2en&query=
; interesting one.
"
auto
" as lang code before "2
" for auto language detection.Sending no (or invalid) "
lang
" defaults "auto2zh
"; cached settings override.Note this service may use some non-standard lang codes. (e.g. "
per
" instead of "fa
" for Persian)Regardless, seemingly only of interest for Chinese <-> English.
汉语国学字典:
https://www.hanyuguoxue.com/zidian/search?words=
; use "cidian" for words (character sequence).
汉典:
https://www.zdic.net/search/?sclb=tm&q=
[[
"
sclb
": [ 搜查类别? (sōu chá lèi bié) ]|*| 条目:
|*.*| "
tm
": 条目 (全部类别)|*.*| "
zi
": 汉字 (单字)|*.*| "
ci
": 词语 (多字)|*.*| "
cy
": 成语 (特定短语)|*| 字典:
|*.*| "
ids
": (independents) 汉字拆分|*.*| "
py
": 拼音|*.*| "
bis
": 笔顺编号|*.*| "
wb
": 五笔编码|*.*| "
cj
": 仓颉编码|*.*| "
fc
": 四角号码|*.*| "
uno
": Unicode Code PointKeyword search across titles:
https://www.google.com/search?hl=en&gl=cn&num=100&filter=0&q=site:www.zdic.net/hans+intitle:%22字的基本解释%22+
; e.g. "lament"
]]
CTP Dictionary:
https://ctext.org/dictionary.pl?if=en&remap=gb&char=
Chinese Etymology 字源:
https://hanziyuan.net/#
; JS-only.
Require "Referer" header or croaks 404 for queries.
[ ^ https://github.com/MasterInQuestion/talk/discussions/11#discussioncomment-8591289 ]
[ Issue filed: https://github.com/Dixin/Etymology/issues/182 ]
汉字全息资源应用系统:
https://qxk.bnu.edu.cn/
; poorly accessible and ridiculously resource consuming.
[ ^ Primarily bandwidth: 10+ MiB wasted for simple lookup..? ]
Obfuscript based JS-only site.
No typical query parameters. And partly loginwalled.
Brilliant example of counter-productive web.
[ Probably just thoughtlessly designed unintentional? ]
== Arabic-Persian ==
Abadis Dictionary:
https://abadis.ir/fatofa/
; note it expects a trailing "
/
" after the term.(automatic redirect nevertheless; just 1 unnecessary one)
"
-
" is equivalent to Space in this interface. (Arabic-Persian typically won't hyphen between words)"
_
" as Space may auto-redirect to "-
" variant.Caveat the BiDi disorder:
https://github.com/microsoft/vscode/issues/11770#issuecomment-1320735785
"almaany.com" is gated behind broken Cloudflare Turnstile:
https://github.com/webcompat/web-bugs/issues/139311#issuecomment-2266721390
; so haven't examined.
Beta Was this translation helpful? Give feedback.
All reactions