Module:ru-link
Appearance
- The following documentation is located at Module:ru-link/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
Links the lists of words in Appendix:Frequency dictionary of the modern Russian language (the Russian National Corpus)/1 and so on.
local export = {}
local full_link = require 'Module:links'.full_link
local ru = require 'Module:languages'.getByCode 'ru'
-- Just guessing at some of these!
local abbreviations = {
a = 'adjective', advpro = 'adverbial pronoun', anum = 'adjectival numeral',
apro = 'adjectival pronoun', conj = 'conjunction', init = 'initialism',
intj = 'interjection', num = 'numeral', part = 'particle',
pr = 'preposition', s = 'substantive', spro = 'substantival pronoun',
v = 'verb',
}
function export.link_list(frame)
local list = frame.args[1]
list = list:gsub(
'# ([^,]+), ([^\n]+)',
function (word, POS)
return '# ' .. full_link { lang = ru, term = word,
pos = abbreviations[POS] or POS }
end)
return list
end
return export