উইকিঅভিধান bnwiktionary https://bn.wiktionary.org/wiki/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%A7%E0%A6%BE%E0%A6%A8_%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE MediaWiki 1.47.0-wmf.9 case-sensitive মিডিয়া বিশেষ আলাপ ব্যবহারকারী ব্যবহারকারী আলাপ উইকিঅভিধান উইকিঅভিধান আলোচনা চিত্র চিত্র আলোচনা মিডিয়াউইকি মিডিয়াউইকি আলোচনা টেমপ্লেট টেমপ্লেট আলোচনা সাহায্য সাহায্য আলোচনা বিষয়শ্রেণী বিষয়শ্রেণী আলোচনা পরিশিষ্ট পরিশিষ্ট আলোচনা ছন্দ ছন্দ আলোচনা থিসরাস থিসরাস আলোচনা উদ্ধৃতি উদ্ধৃতি আলোচনা TimedText TimedText talk মডিউল মডিউল আলাপ ইভেন্ট ইভেন্ট আলোচনা রসায়ন 0 2783 512375 464152 2026-07-01T04:35:17Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571007-এর সাথে সংযোগ তৈরি করছি 512375 wikitext text/x-wiki {{লে|L1571007|উচ্চারণ= {{আধ্বব|bn|/rɔ.ʃa.jɔn/}} '''ছন্দ''' – র-সা-য়-ন}} ==== সমার্থক ==== কেমিস্ট্রি, রাসায়নিক বিজ্ঞান dxzogg1yntrarhusihskxbr005h33ty পান্না 0 11538 512388 116539 2026-07-01T05:12:29Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1570993-এর সাথে সংযোগ তৈরি করছি 512388 wikitext text/x-wiki {{লে|L1570993|meaning=একটি মুল্যবান ধাতব বা [[রত্ন]] বিশেষ যা সাগরের অতলে পাওয়া যায়।}} 77gm3fkdblc1m4g3pc1bwo61kn8c3bb খণ্ডিত 0 11790 512366 464153 2026-06-30T17:53:26Z Salil Kumar Mukherjee 7406 /* সমার্থক */ 512366 wikitext text/x-wiki == {{ভাষা|bn}} == === উচ্চারণ === {{আধ্বব|bn|/kʰɔn.ɖi.tɔ/}} '''ছন্দ''' – খ-ণ্ডি-ত '''বানান''' – খ-ণ্ডি-ত === ব্যুৎপত্তি === {{com|bn|খণ্ড|ইত}} → সংস্কৃত থেকে "খণ্ড" (part) + "ইত" (suffix for past participle). Meaning "fragmented." === বিশেষণ === খণ্ডিত বা ভগ্ন। === উদাহরণ: === খণ্ডিত মূর্তিটি প্রত্নতাত্ত্বিক গুরুত্বপূর্ণ। ==== সমার্থক ==== [[ভগ্ন]], [[টুকরো]], [[বিচ্ছিন্ন]] ==== বিপরীত ==== সম্পূর্ণ, অখণ্ড === অনুবাদ === ইংরেজি: {{t|en|fragmented}}, {{t|en|broken}} pe3m4dj0bhmacj05wi6vnm7977leccs 512367 512366 2026-06-30T17:54:07Z Salil Kumar Mukherjee 7406 /* বিপরীত */ 512367 wikitext text/x-wiki == {{ভাষা|bn}} == === উচ্চারণ === {{আধ্বব|bn|/kʰɔn.ɖi.tɔ/}} '''ছন্দ''' – খ-ণ্ডি-ত '''বানান''' – খ-ণ্ডি-ত === ব্যুৎপত্তি === {{com|bn|খণ্ড|ইত}} → সংস্কৃত থেকে "খণ্ড" (part) + "ইত" (suffix for past participle). Meaning "fragmented." === বিশেষণ === খণ্ডিত বা ভগ্ন। === উদাহরণ: === খণ্ডিত মূর্তিটি প্রত্নতাত্ত্বিক গুরুত্বপূর্ণ। ==== সমার্থক ==== [[ভগ্ন]], [[টুকরো]], [[বিচ্ছিন্ন]] ==== বিপরীত ==== [[সম্পূর্ণ]], অখণ্ড === অনুবাদ === ইংরেজি: {{t|en|fragmented}}, {{t|en|broken}} t1zr328ipm5wvyg6vf21g6hpgfhrt24 মডিউল:আভিধানিক উপাত্ত 828 50158 512370 512358 2026-07-01T04:28:15Z Redmin 6857 +ta-IPA 512370 Scribunto text/plain local p = {} local i18n = require('মডিউল:আভিধানিক উপাত্ত/i18n') local references = require('মডিউল:উইকিউপাত্ত তথ্যসূত্র বিন্যাসকরণ').format local getArgs = require('Module:Arguments').getArgs local wb = mw.wikibase local ustring = mw.ustring local html = mw.html local mw_lang = mw.language local entity_cache = {} local reference_cache = {} local forms local lang_code local lex_cat local matched_lemma local lang_id local function wrapStringInWikilinks(str) local exceptions = i18n.nolinks local result = str:gsub('(%S+)', function(token) local word, trailing_char = token:match('^(.-)([;,]*)$') local wrapped = word:gsub('[^(-/]+', function(part) if exceptions[part] then return part else return '[[' .. part .. '#' .. i18n['content_lang_name'] .. '|' .. part .. ']]' end end) return wrapped .. trailing_char end) return result end local function serializeTable(val, name, skipnewlines, depth) -- https://stackoverflow.com/a/6081639 skipnewlines = skipnewlines or false depth = depth or 0 local tmp = string.rep(" ", depth) if name then tmp = tmp .. name .. " = " end if type(val) == "table" then tmp = tmp .. "{" .. (not skipnewlines and "\n" or "") for k, v in pairs(val) do tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "") end tmp = tmp .. string.rep(" ", depth) .. "}" elseif type(val) == "number" then tmp = tmp .. tostring(val) elseif type(val) == "string" then tmp = tmp .. string.format("%q", val) elseif type(val) == "boolean" then tmp = tmp .. (val and "true" or "false") else tmp = tmp .. "\"[inserializeable datatype:" .. type(val) .. "]\"" end return tmp end -- Use this to safely expand templates when you are not sure that they exist. local function safeExpand(frame, title, args) local _, result = pcall(function() return frame:expandTemplate{ title = title, args = args } end) if result:find('does not exist') then -- expandTemplate{} doesn't seem to throw any error that can be handled with pcall() so string search is the only viable option. return nil end return result end local function checkTitleCodePointInRange(title, start_point, end_point) return ustring.find( title, '[' ..ustring.char(start_point) .. '-' .. ustring.char(end_point) .. ']' ) end local function getLanguageForCategories( current_page_title ) -- বিশেষ ভাষার জন্য if lang_id == 'Q11051' then -- হিন্দি/উর্দু if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- উর্দু lang_id = 'Q11051ur' elseif checkTitleCodePointInRange(current_page_title, 0x0900, 0x097f) then -- হিন্দি lang_id = 'Q11051hi' end elseif lang_id == 'Q58635' then -- পাঞ্জাবি if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- শাহমুখী lang_id = 'Q58635pnb' elseif checkTitleCodePointInRange(current_page_title, 0x0a00, 0x0a7f) then -- গুরুমুখী lang_id = 'Q58635pa' end elseif lang_id == 'Q56356571' then -- নয়া ফার্সি ভাষা if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- ফার্সি (ইরান/আফগানিস্তান) lang_id = 'Q56356571fa' elseif checkTitleCodePointInRange(current_page_title, 0x0400, 0x04ff) then -- তাজিক lang_id = 'Q56356571tg' end end return lang_id end local function getEntity( id ) if entity_cache[id] == nil then entity_cache[id] = wb.getEntity(id) or error('Invalid ID provided: ' .. id) end return entity_cache[id] ~= false and entity_cache[id] or nil end -- Use this function to get the label of an item even if that item does not have any label in the wiki's content language or English. local function getLabel(id) if id == 'Q11051hi' then return 'হিন্দি' elseif id == 'Q11051ur' then return 'উর্দু' elseif id == 'Q56356571fa' then return 'ফার্সি' elseif id == 'Q56356571tg' then return 'তাজিক' elseif id == 'Q58635pa' or id == 'Q58635pnb' then return 'পাঞ্জাবি' end local label = wb.getLabel(id) if label then return label end local labels = getEntity(id).labels if not labels then return id end for _, v in pairs(labels) do if v and v.value then return v.value end end end local function getReference( id, reference ) local out_id = nil local url_value if reference_cache[id] == nil then local ref_text = references(reference, wb, mw_lang, i18n['content_lang_code'], i18n['wikipedia']) if reference.snaks then if reference.snaks['P248'] then for _, snak in pairs(reference.snaks['P248']) do if snak.datavalue and snak.datavalue.value.id == 'Q428' then -- কুরআন ref_text = ustring.gsub(ref_text, 'নামক অনুচ্ছেদ', 'নং আয়াত') break end end end if reference.snaks['P854'] then local snak = reference.snaks['P854'][1] if snak.datavalue then url_value = snak.datavalue.value end end end if url_value then ref_text = ref_text .. ', [' .. url_value .. ' সংযোগ]' end reference_cache[id] = ref_text else out_id = id end return {out_id, reference_cache[id]} end -- Returns the Wiktionary language code for a lexeme entity or nil, in the latter case, getLemmas() can be relied on to fetch the language code by stripping extraneous bits from the 'language' string as necessary local function getLexemeLanguageCode(lexeme) local lang_item_id = lexeme:getLanguage() local lang_entity = getEntity(lang_item_id) for i, statement_property in ipairs({'P305','P424', 'P220'}) do -- আইইটিএফ ভাষা ট্যাগ, উইকিমিডিয়া ভাষা কোড, আইএসও ৬৩৯-৩ local statements = lang_entity:getBestStatements(statement_property) if statements[1] then local code = statements[1].mainsnak.datavalue.value if code == 'hr' then return 'sh' elseif code == 'pan' then return 'pa' else return code end end end end -- Return the first form of the lexeme which has exactly the given grammatical feature. local function formWithSingleGrammaticalFeature( item_id ) for i = 1, #forms do local grammaticalFeatures = forms[i]:getGrammaticalFeatures() if #grammaticalFeatures == 1 and grammaticalFeatures[1] == item_id then return forms[i] end end return nil end local function getArticleLinkTemplate(frame, stmt_value) local template = '' local sitelink = getEntity(stmt_value):getSitelink(i18n['wikipedia']) if sitelink then template = frame:expandTemplate{ title=i18n['template_wikipedia'], args={sitelink} } end return template end local function getArticleLinks (frame, sense ) local article_links = '' for i, stmt in pairs(sense:getAllStatements('P5137')) do -- এই অর্থের জন্য আইটেম article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end for i, stmt in pairs(sense:getAllStatements('P9970')) do -- এই অর্থের জন্য বিধেয় article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end return article_links end -- @TODO: Generalise local function expandTemplateForProperty(frame, object, property, template) local lemmas = {} local n = 0 for _, stmt in pairs(object:getAllStatements(property)) do local lex = wb.lexeme.splitLexemeId(stmt.mainsnak.datavalue.value.id) if lex then lex = getEntity(lex) n = n + 1 lemmas[n] = lex:getLemma(lang_code) end end if not lang_code or n == 0 then return '' end -- Build args: first lang_code, then lemmas local args = {lang_code} for i = 1, n do args[#args + 1] = lemmas[i] end return frame:expandTemplate{ title = template, args = args } end local function getExternalLinks( entity ) -- T418639 local external_links = {} if entity.claims == nil then return external_links end local formatter_urls = require('মডিউল:আভিধানিক উপাত্ত/urls').formatter_urls for property_id, statements in pairs(entity.claims) do local formatter_url = formatter_urls[property_id] if formatter_url then local property_source = wb.getBestStatements(property_id, 'P9073') local source_name if next(property_source) then source_name = getLabel(property_source[1].mainsnak.datavalue.value.id) or property_source[1].mainsnak.datavalue.value.id else source_name = getLabel(property_id) or property_id end for i = 1, #statements do local stmt = statements[i] if stmt.mainsnak.datavalue then local formatted_link = ustring.gsub( ustring.gsub(formatter_url, '$1', stmt.mainsnak.datavalue.value), ' ', '+' ) table.insert(external_links, '[' .. formatted_link .. ' ' .. source_name .. ']') end end end end return external_links end p.getExternalLinks = getExternalLinks -- রেখে দিন যাতে ডিবাগিং সম্ভব হয় local function heading_level(text, level) return '<h' .. level .. '>' .. ' ' .. text .. ' ' .. '</h' .. level .. '>' end local function termSpan( term ) local text = term[1] local lang = term[2] local dir = mw_lang.new( lang ):getDir() local span = html.create( 'span' ) span:attr( 'lang', lang ) :attr( 'dir', dir ) :wikitext( text ) return tostring( span ) end local function getLemmata( current_lexeme ) local lemma_string = '' for i, rep in pairs(current_lexeme:getLemmas()) do if lemma_string == '' then lemma_string = termSpan(rep) else lemma_string = lemma_string .. '/' .. termSpan(rep) end end return lemma_string end local function getLinkedLemmata(lexeme, frame) local lemma_string = '' local lang for i, rep in pairs(lexeme:getLemmas()) do lang = getLexemeLanguageCode(lexeme) if lang == nil then lang = string.gsub(rep[2], '-%S+', '') end if lemma_string == '' then lemma_string = frame:expandTemplate{title='link', args={lang, rep[1]}} else lemma_string = lemma_string .. '/' .. frame:expandTemplate{title='link', args={lang, rep[1]}} end end return lemma_string end local function getExamples( current_lexeme, sense_id, references_seen ) local examples = html.create('dl') local example_text, example_lang, example_form, example_str for i, stmt in pairs(current_lexeme:getAllStatements('P5831')) do -- ব্যবহারের উদাহরণ if stmt.qualifiers and stmt.qualifiers['P6072'] and stmt.qualifiers['P6072'][1].datavalue.value.id == sense_id then -- বিষয়ে লেক্সিমের অর্থ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_strs = {} if stmt.qualifiers['P1810'] then table.insert(example_form_strs, stmt.qualifiers['P1810'][1].datavalue.value) elseif stmt.qualifiers['P5830'] then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ for _, rep in pairs(example_form:getRepresentations()) do table.insert(example_form_strs, rep[1]) end end for _, example_form_str in pairs(example_form_strs) do local new_example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") if new_example_text ~= example_text then example_str = termSpan({new_example_text, example_lang}) break end example_text = new_example_text end if example_str == nil then example_str = termSpan({example_text, example_lang}) end local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end end for i, stmt in pairs(wb.getAllStatements(sense_id, 'P5831')) do -- ব্যবহারের উদাহরণ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_str = nil if stmt.qualifiers then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ if stmt.qualifiers['P1810'] then example_form_str = stmt.qualifiers['P1810'][1].datavalue.value end end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentation(i18n['content_lang_code']) end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentations()[1][1] end if example_form_str then example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") end example_str = termSpan({example_text, example_lang}) local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end return { tostring(examples) , references_seen } end -- This calls frame:preprocess() instead of :callParserFunction() because the latter does not work for Wikifunctions function calls yet (see https://www.wikifunctions.org/wiki/Wikifunctions:Embedded_function_calls). local function callWikifunctionsFunction(args, frame) return frame:preprocess('{{#function:' .. args .. '}}') end local function getOneStringForProperty(object, property) local val local stmts = object:getAllStatements(property) if #stmts ~= 0 then val = stmts[1].mainsnak.datavalue.value end return val end local function getItemForSense(sense) for k, stmt in pairs(sense:getAllStatements('P5137')) do -- যদি 'এই অর্থের জন্য আইটেম' মানের বাংলা লেবেল থাকে local qid = stmt.mainsnak.datavalue.value.id return qid, getLabel(qid) end end local function getTranslations(frame, senses) if #senses == 0 then return nil end local all_translations = {} local wmlang, item, label for _, sense in pairs(senses) do local translation_set = {} local gloss = sense:getGloss(i18n['content_lang_code']) if lex_cat ~= 'Q34698' then item, label = getItemForSense(sense) end if item then wmlang = require("Module:wikimedia languages") end for _, stmt in pairs(sense:getAllStatements('P5972')) do local translation = stmt.mainsnak.datavalue.value.id local lexeme_id = wb.lexeme.splitLexemeId(translation) local trans_lexeme = getEntity(lexeme_id) local lang_name = getLabel(trans_lexeme:getLanguage()) local trans_code = getLexemeLanguageCode(trans_lexeme) if trans_code then table.insert(translation_set, lang_name .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={trans_code, getLinkedLemmata(trans_lexeme, frame) .. '<br/>'}}) else table.insert(translation_set, lang_name .. ': ' .. getLinkedLemmata(trans_lexeme, frame) .. '<br/>' .. i18n.trans_category(lang_name)) end end if item then for _, v in pairs(getEntity(item).labels) do if string.find(v.language, '-') == nil then -- @TODO: Implement deduplication of translation and get rid of this check local lang = wmlang.getByCode(v.language) local wikt = lang:getWiktionaryLanguage() if wikt:hasType('regular') then table.insert(translation_set, getLabel(wikt:getWikidataItem()) .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={wikt:getCode(), v.value .. '<br/>'}}) end end end end if #translation_set > 0 then local block = frame:expandTemplate{ title = i18n['template_trans-top'], args = { gloss or label } } block = block .. table.concat(translation_set, '\n') .. frame:expandTemplate{ title = i18n['template_trans-bottom'] } table.insert(all_translations, block) end end if #all_translations == 0 then return nil end return heading_level(i18n['heading_translation'], 4) .. ' \n' .. table.concat(all_translations, '\n') end local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. "File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n['edit_wikidata'] .. "|link=https://www.wikidata.org/entity/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n['edit_wikidata'] .. "]]</span>" return icon end local function getMeanings( frame, args, current_lexeme, senses, references_seen, language_name) if #senses == 0 then return {createicon(i18n['content_lang_code'], current_lexeme:getId()) .. "''" .. i18n['text_category_rfdef'] .. "''" .. i18n.tocatlink(i18n['category_rfdef']), references_seen} end local meanings = html.create( 'ol' ) local idlinkset = {} for i, sense in pairs(senses) do local item_label_gloss_parts = {} local gloss_text_parts = {} local main_gloss_text = frame:expandTemplate{ title=i18n['template_anchor'], args={sense:getId()} } local specifiers = {} for k, property_id in ipairs({'P6084', 'P6191', 'P9488'}) do -- অবস্থান যেখানে শব্দার্থ ব্যবহৃত, যে রীতিতে শব্দার্থ ব্যবহৃত হয়, যে ক্ষেত্রে ব্যবহৃত for _, stmt in pairs(sense:getAllStatements(property_id)) do local stmt_value = stmt.mainsnak.datavalue.value.id local reference_text = '' local refs = stmt.references if refs then for j, reference in pairs(refs) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. frame:extensionTag('ref', got_reference[2]) end end local val = getLabel(stmt_value) table.insert(specifiers, val .. reference_text) if property_id == 'P9488' and lang_code ~= nil then table.insert(item_label_gloss_parts, i18n.tocatlink(lang_code .. ':' .. val)) end end end if #specifiers > 0 then main_gloss_text = main_gloss_text .. "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local gloss = sense:getGloss( i18n['content_lang_code'] ) if gloss then main_gloss_text = main_gloss_text .. wrapStringInWikilinks(gloss) if gloss:match('^প্রদত্ত%s*(%S-)%s*নাম$') then -- given names main_gloss_text = main_gloss_text .. i18n.tocatlink(language_name .. ' ' .. i18n['category_given_names']) end else local other_gloss_text = nil local other_gloss_lang = nil local stmt_value, item_label = getItemForSense(sense) if item_label then table.insert(item_label_gloss_parts, '[[:d:' .. stmt_value .. '|' .. item_label .. ']]') end if #item_label_gloss_parts > 0 then other_gloss_text = table.concat(item_label_gloss_parts, '; ') end if other_gloss_text == nil then for _, fallback_lang in ipairs(mw_lang.getFallbacksFor( i18n['content_lang_code'] )) do if sense:getGloss( fallback_lang ) then other_gloss_text, other_gloss_lang = sense:getGloss( fallback_lang ) end end if other_gloss_lang == nil then local glosses = sense:getGlosses() for _, gloss in pairs(glosses) do other_gloss_text = gloss[1] other_gloss_lang = gloss[2] break end end main_gloss_text = main_gloss_text .. other_gloss_text .. "<sup><em>" .. mw_lang.fetchLanguageName(other_gloss_lang, i18n['content_lang_code']) .. "</em></sup>" else main_gloss_text = main_gloss_text .. "''" .. other_gloss_text .. "''" end main_gloss_text = main_gloss_text .. i18n.tocatlink(i18n['category_rfdef_equivalent']) end local synonym = expandTemplateForProperty(frame, sense, 'P5973', i18n['template_synonym']) if synonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. synonym end local antonym = expandTemplateForProperty(frame, sense, 'P5974', i18n['template_antonym']) if antonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. antonym end local hypernym = expandTemplateForProperty(frame, sense, 'P6593', i18n['template_hypernym']) if hypernym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. hypernym end if lex_cat == 'Q1084' or lex_cat == 'Q147276' then -- noun or proper noun local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-noun']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym elseif lex_cat == 'Q34698' then local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-adj']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym end table.insert(gloss_text_parts, main_gloss_text .. createicon(i18n['content_lang_code'], sense:getId())) for _, stmt in pairs(sense:getAllStatements('P8394')) do -- টিপ্পনীর উদ্ধৃতি local gloss_quote = termSpan({stmt.mainsnak.datavalue.value.text, stmt.mainsnak.datavalue.value.language}) if stmt.references[1] then local got_reference = getReference ( stmt.references[1].hash, stmt.references[1] ) gloss_quote = '"' .. gloss_quote .. '" ' .. got_reference[2] end table.insert(references_seen, stmt.references[1].hash) table.insert(gloss_text_parts, frame:extensionTag('ref', gloss_quote)) end for _, stmt in pairs(sense:getAllStatements('P1343')) do -- বর্ণিত উৎস -- TODO: do away with making fake reference objects local fake_reference = { ['snaks'] = {} } fake_reference.snaks['P248'] = { [1] = stmt.mainsnak } local qualifiers_order = stmt['qualifiers-order'] if qualifiers_order then for _, k in ipairs(qualifiers_order) do fake_reference.snaks[k] = stmt.qualifiers[k] end end fake_reference.hash = mw.hash.hashValue('sha3-512', serializeTable(fake_reference)) table.insert(references_seen, fake_reference.hash) local got_reference = getReference(fake_reference.hash, fake_reference) if got_reference[1] == nil then table.insert(gloss_text_parts, frame:extensionTag('ref', got_reference[2], {name = fake_reference.hash})) else table.insert(gloss_text_parts, frame:extensionTag{name = 'ref', content='', args = {name = got_reference[1]}}) end end local first_sense_image = '' local sense_images = sense:getAllStatements('P18') if next(sense_images) then first_sense_image = sense_images[1].mainsnak.datavalue.value end if first_sense_image ~= '' then table.insert(gloss_text_parts, '[[চিত্র:' .. first_sense_image .. "|thumb|'''" .. getLemmata(current_lexeme) .. "'''—" .. main_gloss_text .. ']]') end local idlinks = getExternalLinks(sense) if #idlinks > 0 then local idlinktext = '<small>(' for _, idlink in pairs(idlinks) do idlinktext = idlinktext .. idlink .. '\n' end idlinktext = idlinktext .. ')</small>' table.insert(gloss_text_parts, idlinktext) table.insert(idlinkset, idlinks) end local externallinks = getArticleLinks(frame, sense) if externallinks ~= '' then table.insert(gloss_text_parts, externallinks) end local new_notes = {} local sense_keys = { sense:getId(), string.sub(sense:getId(), string.find(sense:getId(), '-')+1) } for _, v in ipairs(sense_keys) do if args[v] then table.insert(new_notes, args[v]) end end if #new_notes > 0 then for _, v in ipairs(new_notes) do if i == 1 then table.insert(gloss_text_parts, '<br/>' .. v) else table.insert(gloss_text_parts, v) end end end examples, references_seen = unpack(getExamples( current_lexeme, sense:getId(), references_seen )) local gloss_text = table.concat(gloss_text_parts, '\n') meanings:tag('li'):wikitext(gloss_text):wikitext(examples) end return {meanings, references_seen, idlinkset} end local function getPronunciationBaseForm() local base_form = nil -- (!) অন্য ভাষার শব্দের যদি অন্য রকম মূল ফর্ম থাকে সেগুলো এখানে নতুন if বিবৃতি দিয়ে যোগ করা যায়। if lang_code == 'bn' then if lex_cat == 'Q1084' then -- বিশেষ্য base_form = formWithSingleGrammaticalFeature( 'Q131105' ) -- কর্তৃকারক elseif lex_cat == 'Q24905' then -- ক্রিয়া base_form = formWithSingleGrammaticalFeature( 'Q1350145' ) -- ক্রিয়া বিশেষ্য end end if base_form == nil then for i, form in pairs(forms) do base_form = form break end end return base_form end local function getCombines( current_lexeme, frame ) local combines = '' local index_mappings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P5238')) do if stmt.qualifiers and stmt.qualifiers['P1545'] then -- ক্রম local current_index = tonumber(stmt.qualifiers['P1545'][1].datavalue.value) index_mappings[current_index] = stmt end end if #index_mappings ~= 0 then for i, stmt in ipairs(index_mappings) do if stmt.mainsnak.datavalue then local part_lexeme_id = stmt.mainsnak.datavalue.value.id local part_lexeme = getEntity(part_lexeme_id) local current_substring = getLinkedLemmata(part_lexeme, frame) local part_etymology = getEtymology(part_lexeme, frame, 'partial') if part_etymology ~= '' and part_etymology then current_substring = current_substring .. ' (← ' .. part_etymology .. ')' end if combines == '' then combines = current_substring else -- @TODO: This shoukd use the 'affix' and 'compound' templates instead. combines = combines .. ' + ' .. current_substring end end end end return combines end function getRoots( current_lexeme, frame ) local stmts = current_lexeme:getAllStatements('P5920') if #stmts == 0 then return '', '', '' end local root_lexeme = getEntity(stmts[1].mainsnak.datavalue.value.id) return getLexemeLanguageCode(root_lexeme), '√' .. getLinkedLemmata(root_lexeme, frame), root_lexeme:getLemma('ar') end function getEtymology( current_lexeme, frame, mode ) -- @TODO: Fix the etymology chains that are not possible to render local etymology = '' local current_combines = getCombines(current_lexeme, frame) local root_lang, current_roots, root_str = getRoots(current_lexeme, frame) if mode ~= 'partial' and root_str then --frame:expandTemplate{title=i18n['template_root'], args={lang_code, root_lang, root_str}} end local stmts = current_lexeme:getAllStatements('P5191') local new_etymology_string if #stmts == 0 then if current_roots ~= '' and current_combines ~= '' and current_roots then return current_roots .. '<br/>(' .. current_combines .. ')' elseif current_roots ~= '' then if lang_code == 'ar' and mode ~= 'partial' and root_str ~= matched_lemma then return frame:expandTemplate{title=i18n['template_ar-rootbox'], args={root_str}} else return current_roots end else return current_combines end end local origin_lexeme_string for i, stmt in pairs(stmts) do local origin_lexeme_dv = stmt.mainsnak.datavalue -- If this is nil, the origin lexeme is not known. if origin_lexeme_dv then local origin_lexeme = getEntity(origin_lexeme_dv.value.id) local origin_lexeme_lang = getLabel(origin_lexeme:getLanguage()) local sitelink = i18n.wplink(origin_lexeme:getLanguage(), origin_lexeme_lang, wb) if sitelink ~= '' then origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. sitelink .. ')' else origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. origin_lexeme_lang .. ')' end if stmt.qualifiers and stmt.qualifiers['P5886'] then local mode_of_derivation = stmt.qualifiers['P5886'][1].datavalue.value.id if mode_of_derivation == 'Q1345001' then -- @TODO: Add support for showing gender origin_lexeme_string = frame:expandTemplate{title=i18n['template_borrowed'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_borrowing'] elseif mode_of_derivation == 'Q845079' then origin_lexeme_string = ustring.gsub(i18n['etymology_learned_borrowing'], '$1', origin_lexeme_string) elseif mode_of_derivation == 'Q56611986' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_inherited'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_inheritance'] elseif mode_of_derivation == 'Q189743' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_ellipsis'], args={lang_code, getLemmata(origin_lexeme)}} .. ' ' .. i18n['etymology_ellipsis'] end end local origin_origin = getEtymology(origin_lexeme, frame) if origin_origin ~= '' and origin_origin then new_etymology_string = origin_lexeme_string .. ' ← ' .. origin_origin else new_etymology_string = origin_lexeme_string end end if etymology == '' then etymology = new_etymology_string elseif origin_lexeme_string and etymology then etymology = etymology .. ' ' .. origin_lexeme_string elseif origin_lexeme_string and etymology == nil then etymology = origin_lexeme_string end end if current_roots ~= '' and etymology and current_roots then etymology = etymology .. ' ' .. current_roots elseif current_roots ~= '' and etymology == nil then etymology = current_roots end if current_combines ~= '' and etymology then etymology = etymology .. '<br/>(' .. current_combines .. ')' end return etymology end local function pronunciationBlock(block, value) return '* ' .. i18n['text_' .. block] .. ' ' .. value end local function getPronunciation(frame, current_lexeme, lang_name) local pronunciations = {} local base_form = getPronunciationBaseForm() local iast, iso15919_transcription, itrans, xsampa if base_form then for i, stmt in pairs(base_form:getAllStatements('P443')) do -- উচ্চারণের অডিও local pronunciation_file = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন local qual = stmt.qualifiers[property_id] if qual then for _, qual in pairs(qual) do local stmt_value = qual.datavalue.value.id table.insert(specifiers, getLabel(stmt_value)) end end end end if #specifiers > 0 then specifier_text = table.concat(specifiers, "'', ''") end local audio_text if specifier_text ~= '' then audio_text = i18n['text_audio'] .. ' (' .. specifier_text .. ')' else audio_text = i18n['text_audio'] end table.insert(pronunciations, '* ' .. frame:expandTemplate{ title= i18n['template_audio'], args = {lang_name, pronunciation_file, audio_text} }) iso15919_transcription = getOneStringForProperty(base_form, 'P5825') -- আইএসও ১৫৯১৯ প্রতিলিপিকরণ itrans = getOneStringForProperty(base_form, 'P8881') -- ITRANS iast = getOneStringForProperty(base_form, 'P7581') -- আইএএসটি প্রতিলিপিকরণ xsampa = getOneStringForProperty(base_form, 'P2859') end local ipa_transcription = base_form:getAllStatements('P898') -- - আধ্বব প্রতিলিপিকরণ -- @TODO: অডিও ও প্রতিলিপিকরণ দুটোই থাকলে সেই ক্ষেত্রে একটার ঠিক পরেই আরেকটা দেখানো উচিত if #ipa_transcription ~= 0 then for i, stmt in pairs(ipa_transcription) do local ipa_text = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন for l, qual in ipairs(stmt.qualifiers[property_id]) do table.insert(specifiers, getLabel( qual.datavalue.value.id )) end end end if #specifiers > 0 then specifier_text = "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local syllable_count if lang_code == 'tr' then syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z10029|' .. ipa_text, frame) else syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z30837|' .. ipa_text, frame) end table.insert(pronunciations, '* ' .. specifier_text .. frame:expandTemplate{ title= i18n['template_ipa'], args = {lang_name, ipa_text} } .. '\n* ' .. syllable_count) end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. elseif lang_code == 'bn' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='bn-IPA', }) elseif lang_code == 'ar' then local lemma = current_lexeme:getLemma('ar') table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ar-IPA', args={lemma} }) elseif lang_code == 'en' then table.insert(pronunciations, '* ' .. i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z29940|' .. matched_lemma, frame)) elseif lang_code == 'pl' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='pl-IPA', }) elseif lang_code == 'ko' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ko-IPA', }) elseif lang_code == 'fi' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fi-IPA', }) elseif lang_code == 'ta' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ta-IPA', }) elseif lang_code == 'fax' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fax-pron', }) end end -- {{আধ্বব|en|/ˈɪntəvjuː/}} if iso15919_transcription then table.insert(pronunciations, pronunciationBlock('iso15919', iso15919_transcription)) end if itrans then table.insert(pronunciations, pronunciationBlock('itrans', itrans)) end if iast then table.insert(pronunciations, pronunciationBlock('iast', iast)) end if xsampa then table.insert(pronunciations, pronunciationBlock('xsampa', xsampa)) end return table.concat(pronunciations, '\n') end local function getAlternativeSpellings( current_lexeme, frame ) local alt_spellings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P11577')) do -- বিকল্প বানান if stmt.mainsnak.datavalue then table.insert(alt_spellings, '* ' .. getLinkedLemmata(getEntity(stmt.mainsnak.datavalue.value.id), frame)) end end return table.concat(alt_spellings, '\n') end function get_any_notes(sections, args, keys) local notes = {} for i, v in ipairs(keys) do if args[v] then table.insert(notes, args[v]) end end return notes end function add_specific_notes(sections, notes) for i, v in ipairs(notes) do table.insert(sections, v) end end local function add_any_notes(sections, args, keys, heading) for i, v in ipairs(keys) do if args[v] then if heading then table.insert(sections, heading) end table.insert(sections, args[v]) end end end local function getMatchingLemmaForPageTitle(lexeme, title) local lemmas = lexeme:getLemmas() local match for _, lemma_entry in ipairs(lemmas) do local lemma = lemma_entry[1] if lemma == title then match = lemma break end end if match == nil then if lang_code == 'ar' then match = lexeme:getLemma('ar') elseif lang_code == 'rhg' then match = lexeme:getLemma('rhg-arab') elseif lang_id == 'Q11051ur' then match = lexeme:getLemma('ur') elseif lang_code == 'arz' then match = lexeme:getLemma('arz') end end return match end local function buildLanguageAgnosticInflectionTable() local has_image = false local form_images = {} for i, form in ipairs(forms) do local form_image = form:getAllStatements('P7407') if next(form_image) then form_images[i] = form_image[1].mainsnak.datavalue.value has_image = true end end local table_class = "wikitable mw-collapsible sortable" if not has_image then table_class = table_class .. " mw-collapsed" end local text = "{| class='" .. table_class .. "' style='border:solid 1px rgb(80%,80%,100%); text-align:center;'\n" text = text .. "|+ " .. i18n['heading_inflection_table'] .. "\n" text = text .. "|- \n" text = text .. "! " .. i18n['heading_form'] .. " !! " .. i18n['heading_grammatical_features'] if has_image then text = text .. " !! " .. (i18n['heading_image']) end text = text .. " \n" for i, form in ipairs(forms) do local rep = form:getRepresentations() local feat = form:getGrammaticalFeatures() local rep_text = "" for j, r in pairs(rep) do if rep_text == "" then rep_text = r[1] else rep_text = rep_text .. " / " .. r[1] end end local feat_text = "" if feat then for j, f in ipairs(feat) do local label = getLabel(f) or f if feat_text == "" then feat_text = label else feat_text = feat_text .. ", " .. label end end end text = text .. "|-\n" text = text .. "| " .. (rep_text ~= "" and rep_text or "—") text = text .. " || " .. (feat_text ~= "" and feat_text or "—") if has_image then local image_cell = "—" if form_images[i] then image_cell = "[[চিত্র:" .. form_images[i] .. "|50px]]" end text = text .. " || " .. image_cell end text = text .. "\n" end text = text .. "|}" return text end function p.all(frame) local args = getArgs(frame) local lexeme_id = args[1] local current_lexeme = getEntity(lexeme_id) local current_language = current_lexeme:getLanguage() lang_id = current_language local senses = current_lexeme:getSenses() local add_heading = true forms = current_lexeme:getForms() if args[2] then local val = mw.text.trim(tostring(args[2])) if val == "false" or val == "0" or val == "না" then add_heading = false end end local references_seen = {} local sections = {} local title = mw.title.getCurrentTitle().text local lang_category = getLanguageForCategories(title, true) local lang_name = getLabel(lang_category) if add_heading == true then local lang_heading = heading_level(lang_name, 2) table.insert(sections, lang_heading) end lang_code = getLexemeLanguageCode(current_lexeme) matched_lemma = getMatchingLemmaForPageTitle(current_lexeme, title) lex_cat = current_lexeme:getLexicalCategory() local cat = i18n.lang_category(getLabel(lex_cat), lang_name) local lex_cat_template if cat then table.insert(sections, heading_level(getLabel(lex_cat) .. cat .. frame:expandTemplate{ title = i18n['template_anchor'], args = { lexeme_id } }, 3)) table.insert(sections, frame:expandTemplate{ title= i18n['template_lexeme'], args = {lexeme_id} }) add_any_notes(sections, args, i18n['manual_category']) local etymology = getEtymology( current_lexeme, frame ) local ety_added if etymology ~= '' and etymology then table.insert(sections, heading_level(i18n['heading_etymology'], 4)) table.insert(sections, tostring(etymology)) ety_added = true end if ety_added then add_any_notes(sections, args, i18n['manual_etymology']) else add_any_notes(sections, args, i18n['manual_etymology'], heading_level(i18n['heading_etymology'], 4)) end local pronunciation = getPronunciation( frame, current_lexeme, lang_name) local pron_added if pronunciation ~= '' then table.insert(sections, heading_level(i18n['heading_pronunciation'], 4)) table.insert(sections, tostring(pronunciation)) pron_added = true end if pron_added then add_any_notes(sections, args, i18n['manual_pronunciation']) else add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level(i18n['heading_pronunciation'], 4)) end local alternative_spellings = getAlternativeSpellings(current_lexeme, frame) if alternative_spellings ~= '' then table.insert(sections, heading_level(i18n['heading_alternative_spellings'], 4)) table.insert(sections, alternative_spellings) end if lang_code and lang_code ~= 'ksy' and lang_code ~= 'rkt' then -- Skip for Kharia Thar, Rangpuri if lex_cat == 'Q34698' then -- বিশেষণ if lang_code == 'en' or lang_code == 'bn' then if #forms <= 1 then lex_cat_template = frame:expandTemplate{title= lang_code .. '-বিশেষণ'} end else lex_cat_template = safeExpand(frame, lang_code .. '-adj') if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. '-বিশেষণ') end end elseif lex_cat == 'Q1084' then -- @TODO: Also check for plural forms local gender local stmts = current_lexeme:getAllStatements('P5185') -- ব্যাকরণগত লিঙ্গ if #stmts ~= 0 and stmts[1].mainsnak.datavalue then if #stmts == 1 then local gender_qid = stmts[1].mainsnak.datavalue.value.id if gender_qid == 'Q499327' then gender = 'm' elseif gender_qid == 'Q1775415' then gender = 'f' elseif gender_qid == 'Q1775461' then gender = 'n' elseif gender_qid == 'Q1305037' then gender = 'c' end end else for i, stmt in pairs(stmts) do local qid = stmts[i].mainsnak.datavalue if qid then qid = qid.value.id end if qid == 'Q499327' then gender = gender .. 'm' elseif qid == 'Q1775415' then gender = gender .. 'f' end end end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. if current_language == 'Q13955' then if matched_lemma then lex_cat_template = safeExpand(frame, 'ar-noun', {matched_lemma,gender}) else lex_cat_template = frame:expandTemplate{title='ar-noun', args={nil,gender}} end elseif current_language == 'Q29919' then lex_cat_template = frame:expandTemplate{title='arz-noun', args={g=gender}} elseif current_language == 'Q397' then if matched_lemma then lex_cat_template = frame:expandTemplate{title='la-noun', args={matched_lemma,g=gender}} end elseif current_language == 'Q11059' then lex_cat_template = frame:expandTemplate{title='sa-noun', args={g=gender}} elseif current_language ~= 'Q1860' then -- These templates require the gender to be passed as the 1st argument. lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix'], {gender}) if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix_fallback'], {gender}) end end end end -- elseif lex_cat == 'Q147276' then -- lex_cat_template = safeExpand(frame, lang_code .. '-proper noun', {gender}) -- if not lex_cat_template then -- lex_cat_template = safeExpand(frame, lang_code .. '-নামবাচক বিশেষ্য', {gender}) -- end end if lex_cat_template then table.insert(sections, lex_cat_template) else if matched_lemma then table.insert(sections, heading_level(matched_lemma, 4)) else table.insert(sections, i18n.tocatlink(i18n['category_no_matching_lemma'])) end end local meanings, references_seen, sense_extlinks = unpack(getMeanings( frame, args, current_lexeme, senses, references_seen, lang_name)) table.insert(sections, tostring(meanings)) add_any_notes(sections, args, i18n['manual_meaning']) local instance_of = current_lexeme:getAllStatements('P31') -- সত্ত্বার ধরন if #instance_of ~= 0 then local instance_of_entity = instance_of[1].mainsnak.datavalue.value.id if instance_of_entity == 'Q40437546' or instance_of_entity == 'Q120831827' or instance_of_entity == 'Q120717979' or instance_of_entity == 'Q124476844' then -- @TODO: generalise this so all types of roots are shown table.insert(sections, i18n['text_instance_of'] .. ' ' .. getLabel(instance_of_entity)) elseif instance_of_entity == 'Q376431' then -- বর্ণের নাম table.insert(sections, i18n.tocatlink(lang_code .. ':রং')) end end if lex_cat ~= 'Q9788' then local translations = getTranslations(frame, senses) if translations then table.insert(sections, translations) end end -- (!) বিশেষ ভাষার বিভক্তির সারণি যদি থাকে সেগুলো এখানে নতুন if বিবৃতি যোগ করা যায়। if next(forms) then if current_language == 'Q9610' then -- বাংলা if lex_cat == 'Q24905' then local conjTable = require('মডিউল:আভিধানিক উপাত্ত/Q9610').getConjTable(frame, forms) table.insert(sections, conjTable) elseif lex_cat == 'Q1084' then table.insert(sections, callWikifunctionsFunction('Z33243|' .. lexeme_id .. '|', frame)) else if #forms > 1 then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end --elseif current_language == 'Q13955' then -- আরবি -- if lex_cat == 'Q1084' then -- table.insert(sections, frame:expandTemplate{title='ar-decl-noun', args={lemma}}) -- end elseif current_language == 'Q188' and lex_cat == 'Q1084' then -- জার্মান table.insert(sections, callWikifunctionsFunction('Z28602|' .. lexeme_id .. '|', frame)) --elseif current_language == 'Q397' and lex_cat == 'Q1084' then -- লাতিন -- table.insert(sections, callWikifunctionsFunction('Z26333|' .. matched_lemma .. '|', frame)) elseif current_language == 'Q150' and lex_cat == 'Q34698' then -- ফরাসি table.insert(sections, callWikifunctionsFunction('Z36435|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q652' and lex_cat == 'Q34698' then -- ইতালীয় table.insert(sections, callWikifunctionsFunction('Z36407|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q809' or current_language == 'Q9058' or current_language == 'Q6654' or current_language == 'Q9056' then -- পোলীয়, স্লোভাক, ক্রোয়েশীয়, চেক table.insert(sections, callWikifunctionsFunction('Z36421|' .. lexeme_id .. '|', frame)) elseif #forms > 1 and current_language ~= 'Q150' then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end if lex_cat == 'Q134830' then table.insert(sections, frame:expandTemplate{title='prefixsee', args={lang_code}}) elseif lex_cat == 'Q102047' then table.insert(sections, frame:expandTemplate{title='suffixsee', args={lang_code}}) -- elseif lex_cat == 'Q111029' then -- table.insert(sections, frame:expandTemplate{title='rootsee', args={'+', lang_code, matched_lemma}}) end local reference_notes = get_any_notes(sections, args, i18n['manual_reference']) if #references_seen > 0 or #reference_notes > 0 then table.insert(sections, heading_level(i18n['heading_references'], 4)) table.insert(sections, frame:extensionTag('references')) add_specific_notes(sections, reference_notes) end local external_link_table = getExternalLinks ( current_lexeme ) if #external_link_table > 0 then local external_links = '* ' .. table.concat(external_link_table, '\n* ') table.insert(sections, heading_level(i18n['heading_external_links'], 4)) table.insert(sections, external_links) end add_any_notes(sections, args, i18n['manual_external_link']) if #references_seen == 0 and #reference_notes == 0 and sense_extlinks and #sense_extlinks == 0 and #external_link_table == 0 and #get_any_notes(sections, args, i18n['manual_external_link']) == 0 then table.insert(sections, i18n.rfref_category(lang_name)) end return table.concat(sections,"\n\n") end return p dm2vhi4kpmtp8u9vml0k26d7rgohbwr 512381 512370 2026-07-01T04:58:11Z Redmin 6857 512381 Scribunto text/plain local p = {} local i18n = require('মডিউল:আভিধানিক উপাত্ত/i18n') local references = require('মডিউল:উইকিউপাত্ত তথ্যসূত্র বিন্যাসকরণ').format local getArgs = require('Module:Arguments').getArgs local wb = mw.wikibase local ustring = mw.ustring local html = mw.html local mw_lang = mw.language local entity_cache = {} local reference_cache = {} local forms local lang_code local lex_cat local matched_lemma local lang_id local function wrapStringInWikilinks(str) local exceptions = i18n.nolinks local result = str:gsub('(%S+)', function(token) local word, trailing_char = token:match('^(.-)([;,]*)$') local wrapped = word:gsub('[^(-/]+', function(part) if exceptions[part] then return part else return '[[' .. part .. '#' .. i18n['content_lang_name'] .. '|' .. part .. ']]' end end) return wrapped .. trailing_char end) return result end local function serializeTable(val, name, skipnewlines, depth) -- https://stackoverflow.com/a/6081639 skipnewlines = skipnewlines or false depth = depth or 0 local tmp = string.rep(" ", depth) if name then tmp = tmp .. name .. " = " end if type(val) == "table" then tmp = tmp .. "{" .. (not skipnewlines and "\n" or "") for k, v in pairs(val) do tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "") end tmp = tmp .. string.rep(" ", depth) .. "}" elseif type(val) == "number" then tmp = tmp .. tostring(val) elseif type(val) == "string" then tmp = tmp .. string.format("%q", val) elseif type(val) == "boolean" then tmp = tmp .. (val and "true" or "false") else tmp = tmp .. "\"[inserializeable datatype:" .. type(val) .. "]\"" end return tmp end -- Use this to safely expand templates when you are not sure that they exist. local function safeExpand(frame, title, args) local _, result = pcall(function() return frame:expandTemplate{ title = title, args = args } end) if result:find('does not exist') then -- expandTemplate{} doesn't seem to throw any error that can be handled with pcall() so string search is the only viable option. return nil end return result end local function checkTitleCodePointInRange(title, start_point, end_point) return ustring.find( title, '[' ..ustring.char(start_point) .. '-' .. ustring.char(end_point) .. ']' ) end local function getLanguageForCategories( current_page_title ) -- বিশেষ ভাষার জন্য if lang_id == 'Q11051' then -- হিন্দি/উর্দু if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- উর্দু lang_id = 'Q11051ur' elseif checkTitleCodePointInRange(current_page_title, 0x0900, 0x097f) then -- হিন্দি lang_id = 'Q11051hi' end elseif lang_id == 'Q58635' then -- পাঞ্জাবি if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- শাহমুখী lang_id = 'Q58635pnb' elseif checkTitleCodePointInRange(current_page_title, 0x0a00, 0x0a7f) then -- গুরুমুখী lang_id = 'Q58635pa' end elseif lang_id == 'Q56356571' then -- নয়া ফার্সি ভাষা if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- ফার্সি (ইরান/আফগানিস্তান) lang_id = 'Q56356571fa' elseif checkTitleCodePointInRange(current_page_title, 0x0400, 0x04ff) then -- তাজিক lang_id = 'Q56356571tg' end end return lang_id end local function getEntity( id ) if entity_cache[id] == nil then entity_cache[id] = wb.getEntity(id) or error('Invalid ID provided: ' .. id) end return entity_cache[id] ~= false and entity_cache[id] or nil end -- Use this function to get the label of an item even if that item does not have any label in the wiki's content language or English. local function getLabel(id) if id == 'Q11051hi' then return 'হিন্দি' elseif id == 'Q11051ur' then return 'উর্দু' elseif id == 'Q56356571fa' then return 'ফার্সি' elseif id == 'Q56356571tg' then return 'তাজিক' elseif id == 'Q58635pa' or id == 'Q58635pnb' then return 'পাঞ্জাবি' end local label = wb.getLabel(id) if label then return label end local labels = getEntity(id).labels if not labels then return id end for _, v in pairs(labels) do if v and v.value then return v.value end end end local function getReference( id, reference ) local out_id = nil local url_value if reference_cache[id] == nil then local ref_text = references(reference, wb, mw_lang, i18n['content_lang_code'], i18n['wikipedia']) if reference.snaks then if reference.snaks['P248'] then for _, snak in pairs(reference.snaks['P248']) do if snak.datavalue and snak.datavalue.value.id == 'Q428' then -- কুরআন ref_text = ustring.gsub(ref_text, 'নামক অনুচ্ছেদ', 'নং আয়াত') break end end end if reference.snaks['P854'] then local snak = reference.snaks['P854'][1] if snak.datavalue then url_value = snak.datavalue.value end end end if url_value then ref_text = ref_text .. ', [' .. url_value .. ' সংযোগ]' end reference_cache[id] = ref_text else out_id = id end return {out_id, reference_cache[id]} end -- Returns the Wiktionary language code for a lexeme entity or nil, in the latter case, getLemmas() can be relied on to fetch the language code by stripping extraneous bits from the 'language' string as necessary local function getLexemeLanguageCode(lexeme) local lang_item_id = lexeme:getLanguage() local lang_entity = getEntity(lang_item_id) for i, statement_property in ipairs({'P305','P424', 'P220'}) do -- আইইটিএফ ভাষা ট্যাগ, উইকিমিডিয়া ভাষা কোড, আইএসও ৬৩৯-৩ local statements = lang_entity:getBestStatements(statement_property) if statements[1] then local code = statements[1].mainsnak.datavalue.value if code == 'hr' then return 'sh' elseif code == 'pan' then return 'pa' else return code end end end end -- Return the first form of the lexeme which has exactly the given grammatical feature. local function formWithSingleGrammaticalFeature( item_id ) for i = 1, #forms do local grammaticalFeatures = forms[i]:getGrammaticalFeatures() if #grammaticalFeatures == 1 and grammaticalFeatures[1] == item_id then return forms[i] end end return nil end local function getArticleLinkTemplate(frame, stmt_value) local template = '' local sitelink = getEntity(stmt_value):getSitelink(i18n['wikipedia']) if sitelink then template = frame:expandTemplate{ title=i18n['template_wikipedia'], args={sitelink} } end return template end local function getArticleLinks (frame, sense ) local article_links = '' for i, stmt in pairs(sense:getAllStatements('P5137')) do -- এই অর্থের জন্য আইটেম article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end for i, stmt in pairs(sense:getAllStatements('P9970')) do -- এই অর্থের জন্য বিধেয় article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end return article_links end -- @TODO: Generalise local function expandTemplateForProperty(frame, object, property, template) local lemmas = {} local n = 0 for _, stmt in pairs(object:getAllStatements(property)) do local lex = wb.lexeme.splitLexemeId(stmt.mainsnak.datavalue.value.id) if lex then lex = getEntity(lex) n = n + 1 lemmas[n] = lex:getLemma(lang_code) end end if not lang_code or n == 0 then return '' end -- Build args: first lang_code, then lemmas local args = {lang_code} for i = 1, n do args[#args + 1] = lemmas[i] end return frame:expandTemplate{ title = template, args = args } end local function getExternalLinks( entity ) -- T418639 local external_links = {} if entity.claims == nil then return external_links end local formatter_urls = require('মডিউল:আভিধানিক উপাত্ত/urls').formatter_urls for property_id, statements in pairs(entity.claims) do local formatter_url = formatter_urls[property_id] if formatter_url then local property_source = wb.getBestStatements(property_id, 'P9073') local source_name if next(property_source) then source_name = getLabel(property_source[1].mainsnak.datavalue.value.id) or property_source[1].mainsnak.datavalue.value.id else source_name = getLabel(property_id) or property_id end for i = 1, #statements do local stmt = statements[i] if stmt.mainsnak.datavalue then local formatted_link = ustring.gsub( ustring.gsub(formatter_url, '$1', stmt.mainsnak.datavalue.value), ' ', '+' ) table.insert(external_links, '[' .. formatted_link .. ' ' .. source_name .. ']') end end end end return external_links end p.getExternalLinks = getExternalLinks -- রেখে দিন যাতে ডিবাগিং সম্ভব হয় local function heading_level(text, level) return '<h' .. level .. '>' .. ' ' .. text .. ' ' .. '</h' .. level .. '>' end local function termSpan( term ) local text = term[1] local lang = term[2] local dir = mw_lang.new( lang ):getDir() local span = html.create( 'span' ) span:attr( 'lang', lang ) :attr( 'dir', dir ) :wikitext( text ) return tostring( span ) end local function getLemmata( current_lexeme ) local lemma_string = '' for i, rep in pairs(current_lexeme:getLemmas()) do if lemma_string == '' then lemma_string = termSpan(rep) else lemma_string = lemma_string .. '/' .. termSpan(rep) end end return lemma_string end local function getLinkedLemmata(lexeme, frame) local lemma_string = '' local lang for i, rep in pairs(lexeme:getLemmas()) do lang = getLexemeLanguageCode(lexeme) if lang == nil then lang = string.gsub(rep[2], '-%S+', '') end if lemma_string == '' then lemma_string = frame:expandTemplate{title='link', args={lang, rep[1]}} else lemma_string = lemma_string .. '/' .. frame:expandTemplate{title='link', args={lang, rep[1]}} end end return lemma_string end local function getExamples( current_lexeme, sense_id, references_seen ) local examples = html.create('dl') local example_text, example_lang, example_form, example_str for i, stmt in pairs(current_lexeme:getAllStatements('P5831')) do -- ব্যবহারের উদাহরণ if stmt.qualifiers and stmt.qualifiers['P6072'] and stmt.qualifiers['P6072'][1].datavalue.value.id == sense_id then -- বিষয়ে লেক্সিমের অর্থ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_strs = {} if stmt.qualifiers['P1810'] then table.insert(example_form_strs, stmt.qualifiers['P1810'][1].datavalue.value) elseif stmt.qualifiers['P5830'] then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ for _, rep in pairs(example_form:getRepresentations()) do table.insert(example_form_strs, rep[1]) end end for _, example_form_str in pairs(example_form_strs) do local new_example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") if new_example_text ~= example_text then example_str = termSpan({new_example_text, example_lang}) break end example_text = new_example_text end if example_str == nil then example_str = termSpan({example_text, example_lang}) end local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end end for i, stmt in pairs(wb.getAllStatements(sense_id, 'P5831')) do -- ব্যবহারের উদাহরণ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_str = nil if stmt.qualifiers then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ if stmt.qualifiers['P1810'] then example_form_str = stmt.qualifiers['P1810'][1].datavalue.value end end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentation(i18n['content_lang_code']) end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentations()[1][1] end if example_form_str then example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") end example_str = termSpan({example_text, example_lang}) local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end return { tostring(examples) , references_seen } end -- This calls frame:preprocess() instead of :callParserFunction() because the latter does not work for Wikifunctions function calls yet (see https://www.wikifunctions.org/wiki/Wikifunctions:Embedded_function_calls). local function callWikifunctionsFunction(args, frame) return frame:preprocess('{{#function:' .. args .. '}}') end local function getOneStringForProperty(object, property) local val local stmts = object:getAllStatements(property) if #stmts ~= 0 then val = stmts[1].mainsnak.datavalue.value end return val end local function getItemForSense(sense) for k, stmt in pairs(sense:getAllStatements('P5137')) do -- যদি 'এই অর্থের জন্য আইটেম' মানের বাংলা লেবেল থাকে local qid = stmt.mainsnak.datavalue.value.id return qid, getLabel(qid) end end local function getTranslations(frame, senses) if #senses == 0 then return nil end local all_translations = {} local wmlang, item, label for _, sense in pairs(senses) do local translation_set = {} local gloss = sense:getGloss(i18n['content_lang_code']) if lex_cat ~= 'Q34698' then item, label = getItemForSense(sense) end if item then wmlang = require("Module:wikimedia languages") end for _, stmt in pairs(sense:getAllStatements('P5972')) do local translation = stmt.mainsnak.datavalue.value.id local lexeme_id = wb.lexeme.splitLexemeId(translation) local trans_lexeme = getEntity(lexeme_id) local lang_name = getLabel(trans_lexeme:getLanguage()) local trans_code = getLexemeLanguageCode(trans_lexeme) if trans_code then table.insert(translation_set, lang_name .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={trans_code, getLinkedLemmata(trans_lexeme, frame) .. '<br/>'}}) else table.insert(translation_set, lang_name .. ': ' .. getLinkedLemmata(trans_lexeme, frame) .. '<br/>' .. i18n.trans_category(lang_name)) end end if item then for _, v in pairs(getEntity(item).labels) do if string.find(v.language, '-') == nil then -- @TODO: Implement deduplication of translation and get rid of this check local lang = wmlang.getByCode(v.language) local wikt = lang:getWiktionaryLanguage() if wikt:hasType('regular') then table.insert(translation_set, getLabel(wikt:getWikidataItem()) .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={wikt:getCode(), v.value .. '<br/>'}}) end end end end if #translation_set > 0 then local block = frame:expandTemplate{ title = i18n['template_trans-top'], args = { gloss or label } } block = block .. table.concat(translation_set, '\n') .. frame:expandTemplate{ title = i18n['template_trans-bottom'] } table.insert(all_translations, block) end end if #all_translations == 0 then return nil end return heading_level(i18n['heading_translation'], 4) .. ' \n' .. table.concat(all_translations, '\n') end local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. "File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n['edit_wikidata'] .. "|link=https://www.wikidata.org/entity/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n['edit_wikidata'] .. "]]</span>" return icon end local function getMeanings( frame, args, current_lexeme, senses, references_seen, language_name) if #senses == 0 then return {createicon(i18n['content_lang_code'], current_lexeme:getId()) .. "''" .. i18n['text_category_rfdef'] .. "''" .. i18n.tocatlink(i18n['category_rfdef']), references_seen} end local meanings = html.create( 'ol' ) local idlinkset = {} for i, sense in pairs(senses) do local item_label_gloss_parts = {} local gloss_text_parts = {} local main_gloss_text = frame:expandTemplate{ title=i18n['template_anchor'], args={sense:getId()} } local specifiers = {} for k, property_id in ipairs({'P6084', 'P6191', 'P9488'}) do -- অবস্থান যেখানে শব্দার্থ ব্যবহৃত, যে রীতিতে শব্দার্থ ব্যবহৃত হয়, যে ক্ষেত্রে ব্যবহৃত for _, stmt in pairs(sense:getAllStatements(property_id)) do local stmt_value = stmt.mainsnak.datavalue.value.id local reference_text = '' local refs = stmt.references if refs then for j, reference in pairs(refs) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. frame:extensionTag('ref', got_reference[2]) end end local val = getLabel(stmt_value) table.insert(specifiers, val .. reference_text) if property_id == 'P9488' and lang_code ~= nil then table.insert(item_label_gloss_parts, i18n.tocatlink(lang_code .. ':' .. val)) end end end if #specifiers > 0 then main_gloss_text = main_gloss_text .. "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local gloss = sense:getGloss( i18n['content_lang_code'] ) if gloss then main_gloss_text = main_gloss_text .. wrapStringInWikilinks(gloss) if gloss:match('^প্রদত্ত%s*(%S-)%s*নাম$') then -- given names main_gloss_text = main_gloss_text .. i18n.tocatlink(language_name .. ' ' .. i18n['category_given_names']) end else local other_gloss_text = nil local other_gloss_lang = nil local stmt_value, item_label = getItemForSense(sense) if item_label then table.insert(item_label_gloss_parts, '[[:d:' .. stmt_value .. '|' .. item_label .. ']]') end if #item_label_gloss_parts > 0 then other_gloss_text = table.concat(item_label_gloss_parts, '; ') end if other_gloss_text == nil then for _, fallback_lang in ipairs(mw_lang.getFallbacksFor( i18n['content_lang_code'] )) do if sense:getGloss( fallback_lang ) then other_gloss_text, other_gloss_lang = sense:getGloss( fallback_lang ) end end if other_gloss_lang == nil then local glosses = sense:getGlosses() for _, gloss in pairs(glosses) do other_gloss_text = gloss[1] other_gloss_lang = gloss[2] break end end main_gloss_text = main_gloss_text .. other_gloss_text .. "<sup><em>" .. mw_lang.fetchLanguageName(other_gloss_lang, i18n['content_lang_code']) .. "</em></sup>" else main_gloss_text = main_gloss_text .. "''" .. other_gloss_text .. "''" end main_gloss_text = main_gloss_text .. i18n.tocatlink(i18n['category_rfdef_equivalent']) end local synonym = expandTemplateForProperty(frame, sense, 'P5973', i18n['template_synonym']) if synonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. synonym end local antonym = expandTemplateForProperty(frame, sense, 'P5974', i18n['template_antonym']) if antonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. antonym end local hypernym = expandTemplateForProperty(frame, sense, 'P6593', i18n['template_hypernym']) if hypernym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. hypernym end if lex_cat == 'Q1084' or lex_cat == 'Q147276' then -- noun or proper noun local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-noun']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym elseif lex_cat == 'Q34698' then local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-adj']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym end table.insert(gloss_text_parts, main_gloss_text .. createicon(i18n['content_lang_code'], sense:getId())) for _, stmt in pairs(sense:getAllStatements('P8394')) do -- টিপ্পনীর উদ্ধৃতি local gloss_quote = termSpan({stmt.mainsnak.datavalue.value.text, stmt.mainsnak.datavalue.value.language}) if stmt.references[1] then local got_reference = getReference ( stmt.references[1].hash, stmt.references[1] ) gloss_quote = '"' .. gloss_quote .. '" ' .. got_reference[2] end table.insert(references_seen, stmt.references[1].hash) table.insert(gloss_text_parts, frame:extensionTag('ref', gloss_quote)) end for _, stmt in pairs(sense:getAllStatements('P1343')) do -- বর্ণিত উৎস -- TODO: do away with making fake reference objects local fake_reference = { ['snaks'] = {} } fake_reference.snaks['P248'] = { [1] = stmt.mainsnak } local qualifiers_order = stmt['qualifiers-order'] if qualifiers_order then for _, k in ipairs(qualifiers_order) do fake_reference.snaks[k] = stmt.qualifiers[k] end end fake_reference.hash = mw.hash.hashValue('sha3-512', serializeTable(fake_reference)) table.insert(references_seen, fake_reference.hash) local got_reference = getReference(fake_reference.hash, fake_reference) if got_reference[1] == nil then table.insert(gloss_text_parts, frame:extensionTag('ref', got_reference[2], {name = fake_reference.hash})) else table.insert(gloss_text_parts, frame:extensionTag{name = 'ref', content='', args = {name = got_reference[1]}}) end end local first_sense_image = '' local sense_images = sense:getAllStatements('P18') if next(sense_images) then first_sense_image = sense_images[1].mainsnak.datavalue.value end if first_sense_image ~= '' then table.insert(gloss_text_parts, '[[চিত্র:' .. first_sense_image .. "|thumb|'''" .. getLemmata(current_lexeme) .. "'''—" .. main_gloss_text .. ']]') end local idlinks = getExternalLinks(sense) if #idlinks > 0 then local idlinktext = '<small>(' for _, idlink in pairs(idlinks) do idlinktext = idlinktext .. idlink .. '\n' end idlinktext = idlinktext .. ')</small>' table.insert(gloss_text_parts, idlinktext) table.insert(idlinkset, idlinks) end local externallinks = getArticleLinks(frame, sense) if externallinks ~= '' then table.insert(gloss_text_parts, externallinks) end local new_notes = {} local sense_keys = { sense:getId(), string.sub(sense:getId(), string.find(sense:getId(), '-')+1) } for _, v in ipairs(sense_keys) do if args[v] then table.insert(new_notes, args[v]) end end if #new_notes > 0 then for _, v in ipairs(new_notes) do if i == 1 then table.insert(gloss_text_parts, '<br/>' .. v) else table.insert(gloss_text_parts, v) end end end examples, references_seen = unpack(getExamples( current_lexeme, sense:getId(), references_seen )) local gloss_text = table.concat(gloss_text_parts, '\n') meanings:tag('li'):wikitext(gloss_text):wikitext(examples) end return {meanings, references_seen, idlinkset} end local function getPronunciationBaseForm() local base_form = nil -- (!) অন্য ভাষার শব্দের যদি অন্য রকম মূল ফর্ম থাকে সেগুলো এখানে নতুন if বিবৃতি দিয়ে যোগ করা যায়। if lang_code == 'bn' then if lex_cat == 'Q1084' then -- বিশেষ্য base_form = formWithSingleGrammaticalFeature( 'Q131105' ) -- কর্তৃকারক elseif lex_cat == 'Q24905' then -- ক্রিয়া base_form = formWithSingleGrammaticalFeature( 'Q1350145' ) -- ক্রিয়া বিশেষ্য end end if base_form == nil then for i, form in pairs(forms) do base_form = form break end end return base_form end local function getCombines( current_lexeme, frame ) local combines = '' local index_mappings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P5238')) do if stmt.qualifiers and stmt.qualifiers['P1545'] then -- ক্রম local current_index = tonumber(stmt.qualifiers['P1545'][1].datavalue.value) index_mappings[current_index] = stmt end end if #index_mappings ~= 0 then for i, stmt in ipairs(index_mappings) do if stmt.mainsnak.datavalue then local part_lexeme_id = stmt.mainsnak.datavalue.value.id local part_lexeme = getEntity(part_lexeme_id) local current_substring = getLinkedLemmata(part_lexeme, frame) local part_etymology = getEtymology(part_lexeme, frame, 'partial') if part_etymology ~= '' and part_etymology then current_substring = current_substring .. ' (← ' .. part_etymology .. ')' end if combines == '' then combines = current_substring else -- @TODO: This shoukd use the 'affix' and 'compound' templates instead. combines = combines .. ' + ' .. current_substring end end end end return combines end function getRoots( current_lexeme, frame ) local stmts = current_lexeme:getAllStatements('P5920') if #stmts == 0 then return '', '', '' end local root_lexeme = getEntity(stmts[1].mainsnak.datavalue.value.id) return getLexemeLanguageCode(root_lexeme), '√' .. getLinkedLemmata(root_lexeme, frame), root_lexeme:getLemma('ar') end function getEtymology( current_lexeme, frame, mode ) -- @TODO: Fix the etymology chains that are not possible to render local etymology = '' local current_combines = getCombines(current_lexeme, frame) local root_lang, current_roots, root_str = getRoots(current_lexeme, frame) if mode ~= 'partial' and root_str then --frame:expandTemplate{title=i18n['template_root'], args={lang_code, root_lang, root_str}} end local stmts = current_lexeme:getAllStatements('P5191') local new_etymology_string if #stmts == 0 then if current_roots ~= '' and current_combines ~= '' and current_roots then return current_roots .. '<br/>(' .. current_combines .. ')' elseif current_roots ~= '' then if lang_code == 'ar' and mode ~= 'partial' and root_str ~= matched_lemma then return frame:expandTemplate{title=i18n['template_ar-rootbox'], args={root_str}} else return current_roots end else return current_combines end end local origin_lexeme_string for i, stmt in pairs(stmts) do local origin_lexeme_dv = stmt.mainsnak.datavalue -- If this is nil, the origin lexeme is not known. if origin_lexeme_dv then local origin_lexeme = getEntity(origin_lexeme_dv.value.id) local origin_lexeme_lang = getLabel(origin_lexeme:getLanguage()) local sitelink = i18n.wplink(origin_lexeme:getLanguage(), origin_lexeme_lang, wb) if sitelink ~= '' then origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. sitelink .. ')' else origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. origin_lexeme_lang .. ')' end if stmt.qualifiers and stmt.qualifiers['P5886'] then local mode_of_derivation = stmt.qualifiers['P5886'][1].datavalue.value.id if mode_of_derivation == 'Q1345001' then -- @TODO: Add support for showing gender origin_lexeme_string = frame:expandTemplate{title=i18n['template_borrowed'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_borrowing'] elseif mode_of_derivation == 'Q845079' then origin_lexeme_string = ustring.gsub(i18n['etymology_learned_borrowing'], '$1', origin_lexeme_string) elseif mode_of_derivation == 'Q56611986' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_inherited'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_inheritance'] elseif mode_of_derivation == 'Q189743' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_ellipsis'], args={lang_code, getLemmata(origin_lexeme)}} .. ' ' .. i18n['etymology_ellipsis'] end end local origin_origin = getEtymology(origin_lexeme, frame) if origin_origin ~= '' and origin_origin then new_etymology_string = origin_lexeme_string .. ' ← ' .. origin_origin else new_etymology_string = origin_lexeme_string end end if etymology == '' then etymology = new_etymology_string elseif origin_lexeme_string and etymology then etymology = etymology .. ' ' .. origin_lexeme_string elseif origin_lexeme_string and etymology == nil then etymology = origin_lexeme_string end end if current_roots ~= '' and etymology and current_roots then etymology = etymology .. ' ' .. current_roots elseif current_roots ~= '' and etymology == nil then etymology = current_roots end if current_combines ~= '' and etymology then etymology = etymology .. '<br/>(' .. current_combines .. ')' end return etymology end local function pronunciationBlock(block, value) return '* ' .. i18n['text_' .. block] .. ' ' .. value end local function getPronunciation(frame, current_lexeme, lang_name) local pronunciations = {} local base_form = getPronunciationBaseForm() local iast, iso15919_transcription, itrans, xsampa if base_form then for i, stmt in pairs(base_form:getAllStatements('P443')) do -- উচ্চারণের অডিও local pronunciation_file = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন local qual = stmt.qualifiers[property_id] if qual then for _, qual in pairs(qual) do local stmt_value = qual.datavalue.value.id table.insert(specifiers, getLabel(stmt_value)) end end end end if #specifiers > 0 then specifier_text = table.concat(specifiers, "'', ''") end local audio_text if specifier_text ~= '' then audio_text = i18n['text_audio'] .. ' (' .. specifier_text .. ')' else audio_text = i18n['text_audio'] end table.insert(pronunciations, '* ' .. frame:expandTemplate{ title= i18n['template_audio'], args = {lang_name, pronunciation_file, audio_text} }) iso15919_transcription = getOneStringForProperty(base_form, 'P5825') -- আইএসও ১৫৯১৯ প্রতিলিপিকরণ itrans = getOneStringForProperty(base_form, 'P8881') -- ITRANS iast = getOneStringForProperty(base_form, 'P7581') -- আইএএসটি প্রতিলিপিকরণ xsampa = getOneStringForProperty(base_form, 'P2859') end local ipa_transcription = base_form:getAllStatements('P898') -- - আধ্বব প্রতিলিপিকরণ -- @TODO: অডিও ও প্রতিলিপিকরণ দুটোই থাকলে সেই ক্ষেত্রে একটার ঠিক পরেই আরেকটা দেখানো উচিত if #ipa_transcription ~= 0 then for i, stmt in pairs(ipa_transcription) do local ipa_text = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন for l, qual in ipairs(stmt.qualifiers[property_id]) do table.insert(specifiers, getLabel( qual.datavalue.value.id )) end end end if #specifiers > 0 then specifier_text = "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local syllable_count if lang_code == 'tr' then syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z10029|' .. ipa_text, frame) else syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z30837|' .. ipa_text, frame) end table.insert(pronunciations, '* ' .. specifier_text .. frame:expandTemplate{ title= i18n['template_ipa'], args = {lang_name, ipa_text} } .. '\n* ' .. syllable_count) end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. elseif lang_code == 'bn' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='bn-IPA', }) elseif lang_code == 'ar' then local lemma = current_lexeme:getLemma('ar') table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ar-IPA', args={lemma} }) elseif lang_code == 'en' then table.insert(pronunciations, '* ' .. i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z29940|' .. matched_lemma, frame)) elseif lang_code == 'pl' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='pl-IPA', }) elseif lang_code == 'ko' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ko-IPA', }) elseif lang_code == 'fi' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fi-IPA', }) elseif lang_code == 'ta' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ta-IPA', }) elseif lang_code == 'fax' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fax-pron', }) end end -- {{আধ্বব|en|/ˈɪntəvjuː/}} if iso15919_transcription then table.insert(pronunciations, pronunciationBlock('iso15919', iso15919_transcription)) end if itrans then table.insert(pronunciations, pronunciationBlock('itrans', itrans)) end if iast then table.insert(pronunciations, pronunciationBlock('iast', iast)) end if xsampa then table.insert(pronunciations, pronunciationBlock('xsampa', xsampa)) end return table.concat(pronunciations, '\n') end local function getAlternativeSpellings( current_lexeme, frame ) local alt_spellings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P11577')) do -- বিকল্প বানান if stmt.mainsnak.datavalue then table.insert(alt_spellings, '* ' .. frame:expandTemplate{title=i18n['template_alter'], args={lang_code, getLemmata(getEntity(stmt.mainsnak.datavalue.value.id), frame)}}) end end return table.concat(alt_spellings, '\n') end function get_any_notes(sections, args, keys) local notes = {} for i, v in ipairs(keys) do if args[v] then table.insert(notes, args[v]) end end return notes end function add_specific_notes(sections, notes) for i, v in ipairs(notes) do table.insert(sections, v) end end local function add_any_notes(sections, args, keys, heading) for i, v in ipairs(keys) do if args[v] then if heading then table.insert(sections, heading) end table.insert(sections, args[v]) end end end local function getMatchingLemmaForPageTitle(lexeme, title) local lemmas = lexeme:getLemmas() local match for _, lemma_entry in ipairs(lemmas) do local lemma = lemma_entry[1] if lemma == title then match = lemma break end end if match == nil then if lang_code == 'ar' then match = lexeme:getLemma('ar') elseif lang_code == 'rhg' then match = lexeme:getLemma('rhg-arab') elseif lang_id == 'Q11051ur' then match = lexeme:getLemma('ur') elseif lang_code == 'arz' then match = lexeme:getLemma('arz') end end return match end local function buildLanguageAgnosticInflectionTable() local has_image = false local form_images = {} for i, form in ipairs(forms) do local form_image = form:getAllStatements('P7407') if next(form_image) then form_images[i] = form_image[1].mainsnak.datavalue.value has_image = true end end local table_class = "wikitable mw-collapsible sortable" if not has_image then table_class = table_class .. " mw-collapsed" end local text = "{| class='" .. table_class .. "' style='border:solid 1px rgb(80%,80%,100%); text-align:center;'\n" text = text .. "|+ " .. i18n['heading_inflection_table'] .. "\n" text = text .. "|- \n" text = text .. "! " .. i18n['heading_form'] .. " !! " .. i18n['heading_grammatical_features'] if has_image then text = text .. " !! " .. (i18n['heading_image']) end text = text .. " \n" for i, form in ipairs(forms) do local rep = form:getRepresentations() local feat = form:getGrammaticalFeatures() local rep_text = "" for j, r in pairs(rep) do if rep_text == "" then rep_text = r[1] else rep_text = rep_text .. " / " .. r[1] end end local feat_text = "" if feat then for j, f in ipairs(feat) do local label = getLabel(f) or f if feat_text == "" then feat_text = label else feat_text = feat_text .. ", " .. label end end end text = text .. "|-\n" text = text .. "| " .. (rep_text ~= "" and rep_text or "—") text = text .. " || " .. (feat_text ~= "" and feat_text or "—") if has_image then local image_cell = "—" if form_images[i] then image_cell = "[[চিত্র:" .. form_images[i] .. "|50px]]" end text = text .. " || " .. image_cell end text = text .. "\n" end text = text .. "|}" return text end function p.all(frame) local args = getArgs(frame) local lexeme_id = args[1] local current_lexeme = getEntity(lexeme_id) local current_language = current_lexeme:getLanguage() lang_id = current_language local senses = current_lexeme:getSenses() local add_heading = true forms = current_lexeme:getForms() if args[2] then local val = mw.text.trim(tostring(args[2])) if val == "false" or val == "0" or val == "না" then add_heading = false end end local references_seen = {} local sections = {} local title = mw.title.getCurrentTitle().text local lang_category = getLanguageForCategories(title, true) local lang_name = getLabel(lang_category) if add_heading == true then local lang_heading = heading_level(lang_name, 2) table.insert(sections, lang_heading) end lang_code = getLexemeLanguageCode(current_lexeme) matched_lemma = getMatchingLemmaForPageTitle(current_lexeme, title) lex_cat = current_lexeme:getLexicalCategory() local cat = i18n.lang_category(getLabel(lex_cat), lang_name) local lex_cat_template, ety_added, pron_added, alt_added if cat then table.insert(sections, heading_level(getLabel(lex_cat) .. cat .. frame:expandTemplate{ title = i18n['template_anchor'], args = { lexeme_id } }, 3)) table.insert(sections, frame:expandTemplate{ title= i18n['template_lexeme'], args = {lexeme_id} }) add_any_notes(sections, args, i18n['manual_category']) local etymology = getEtymology( current_lexeme, frame ) if etymology ~= '' and etymology then table.insert(sections, heading_level(i18n['heading_etymology'], 4)) table.insert(sections, tostring(etymology)) ety_added = true end if ety_added then add_any_notes(sections, args, i18n['manual_etymology']) else add_any_notes(sections, args, i18n['manual_etymology'], heading_level(i18n['heading_etymology'], 4)) end local pronunciation = getPronunciation( frame, current_lexeme, lang_name) if pronunciation ~= '' then table.insert(sections, heading_level(i18n['heading_pronunciation'], 4)) table.insert(sections, tostring(pronunciation)) pron_added = true end if pron_added then add_any_notes(sections, args, i18n['manual_pronunciation']) else add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level(i18n['heading_pronunciation'], 4)) end local alternative_spellings = getAlternativeSpellings(current_lexeme, frame) if alternative_spellings ~= '' then table.insert(sections, heading_level(i18n['heading_alternative_spellings'], 4)) table.insert(sections, alternative_spellings) alt_added = true end if alt_added then add_any_notes(sections, args, i18n['manual_pronunciation']) else add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level( i18n['heading_alternative_spellings'], 4)) end if lang_code and lang_code ~= 'ksy' and lang_code ~= 'rkt' then -- Skip for Kharia Thar, Rangpuri if lex_cat == 'Q34698' then -- বিশেষণ if lang_code == 'en' or lang_code == 'bn' then if #forms <= 1 then lex_cat_template = frame:expandTemplate{title= lang_code .. '-বিশেষণ'} end else lex_cat_template = safeExpand(frame, lang_code .. '-adj') if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. '-বিশেষণ') end end elseif lex_cat == 'Q1084' then -- @TODO: Also check for plural forms local gender local stmts = current_lexeme:getAllStatements('P5185') -- ব্যাকরণগত লিঙ্গ if #stmts ~= 0 and stmts[1].mainsnak.datavalue then if #stmts == 1 then local gender_qid = stmts[1].mainsnak.datavalue.value.id if gender_qid == 'Q499327' then gender = 'm' elseif gender_qid == 'Q1775415' then gender = 'f' elseif gender_qid == 'Q1775461' then gender = 'n' elseif gender_qid == 'Q1305037' then gender = 'c' end end else for i, stmt in pairs(stmts) do local qid = stmts[i].mainsnak.datavalue if qid then qid = qid.value.id end if qid == 'Q499327' then gender = gender .. 'm' elseif qid == 'Q1775415' then gender = gender .. 'f' end end end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. if current_language == 'Q13955' then if matched_lemma then lex_cat_template = safeExpand(frame, 'ar-noun', {matched_lemma,gender}) else lex_cat_template = frame:expandTemplate{title='ar-noun', args={nil,gender}} end elseif current_language == 'Q29919' then lex_cat_template = frame:expandTemplate{title='arz-noun', args={g=gender}} elseif current_language == 'Q397' then if matched_lemma then lex_cat_template = frame:expandTemplate{title='la-noun', args={matched_lemma,g=gender}} end elseif current_language == 'Q11059' then lex_cat_template = frame:expandTemplate{title='sa-noun', args={g=gender}} elseif current_language ~= 'Q1860' then -- These templates require the gender to be passed as the 1st argument. lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix'], {gender}) if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix_fallback'], {gender}) end end end end -- elseif lex_cat == 'Q147276' then -- lex_cat_template = safeExpand(frame, lang_code .. '-proper noun', {gender}) -- if not lex_cat_template then -- lex_cat_template = safeExpand(frame, lang_code .. '-নামবাচক বিশেষ্য', {gender}) -- end end if lex_cat_template then table.insert(sections, lex_cat_template) else if matched_lemma then table.insert(sections, heading_level(matched_lemma, 4)) else table.insert(sections, i18n.tocatlink(i18n['category_no_matching_lemma'])) end end local meanings, references_seen, sense_extlinks = unpack(getMeanings( frame, args, current_lexeme, senses, references_seen, lang_name)) table.insert(sections, tostring(meanings)) add_any_notes(sections, args, i18n['manual_meaning']) local instance_of = current_lexeme:getAllStatements('P31') -- সত্ত্বার ধরন if #instance_of ~= 0 then local instance_of_entity = instance_of[1].mainsnak.datavalue.value.id if instance_of_entity == 'Q40437546' or instance_of_entity == 'Q120831827' or instance_of_entity == 'Q120717979' or instance_of_entity == 'Q124476844' then -- @TODO: generalise this so all types of roots are shown table.insert(sections, i18n['text_instance_of'] .. ' ' .. getLabel(instance_of_entity)) elseif instance_of_entity == 'Q376431' then -- বর্ণের নাম table.insert(sections, i18n.tocatlink(lang_code .. ':রং')) end end if lex_cat ~= 'Q9788' then local translations = getTranslations(frame, senses) if translations then table.insert(sections, translations) end end -- (!) বিশেষ ভাষার বিভক্তির সারণি যদি থাকে সেগুলো এখানে নতুন if বিবৃতি যোগ করা যায়। if next(forms) then if current_language == 'Q9610' then -- বাংলা if lex_cat == 'Q24905' then local conjTable = require('মডিউল:আভিধানিক উপাত্ত/Q9610').getConjTable(frame, forms) table.insert(sections, conjTable) elseif lex_cat == 'Q1084' then table.insert(sections, callWikifunctionsFunction('Z33243|' .. lexeme_id .. '|', frame)) else if #forms > 1 then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end --elseif current_language == 'Q13955' then -- আরবি -- if lex_cat == 'Q1084' then -- table.insert(sections, frame:expandTemplate{title='ar-decl-noun', args={lemma}}) -- end elseif current_language == 'Q188' and lex_cat == 'Q1084' then -- জার্মান table.insert(sections, callWikifunctionsFunction('Z28602|' .. lexeme_id .. '|', frame)) --elseif current_language == 'Q397' and lex_cat == 'Q1084' then -- লাতিন -- table.insert(sections, callWikifunctionsFunction('Z26333|' .. matched_lemma .. '|', frame)) elseif current_language == 'Q150' and lex_cat == 'Q34698' then -- ফরাসি table.insert(sections, callWikifunctionsFunction('Z36435|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q652' and lex_cat == 'Q34698' then -- ইতালীয় table.insert(sections, callWikifunctionsFunction('Z36407|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q809' or current_language == 'Q9058' or current_language == 'Q6654' or current_language == 'Q9056' then -- পোলীয়, স্লোভাক, ক্রোয়েশীয়, চেক table.insert(sections, callWikifunctionsFunction('Z36421|' .. lexeme_id .. '|', frame)) elseif #forms > 1 and current_language ~= 'Q150' then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end if lex_cat == 'Q134830' then table.insert(sections, frame:expandTemplate{title='prefixsee', args={lang_code}}) elseif lex_cat == 'Q102047' then table.insert(sections, frame:expandTemplate{title='suffixsee', args={lang_code}}) -- elseif lex_cat == 'Q111029' then -- table.insert(sections, frame:expandTemplate{title='rootsee', args={'+', lang_code, matched_lemma}}) end local reference_notes = get_any_notes(sections, args, i18n['manual_reference']) if #references_seen > 0 or #reference_notes > 0 then table.insert(sections, heading_level(i18n['heading_references'], 4)) table.insert(sections, frame:extensionTag('references')) add_specific_notes(sections, reference_notes) end local external_link_table = getExternalLinks ( current_lexeme ) if #external_link_table > 0 then local external_links = '* ' .. table.concat(external_link_table, '\n* ') table.insert(sections, heading_level(i18n['heading_external_links'], 4)) table.insert(sections, external_links) end add_any_notes(sections, args, i18n['manual_external_link']) if #references_seen == 0 and #reference_notes == 0 and sense_extlinks and #sense_extlinks == 0 and #external_link_table == 0 and #get_any_notes(sections, args, i18n['manual_external_link']) == 0 then table.insert(sections, i18n.rfref_category(lang_name)) end return table.concat(sections,"\n\n") end return p izv1t7d8ie8eoz1pesvcgmx8k26kjik 512383 512381 2026-07-01T04:59:44Z Redmin 6857 512383 Scribunto text/plain local p = {} local i18n = require('মডিউল:আভিধানিক উপাত্ত/i18n') local references = require('মডিউল:উইকিউপাত্ত তথ্যসূত্র বিন্যাসকরণ').format local getArgs = require('Module:Arguments').getArgs local wb = mw.wikibase local ustring = mw.ustring local html = mw.html local mw_lang = mw.language local entity_cache = {} local reference_cache = {} local forms local lang_code local lex_cat local matched_lemma local lang_id local function wrapStringInWikilinks(str) local exceptions = i18n.nolinks local result = str:gsub('(%S+)', function(token) local word, trailing_char = token:match('^(.-)([;,]*)$') local wrapped = word:gsub('[^(-/]+', function(part) if exceptions[part] then return part else return '[[' .. part .. '#' .. i18n['content_lang_name'] .. '|' .. part .. ']]' end end) return wrapped .. trailing_char end) return result end local function serializeTable(val, name, skipnewlines, depth) -- https://stackoverflow.com/a/6081639 skipnewlines = skipnewlines or false depth = depth or 0 local tmp = string.rep(" ", depth) if name then tmp = tmp .. name .. " = " end if type(val) == "table" then tmp = tmp .. "{" .. (not skipnewlines and "\n" or "") for k, v in pairs(val) do tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "") end tmp = tmp .. string.rep(" ", depth) .. "}" elseif type(val) == "number" then tmp = tmp .. tostring(val) elseif type(val) == "string" then tmp = tmp .. string.format("%q", val) elseif type(val) == "boolean" then tmp = tmp .. (val and "true" or "false") else tmp = tmp .. "\"[inserializeable datatype:" .. type(val) .. "]\"" end return tmp end -- Use this to safely expand templates when you are not sure that they exist. local function safeExpand(frame, title, args) local _, result = pcall(function() return frame:expandTemplate{ title = title, args = args } end) if result:find('does not exist') then -- expandTemplate{} doesn't seem to throw any error that can be handled with pcall() so string search is the only viable option. return nil end return result end local function checkTitleCodePointInRange(title, start_point, end_point) return ustring.find( title, '[' ..ustring.char(start_point) .. '-' .. ustring.char(end_point) .. ']' ) end local function getLanguageForCategories( current_page_title ) -- বিশেষ ভাষার জন্য if lang_id == 'Q11051' then -- হিন্দি/উর্দু if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- উর্দু lang_id = 'Q11051ur' elseif checkTitleCodePointInRange(current_page_title, 0x0900, 0x097f) then -- হিন্দি lang_id = 'Q11051hi' end elseif lang_id == 'Q58635' then -- পাঞ্জাবি if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- শাহমুখী lang_id = 'Q58635pnb' elseif checkTitleCodePointInRange(current_page_title, 0x0a00, 0x0a7f) then -- গুরুমুখী lang_id = 'Q58635pa' end elseif lang_id == 'Q56356571' then -- নয়া ফার্সি ভাষা if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- ফার্সি (ইরান/আফগানিস্তান) lang_id = 'Q56356571fa' elseif checkTitleCodePointInRange(current_page_title, 0x0400, 0x04ff) then -- তাজিক lang_id = 'Q56356571tg' end end return lang_id end local function getEntity( id ) if entity_cache[id] == nil then entity_cache[id] = wb.getEntity(id) or error('Invalid ID provided: ' .. id) end return entity_cache[id] ~= false and entity_cache[id] or nil end -- Use this function to get the label of an item even if that item does not have any label in the wiki's content language or English. local function getLabel(id) if id == 'Q11051hi' then return 'হিন্দি' elseif id == 'Q11051ur' then return 'উর্দু' elseif id == 'Q56356571fa' then return 'ফার্সি' elseif id == 'Q56356571tg' then return 'তাজিক' elseif id == 'Q58635pa' or id == 'Q58635pnb' then return 'পাঞ্জাবি' end local label = wb.getLabel(id) if label then return label end local labels = getEntity(id).labels if not labels then return id end for _, v in pairs(labels) do if v and v.value then return v.value end end end local function getReference( id, reference ) local out_id = nil local url_value if reference_cache[id] == nil then local ref_text = references(reference, wb, mw_lang, i18n['content_lang_code'], i18n['wikipedia']) if reference.snaks then if reference.snaks['P248'] then for _, snak in pairs(reference.snaks['P248']) do if snak.datavalue and snak.datavalue.value.id == 'Q428' then -- কুরআন ref_text = ustring.gsub(ref_text, 'নামক অনুচ্ছেদ', 'নং আয়াত') break end end end if reference.snaks['P854'] then local snak = reference.snaks['P854'][1] if snak.datavalue then url_value = snak.datavalue.value end end end if url_value then ref_text = ref_text .. ', [' .. url_value .. ' সংযোগ]' end reference_cache[id] = ref_text else out_id = id end return {out_id, reference_cache[id]} end -- Returns the Wiktionary language code for a lexeme entity or nil, in the latter case, getLemmas() can be relied on to fetch the language code by stripping extraneous bits from the 'language' string as necessary local function getLexemeLanguageCode(lexeme) local lang_item_id = lexeme:getLanguage() local lang_entity = getEntity(lang_item_id) for i, statement_property in ipairs({'P305','P424', 'P220'}) do -- আইইটিএফ ভাষা ট্যাগ, উইকিমিডিয়া ভাষা কোড, আইএসও ৬৩৯-৩ local statements = lang_entity:getBestStatements(statement_property) if statements[1] then local code = statements[1].mainsnak.datavalue.value if code == 'hr' then return 'sh' elseif code == 'pan' then return 'pa' else return code end end end end -- Return the first form of the lexeme which has exactly the given grammatical feature. local function formWithSingleGrammaticalFeature( item_id ) for i = 1, #forms do local grammaticalFeatures = forms[i]:getGrammaticalFeatures() if #grammaticalFeatures == 1 and grammaticalFeatures[1] == item_id then return forms[i] end end return nil end local function getArticleLinkTemplate(frame, stmt_value) local template = '' local sitelink = getEntity(stmt_value):getSitelink(i18n['wikipedia']) if sitelink then template = frame:expandTemplate{ title=i18n['template_wikipedia'], args={sitelink} } end return template end local function getArticleLinks (frame, sense ) local article_links = '' for i, stmt in pairs(sense:getAllStatements('P5137')) do -- এই অর্থের জন্য আইটেম article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end for i, stmt in pairs(sense:getAllStatements('P9970')) do -- এই অর্থের জন্য বিধেয় article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end return article_links end -- @TODO: Generalise local function expandTemplateForProperty(frame, object, property, template) local lemmas = {} local n = 0 for _, stmt in pairs(object:getAllStatements(property)) do local lex = wb.lexeme.splitLexemeId(stmt.mainsnak.datavalue.value.id) if lex then lex = getEntity(lex) n = n + 1 lemmas[n] = lex:getLemma(lang_code) end end if not lang_code or n == 0 then return '' end -- Build args: first lang_code, then lemmas local args = {lang_code} for i = 1, n do args[#args + 1] = lemmas[i] end return frame:expandTemplate{ title = template, args = args } end local function getExternalLinks( entity ) -- T418639 local external_links = {} if entity.claims == nil then return external_links end local formatter_urls = require('মডিউল:আভিধানিক উপাত্ত/urls').formatter_urls for property_id, statements in pairs(entity.claims) do local formatter_url = formatter_urls[property_id] if formatter_url then local property_source = wb.getBestStatements(property_id, 'P9073') local source_name if next(property_source) then source_name = getLabel(property_source[1].mainsnak.datavalue.value.id) or property_source[1].mainsnak.datavalue.value.id else source_name = getLabel(property_id) or property_id end for i = 1, #statements do local stmt = statements[i] if stmt.mainsnak.datavalue then local formatted_link = ustring.gsub( ustring.gsub(formatter_url, '$1', stmt.mainsnak.datavalue.value), ' ', '+' ) table.insert(external_links, '[' .. formatted_link .. ' ' .. source_name .. ']') end end end end return external_links end p.getExternalLinks = getExternalLinks -- রেখে দিন যাতে ডিবাগিং সম্ভব হয় local function heading_level(text, level) return '<h' .. level .. '>' .. ' ' .. text .. ' ' .. '</h' .. level .. '>' end local function termSpan( term ) local text = term[1] local lang = term[2] local dir = mw_lang.new( lang ):getDir() local span = html.create( 'span' ) span:attr( 'lang', lang ) :attr( 'dir', dir ) :wikitext( text ) return tostring( span ) end local function getLemmata( current_lexeme ) local lemma_string = '' for i, rep in pairs(current_lexeme:getLemmas()) do if lemma_string == '' then lemma_string = termSpan(rep) else lemma_string = lemma_string .. '/' .. termSpan(rep) end end return lemma_string end local function getLinkedLemmata(lexeme, frame) local lemma_string = '' local lang for i, rep in pairs(lexeme:getLemmas()) do lang = getLexemeLanguageCode(lexeme) if lang == nil then lang = string.gsub(rep[2], '-%S+', '') end if lemma_string == '' then lemma_string = frame:expandTemplate{title='link', args={lang, rep[1]}} else lemma_string = lemma_string .. '/' .. frame:expandTemplate{title='link', args={lang, rep[1]}} end end return lemma_string end local function getExamples( current_lexeme, sense_id, references_seen ) local examples = html.create('dl') local example_text, example_lang, example_form, example_str for i, stmt in pairs(current_lexeme:getAllStatements('P5831')) do -- ব্যবহারের উদাহরণ if stmt.qualifiers and stmt.qualifiers['P6072'] and stmt.qualifiers['P6072'][1].datavalue.value.id == sense_id then -- বিষয়ে লেক্সিমের অর্থ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_strs = {} if stmt.qualifiers['P1810'] then table.insert(example_form_strs, stmt.qualifiers['P1810'][1].datavalue.value) elseif stmt.qualifiers['P5830'] then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ for _, rep in pairs(example_form:getRepresentations()) do table.insert(example_form_strs, rep[1]) end end for _, example_form_str in pairs(example_form_strs) do local new_example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") if new_example_text ~= example_text then example_str = termSpan({new_example_text, example_lang}) break end example_text = new_example_text end if example_str == nil then example_str = termSpan({example_text, example_lang}) end local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end end for i, stmt in pairs(wb.getAllStatements(sense_id, 'P5831')) do -- ব্যবহারের উদাহরণ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_str = nil if stmt.qualifiers then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ if stmt.qualifiers['P1810'] then example_form_str = stmt.qualifiers['P1810'][1].datavalue.value end end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentation(i18n['content_lang_code']) end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentations()[1][1] end if example_form_str then example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") end example_str = termSpan({example_text, example_lang}) local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end return { tostring(examples) , references_seen } end -- This calls frame:preprocess() instead of :callParserFunction() because the latter does not work for Wikifunctions function calls yet (see https://www.wikifunctions.org/wiki/Wikifunctions:Embedded_function_calls). local function callWikifunctionsFunction(args, frame) return frame:preprocess('{{#function:' .. args .. '}}') end local function getOneStringForProperty(object, property) local val local stmts = object:getAllStatements(property) if #stmts ~= 0 then val = stmts[1].mainsnak.datavalue.value end return val end local function getItemForSense(sense) for k, stmt in pairs(sense:getAllStatements('P5137')) do -- যদি 'এই অর্থের জন্য আইটেম' মানের বাংলা লেবেল থাকে local qid = stmt.mainsnak.datavalue.value.id return qid, getLabel(qid) end end local function getTranslations(frame, senses) if #senses == 0 then return nil end local all_translations = {} local wmlang, item, label for _, sense in pairs(senses) do local translation_set = {} local gloss = sense:getGloss(i18n['content_lang_code']) if lex_cat ~= 'Q34698' then item, label = getItemForSense(sense) end if item then wmlang = require("Module:wikimedia languages") end for _, stmt in pairs(sense:getAllStatements('P5972')) do local translation = stmt.mainsnak.datavalue.value.id local lexeme_id = wb.lexeme.splitLexemeId(translation) local trans_lexeme = getEntity(lexeme_id) local lang_name = getLabel(trans_lexeme:getLanguage()) local trans_code = getLexemeLanguageCode(trans_lexeme) if trans_code then table.insert(translation_set, lang_name .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={trans_code, getLinkedLemmata(trans_lexeme, frame) .. '<br/>'}}) else table.insert(translation_set, lang_name .. ': ' .. getLinkedLemmata(trans_lexeme, frame) .. '<br/>' .. i18n.trans_category(lang_name)) end end if item then for _, v in pairs(getEntity(item).labels) do if string.find(v.language, '-') == nil then -- @TODO: Implement deduplication of translation and get rid of this check local lang = wmlang.getByCode(v.language) local wikt = lang:getWiktionaryLanguage() if wikt:hasType('regular') then table.insert(translation_set, getLabel(wikt:getWikidataItem()) .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={wikt:getCode(), v.value .. '<br/>'}}) end end end end if #translation_set > 0 then local block = frame:expandTemplate{ title = i18n['template_trans-top'], args = { gloss or label } } block = block .. table.concat(translation_set, '\n') .. frame:expandTemplate{ title = i18n['template_trans-bottom'] } table.insert(all_translations, block) end end if #all_translations == 0 then return nil end return heading_level(i18n['heading_translation'], 4) .. ' \n' .. table.concat(all_translations, '\n') end local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. "File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n['edit_wikidata'] .. "|link=https://www.wikidata.org/entity/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n['edit_wikidata'] .. "]]</span>" return icon end local function getMeanings( frame, args, current_lexeme, senses, references_seen, language_name) if #senses == 0 then return {createicon(i18n['content_lang_code'], current_lexeme:getId()) .. "''" .. i18n['text_category_rfdef'] .. "''" .. i18n.tocatlink(i18n['category_rfdef']), references_seen} end local meanings = html.create( 'ol' ) local idlinkset = {} for i, sense in pairs(senses) do local item_label_gloss_parts = {} local gloss_text_parts = {} local main_gloss_text = frame:expandTemplate{ title=i18n['template_anchor'], args={sense:getId()} } local specifiers = {} for k, property_id in ipairs({'P6084', 'P6191', 'P9488'}) do -- অবস্থান যেখানে শব্দার্থ ব্যবহৃত, যে রীতিতে শব্দার্থ ব্যবহৃত হয়, যে ক্ষেত্রে ব্যবহৃত for _, stmt in pairs(sense:getAllStatements(property_id)) do local stmt_value = stmt.mainsnak.datavalue.value.id local reference_text = '' local refs = stmt.references if refs then for j, reference in pairs(refs) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. frame:extensionTag('ref', got_reference[2]) end end local val = getLabel(stmt_value) table.insert(specifiers, val .. reference_text) if property_id == 'P9488' and lang_code ~= nil then table.insert(item_label_gloss_parts, i18n.tocatlink(lang_code .. ':' .. val)) end end end if #specifiers > 0 then main_gloss_text = main_gloss_text .. "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local gloss = sense:getGloss( i18n['content_lang_code'] ) if gloss then main_gloss_text = main_gloss_text .. wrapStringInWikilinks(gloss) if gloss:match('^প্রদত্ত%s*(%S-)%s*নাম$') then -- given names main_gloss_text = main_gloss_text .. i18n.tocatlink(language_name .. ' ' .. i18n['category_given_names']) end else local other_gloss_text = nil local other_gloss_lang = nil local stmt_value, item_label = getItemForSense(sense) if item_label then table.insert(item_label_gloss_parts, '[[:d:' .. stmt_value .. '|' .. item_label .. ']]') end if #item_label_gloss_parts > 0 then other_gloss_text = table.concat(item_label_gloss_parts, '; ') end if other_gloss_text == nil then for _, fallback_lang in ipairs(mw_lang.getFallbacksFor( i18n['content_lang_code'] )) do if sense:getGloss( fallback_lang ) then other_gloss_text, other_gloss_lang = sense:getGloss( fallback_lang ) end end if other_gloss_lang == nil then local glosses = sense:getGlosses() for _, gloss in pairs(glosses) do other_gloss_text = gloss[1] other_gloss_lang = gloss[2] break end end main_gloss_text = main_gloss_text .. other_gloss_text .. "<sup><em>" .. mw_lang.fetchLanguageName(other_gloss_lang, i18n['content_lang_code']) .. "</em></sup>" else main_gloss_text = main_gloss_text .. "''" .. other_gloss_text .. "''" end main_gloss_text = main_gloss_text .. i18n.tocatlink(i18n['category_rfdef_equivalent']) end local synonym = expandTemplateForProperty(frame, sense, 'P5973', i18n['template_synonym']) if synonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. synonym end local antonym = expandTemplateForProperty(frame, sense, 'P5974', i18n['template_antonym']) if antonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. antonym end local hypernym = expandTemplateForProperty(frame, sense, 'P6593', i18n['template_hypernym']) if hypernym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. hypernym end if lex_cat == 'Q1084' or lex_cat == 'Q147276' then -- noun or proper noun local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-noun']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym elseif lex_cat == 'Q34698' then local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-adj']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym end table.insert(gloss_text_parts, main_gloss_text .. createicon(i18n['content_lang_code'], sense:getId())) for _, stmt in pairs(sense:getAllStatements('P8394')) do -- টিপ্পনীর উদ্ধৃতি local gloss_quote = termSpan({stmt.mainsnak.datavalue.value.text, stmt.mainsnak.datavalue.value.language}) if stmt.references[1] then local got_reference = getReference ( stmt.references[1].hash, stmt.references[1] ) gloss_quote = '"' .. gloss_quote .. '" ' .. got_reference[2] end table.insert(references_seen, stmt.references[1].hash) table.insert(gloss_text_parts, frame:extensionTag('ref', gloss_quote)) end for _, stmt in pairs(sense:getAllStatements('P1343')) do -- বর্ণিত উৎস -- TODO: do away with making fake reference objects local fake_reference = { ['snaks'] = {} } fake_reference.snaks['P248'] = { [1] = stmt.mainsnak } local qualifiers_order = stmt['qualifiers-order'] if qualifiers_order then for _, k in ipairs(qualifiers_order) do fake_reference.snaks[k] = stmt.qualifiers[k] end end fake_reference.hash = mw.hash.hashValue('sha3-512', serializeTable(fake_reference)) table.insert(references_seen, fake_reference.hash) local got_reference = getReference(fake_reference.hash, fake_reference) if got_reference[1] == nil then table.insert(gloss_text_parts, frame:extensionTag('ref', got_reference[2], {name = fake_reference.hash})) else table.insert(gloss_text_parts, frame:extensionTag{name = 'ref', content='', args = {name = got_reference[1]}}) end end local first_sense_image = '' local sense_images = sense:getAllStatements('P18') if next(sense_images) then first_sense_image = sense_images[1].mainsnak.datavalue.value end if first_sense_image ~= '' then table.insert(gloss_text_parts, '[[চিত্র:' .. first_sense_image .. "|thumb|'''" .. getLemmata(current_lexeme) .. "'''—" .. main_gloss_text .. ']]') end local idlinks = getExternalLinks(sense) if #idlinks > 0 then local idlinktext = '<small>(' for _, idlink in pairs(idlinks) do idlinktext = idlinktext .. idlink .. '\n' end idlinktext = idlinktext .. ')</small>' table.insert(gloss_text_parts, idlinktext) table.insert(idlinkset, idlinks) end local externallinks = getArticleLinks(frame, sense) if externallinks ~= '' then table.insert(gloss_text_parts, externallinks) end local new_notes = {} local sense_keys = { sense:getId(), string.sub(sense:getId(), string.find(sense:getId(), '-')+1) } for _, v in ipairs(sense_keys) do if args[v] then table.insert(new_notes, args[v]) end end if #new_notes > 0 then for _, v in ipairs(new_notes) do if i == 1 then table.insert(gloss_text_parts, '<br/>' .. v) else table.insert(gloss_text_parts, v) end end end examples, references_seen = unpack(getExamples( current_lexeme, sense:getId(), references_seen )) local gloss_text = table.concat(gloss_text_parts, '\n') meanings:tag('li'):wikitext(gloss_text):wikitext(examples) end return {meanings, references_seen, idlinkset} end local function getPronunciationBaseForm() local base_form = nil -- (!) অন্য ভাষার শব্দের যদি অন্য রকম মূল ফর্ম থাকে সেগুলো এখানে নতুন if বিবৃতি দিয়ে যোগ করা যায়। if lang_code == 'bn' then if lex_cat == 'Q1084' then -- বিশেষ্য base_form = formWithSingleGrammaticalFeature( 'Q131105' ) -- কর্তৃকারক elseif lex_cat == 'Q24905' then -- ক্রিয়া base_form = formWithSingleGrammaticalFeature( 'Q1350145' ) -- ক্রিয়া বিশেষ্য end end if base_form == nil then for i, form in pairs(forms) do base_form = form break end end return base_form end local function getCombines( current_lexeme, frame ) local combines = '' local index_mappings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P5238')) do if stmt.qualifiers and stmt.qualifiers['P1545'] then -- ক্রম local current_index = tonumber(stmt.qualifiers['P1545'][1].datavalue.value) index_mappings[current_index] = stmt end end if #index_mappings ~= 0 then for i, stmt in ipairs(index_mappings) do if stmt.mainsnak.datavalue then local part_lexeme_id = stmt.mainsnak.datavalue.value.id local part_lexeme = getEntity(part_lexeme_id) local current_substring = getLinkedLemmata(part_lexeme, frame) local part_etymology = getEtymology(part_lexeme, frame, 'partial') if part_etymology ~= '' and part_etymology then current_substring = current_substring .. ' (← ' .. part_etymology .. ')' end if combines == '' then combines = current_substring else -- @TODO: This shoukd use the 'affix' and 'compound' templates instead. combines = combines .. ' + ' .. current_substring end end end end return combines end function getRoots( current_lexeme, frame ) local stmts = current_lexeme:getAllStatements('P5920') if #stmts == 0 then return '', '', '' end local root_lexeme = getEntity(stmts[1].mainsnak.datavalue.value.id) return getLexemeLanguageCode(root_lexeme), '√' .. getLinkedLemmata(root_lexeme, frame), root_lexeme:getLemma('ar') end function getEtymology( current_lexeme, frame, mode ) -- @TODO: Fix the etymology chains that are not possible to render local etymology = '' local current_combines = getCombines(current_lexeme, frame) local root_lang, current_roots, root_str = getRoots(current_lexeme, frame) if mode ~= 'partial' and root_str then --frame:expandTemplate{title=i18n['template_root'], args={lang_code, root_lang, root_str}} end local stmts = current_lexeme:getAllStatements('P5191') local new_etymology_string if #stmts == 0 then if current_roots ~= '' and current_combines ~= '' and current_roots then return current_roots .. '<br/>(' .. current_combines .. ')' elseif current_roots ~= '' then if lang_code == 'ar' and mode ~= 'partial' and root_str ~= matched_lemma then return frame:expandTemplate{title=i18n['template_ar-rootbox'], args={root_str}} else return current_roots end else return current_combines end end local origin_lexeme_string for i, stmt in pairs(stmts) do local origin_lexeme_dv = stmt.mainsnak.datavalue -- If this is nil, the origin lexeme is not known. if origin_lexeme_dv then local origin_lexeme = getEntity(origin_lexeme_dv.value.id) local origin_lexeme_lang = getLabel(origin_lexeme:getLanguage()) local sitelink = i18n.wplink(origin_lexeme:getLanguage(), origin_lexeme_lang, wb) if sitelink ~= '' then origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. sitelink .. ')' else origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. origin_lexeme_lang .. ')' end if stmt.qualifiers and stmt.qualifiers['P5886'] then local mode_of_derivation = stmt.qualifiers['P5886'][1].datavalue.value.id if mode_of_derivation == 'Q1345001' then -- @TODO: Add support for showing gender origin_lexeme_string = frame:expandTemplate{title=i18n['template_borrowed'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_borrowing'] elseif mode_of_derivation == 'Q845079' then origin_lexeme_string = ustring.gsub(i18n['etymology_learned_borrowing'], '$1', origin_lexeme_string) elseif mode_of_derivation == 'Q56611986' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_inherited'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_inheritance'] elseif mode_of_derivation == 'Q189743' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_ellipsis'], args={lang_code, getLemmata(origin_lexeme)}} .. ' ' .. i18n['etymology_ellipsis'] end end local origin_origin = getEtymology(origin_lexeme, frame) if origin_origin ~= '' and origin_origin then new_etymology_string = origin_lexeme_string .. ' ← ' .. origin_origin else new_etymology_string = origin_lexeme_string end end if etymology == '' then etymology = new_etymology_string elseif origin_lexeme_string and etymology then etymology = etymology .. ' ' .. origin_lexeme_string elseif origin_lexeme_string and etymology == nil then etymology = origin_lexeme_string end end if current_roots ~= '' and etymology and current_roots then etymology = etymology .. ' ' .. current_roots elseif current_roots ~= '' and etymology == nil then etymology = current_roots end if current_combines ~= '' and etymology then etymology = etymology .. '<br/>(' .. current_combines .. ')' end return etymology end local function pronunciationBlock(block, value) return '* ' .. i18n['text_' .. block] .. ' ' .. value end local function getPronunciation(frame, current_lexeme, lang_name) local pronunciations = {} local base_form = getPronunciationBaseForm() local iast, iso15919_transcription, itrans, xsampa if base_form then for i, stmt in pairs(base_form:getAllStatements('P443')) do -- উচ্চারণের অডিও local pronunciation_file = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন local qual = stmt.qualifiers[property_id] if qual then for _, qual in pairs(qual) do local stmt_value = qual.datavalue.value.id table.insert(specifiers, getLabel(stmt_value)) end end end end if #specifiers > 0 then specifier_text = table.concat(specifiers, "'', ''") end local audio_text if specifier_text ~= '' then audio_text = i18n['text_audio'] .. ' (' .. specifier_text .. ')' else audio_text = i18n['text_audio'] end table.insert(pronunciations, '* ' .. frame:expandTemplate{ title= i18n['template_audio'], args = {lang_name, pronunciation_file, audio_text} }) iso15919_transcription = getOneStringForProperty(base_form, 'P5825') -- আইএসও ১৫৯১৯ প্রতিলিপিকরণ itrans = getOneStringForProperty(base_form, 'P8881') -- ITRANS iast = getOneStringForProperty(base_form, 'P7581') -- আইএএসটি প্রতিলিপিকরণ xsampa = getOneStringForProperty(base_form, 'P2859') end local ipa_transcription = base_form:getAllStatements('P898') -- - আধ্বব প্রতিলিপিকরণ -- @TODO: অডিও ও প্রতিলিপিকরণ দুটোই থাকলে সেই ক্ষেত্রে একটার ঠিক পরেই আরেকটা দেখানো উচিত if #ipa_transcription ~= 0 then for i, stmt in pairs(ipa_transcription) do local ipa_text = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন for l, qual in ipairs(stmt.qualifiers[property_id]) do table.insert(specifiers, getLabel( qual.datavalue.value.id )) end end end if #specifiers > 0 then specifier_text = "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local syllable_count if lang_code == 'tr' then syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z10029|' .. ipa_text, frame) else syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z30837|' .. ipa_text, frame) end table.insert(pronunciations, '* ' .. specifier_text .. frame:expandTemplate{ title= i18n['template_ipa'], args = {lang_name, ipa_text} } .. '\n* ' .. syllable_count) end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. elseif lang_code == 'bn' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='bn-IPA', }) elseif lang_code == 'ar' then local lemma = current_lexeme:getLemma('ar') table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ar-IPA', args={lemma} }) elseif lang_code == 'en' then table.insert(pronunciations, '* ' .. i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z29940|' .. matched_lemma, frame)) elseif lang_code == 'pl' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='pl-IPA', }) elseif lang_code == 'ko' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ko-IPA', }) elseif lang_code == 'fi' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fi-IPA', }) elseif lang_code == 'ta' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ta-IPA', }) elseif lang_code == 'fax' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fax-pron', }) end end -- {{আধ্বব|en|/ˈɪntəvjuː/}} if iso15919_transcription then table.insert(pronunciations, pronunciationBlock('iso15919', iso15919_transcription)) end if itrans then table.insert(pronunciations, pronunciationBlock('itrans', itrans)) end if iast then table.insert(pronunciations, pronunciationBlock('iast', iast)) end if xsampa then table.insert(pronunciations, pronunciationBlock('xsampa', xsampa)) end return table.concat(pronunciations, '\n') end local function getAlternativeSpellings( current_lexeme, frame ) local alt_spellings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P11577')) do -- বিকল্প বানান if stmt.mainsnak.datavalue then table.insert(alt_spellings, '* ' .. frame:expandTemplate{title=i18n['template_alter'], args={lang_code, getLemmata(getEntity(stmt.mainsnak.datavalue.value.id), frame)}}) end end return table.concat(alt_spellings, '\n') end function get_any_notes(sections, args, keys) local notes = {} for i, v in ipairs(keys) do if args[v] then table.insert(notes, args[v]) end end return notes end function add_specific_notes(sections, notes) for i, v in ipairs(notes) do table.insert(sections, v) end end local function add_any_notes(sections, args, keys, heading) for i, v in ipairs(keys) do if args[v] then if heading then table.insert(sections, heading) end table.insert(sections, args[v]) end end end local function getMatchingLemmaForPageTitle(lexeme, title) local lemmas = lexeme:getLemmas() local match for _, lemma_entry in ipairs(lemmas) do local lemma = lemma_entry[1] if lemma == title then match = lemma break end end if match == nil then if lang_code == 'ar' then match = lexeme:getLemma('ar') elseif lang_code == 'rhg' then match = lexeme:getLemma('rhg-arab') elseif lang_id == 'Q11051ur' then match = lexeme:getLemma('ur') elseif lang_code == 'arz' then match = lexeme:getLemma('arz') end end return match end local function buildLanguageAgnosticInflectionTable() local has_image = false local form_images = {} for i, form in ipairs(forms) do local form_image = form:getAllStatements('P7407') if next(form_image) then form_images[i] = form_image[1].mainsnak.datavalue.value has_image = true end end local table_class = "wikitable mw-collapsible sortable" if not has_image then table_class = table_class .. " mw-collapsed" end local text = "{| class='" .. table_class .. "' style='border:solid 1px rgb(80%,80%,100%); text-align:center;'\n" text = text .. "|+ " .. i18n['heading_inflection_table'] .. "\n" text = text .. "|- \n" text = text .. "! " .. i18n['heading_form'] .. " !! " .. i18n['heading_grammatical_features'] if has_image then text = text .. " !! " .. (i18n['heading_image']) end text = text .. " \n" for i, form in ipairs(forms) do local rep = form:getRepresentations() local feat = form:getGrammaticalFeatures() local rep_text = "" for j, r in pairs(rep) do if rep_text == "" then rep_text = r[1] else rep_text = rep_text .. " / " .. r[1] end end local feat_text = "" if feat then for j, f in ipairs(feat) do local label = getLabel(f) or f if feat_text == "" then feat_text = label else feat_text = feat_text .. ", " .. label end end end text = text .. "|-\n" text = text .. "| " .. (rep_text ~= "" and rep_text or "—") text = text .. " || " .. (feat_text ~= "" and feat_text or "—") if has_image then local image_cell = "—" if form_images[i] then image_cell = "[[চিত্র:" .. form_images[i] .. "|50px]]" end text = text .. " || " .. image_cell end text = text .. "\n" end text = text .. "|}" return text end function p.all(frame) local args = getArgs(frame) local lexeme_id = args[1] local current_lexeme = getEntity(lexeme_id) local current_language = current_lexeme:getLanguage() lang_id = current_language local senses = current_lexeme:getSenses() local add_heading = true forms = current_lexeme:getForms() if args[2] then local val = mw.text.trim(tostring(args[2])) if val == "false" or val == "0" or val == "না" then add_heading = false end end local references_seen = {} local sections = {} local title = mw.title.getCurrentTitle().text local lang_category = getLanguageForCategories(title, true) local lang_name = getLabel(lang_category) if add_heading == true then local lang_heading = heading_level(lang_name, 2) table.insert(sections, lang_heading) end lang_code = getLexemeLanguageCode(current_lexeme) matched_lemma = getMatchingLemmaForPageTitle(current_lexeme, title) lex_cat = current_lexeme:getLexicalCategory() local cat = i18n.lang_category(getLabel(lex_cat), lang_name) local lex_cat_template, ety_added, pron_added, alt_added if cat then table.insert(sections, heading_level(getLabel(lex_cat) .. cat .. frame:expandTemplate{ title = i18n['template_anchor'], args = { lexeme_id } }, 3)) table.insert(sections, frame:expandTemplate{ title= i18n['template_lexeme'], args = {lexeme_id} }) add_any_notes(sections, args, i18n['manual_category']) local etymology = getEtymology( current_lexeme, frame ) if etymology ~= '' and etymology then table.insert(sections, heading_level(i18n['heading_etymology'], 4)) table.insert(sections, tostring(etymology)) ety_added = true end if ety_added then add_any_notes(sections, args, i18n['manual_etymology']) else add_any_notes(sections, args, i18n['manual_etymology'], heading_level(i18n['heading_etymology'], 4)) end local pronunciation = getPronunciation( frame, current_lexeme, lang_name) if pronunciation ~= '' then table.insert(sections, heading_level(i18n['heading_pronunciation'], 4)) table.insert(sections, tostring(pronunciation)) pron_added = true end if pron_added then add_any_notes(sections, args, i18n['manual_pronunciation']) else add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level(i18n['heading_pronunciation'], 4)) end local alternative_spellings = getAlternativeSpellings(current_lexeme, frame) if alternative_spellings ~= '' then table.insert(sections, heading_level(i18n['heading_alternative_spellings'], 4)) table.insert(sections, alternative_spellings) alt_added = true end if alt_added then add_any_notes(sections, args, i18n['manual_alternative_spellings']) else add_any_notes(sections, args, i18n['manual_alternative_spellings'], heading_level( i18n['heading_alternative_spellings'], 4)) end if lang_code and lang_code ~= 'ksy' and lang_code ~= 'rkt' then -- Skip for Kharia Thar, Rangpuri if lex_cat == 'Q34698' then -- বিশেষণ if lang_code == 'en' or lang_code == 'bn' then if #forms <= 1 then lex_cat_template = frame:expandTemplate{title= lang_code .. '-বিশেষণ'} end else lex_cat_template = safeExpand(frame, lang_code .. '-adj') if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. '-বিশেষণ') end end elseif lex_cat == 'Q1084' then -- @TODO: Also check for plural forms local gender local stmts = current_lexeme:getAllStatements('P5185') -- ব্যাকরণগত লিঙ্গ if #stmts ~= 0 and stmts[1].mainsnak.datavalue then if #stmts == 1 then local gender_qid = stmts[1].mainsnak.datavalue.value.id if gender_qid == 'Q499327' then gender = 'm' elseif gender_qid == 'Q1775415' then gender = 'f' elseif gender_qid == 'Q1775461' then gender = 'n' elseif gender_qid == 'Q1305037' then gender = 'c' end end else for i, stmt in pairs(stmts) do local qid = stmts[i].mainsnak.datavalue if qid then qid = qid.value.id end if qid == 'Q499327' then gender = gender .. 'm' elseif qid == 'Q1775415' then gender = gender .. 'f' end end end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. if current_language == 'Q13955' then if matched_lemma then lex_cat_template = safeExpand(frame, 'ar-noun', {matched_lemma,gender}) else lex_cat_template = frame:expandTemplate{title='ar-noun', args={nil,gender}} end elseif current_language == 'Q29919' then lex_cat_template = frame:expandTemplate{title='arz-noun', args={g=gender}} elseif current_language == 'Q397' then if matched_lemma then lex_cat_template = frame:expandTemplate{title='la-noun', args={matched_lemma,g=gender}} end elseif current_language == 'Q11059' then lex_cat_template = frame:expandTemplate{title='sa-noun', args={g=gender}} elseif current_language ~= 'Q1860' then -- These templates require the gender to be passed as the 1st argument. lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix'], {gender}) if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix_fallback'], {gender}) end end end end -- elseif lex_cat == 'Q147276' then -- lex_cat_template = safeExpand(frame, lang_code .. '-proper noun', {gender}) -- if not lex_cat_template then -- lex_cat_template = safeExpand(frame, lang_code .. '-নামবাচক বিশেষ্য', {gender}) -- end end if lex_cat_template then table.insert(sections, lex_cat_template) else if matched_lemma then table.insert(sections, heading_level(matched_lemma, 4)) else table.insert(sections, i18n.tocatlink(i18n['category_no_matching_lemma'])) end end local meanings, references_seen, sense_extlinks = unpack(getMeanings( frame, args, current_lexeme, senses, references_seen, lang_name)) table.insert(sections, tostring(meanings)) add_any_notes(sections, args, i18n['manual_meaning']) local instance_of = current_lexeme:getAllStatements('P31') -- সত্ত্বার ধরন if #instance_of ~= 0 then local instance_of_entity = instance_of[1].mainsnak.datavalue.value.id if instance_of_entity == 'Q40437546' or instance_of_entity == 'Q120831827' or instance_of_entity == 'Q120717979' or instance_of_entity == 'Q124476844' then -- @TODO: generalise this so all types of roots are shown table.insert(sections, i18n['text_instance_of'] .. ' ' .. getLabel(instance_of_entity)) elseif instance_of_entity == 'Q376431' then -- বর্ণের নাম table.insert(sections, i18n.tocatlink(lang_code .. ':রং')) end end if lex_cat ~= 'Q9788' then local translations = getTranslations(frame, senses) if translations then table.insert(sections, translations) end end -- (!) বিশেষ ভাষার বিভক্তির সারণি যদি থাকে সেগুলো এখানে নতুন if বিবৃতি যোগ করা যায়। if next(forms) then if current_language == 'Q9610' then -- বাংলা if lex_cat == 'Q24905' then local conjTable = require('মডিউল:আভিধানিক উপাত্ত/Q9610').getConjTable(frame, forms) table.insert(sections, conjTable) elseif lex_cat == 'Q1084' then table.insert(sections, callWikifunctionsFunction('Z33243|' .. lexeme_id .. '|', frame)) else if #forms > 1 then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end --elseif current_language == 'Q13955' then -- আরবি -- if lex_cat == 'Q1084' then -- table.insert(sections, frame:expandTemplate{title='ar-decl-noun', args={lemma}}) -- end elseif current_language == 'Q188' and lex_cat == 'Q1084' then -- জার্মান table.insert(sections, callWikifunctionsFunction('Z28602|' .. lexeme_id .. '|', frame)) --elseif current_language == 'Q397' and lex_cat == 'Q1084' then -- লাতিন -- table.insert(sections, callWikifunctionsFunction('Z26333|' .. matched_lemma .. '|', frame)) elseif current_language == 'Q150' and lex_cat == 'Q34698' then -- ফরাসি table.insert(sections, callWikifunctionsFunction('Z36435|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q652' and lex_cat == 'Q34698' then -- ইতালীয় table.insert(sections, callWikifunctionsFunction('Z36407|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q809' or current_language == 'Q9058' or current_language == 'Q6654' or current_language == 'Q9056' then -- পোলীয়, স্লোভাক, ক্রোয়েশীয়, চেক table.insert(sections, callWikifunctionsFunction('Z36421|' .. lexeme_id .. '|', frame)) elseif #forms > 1 and current_language ~= 'Q150' then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end if lex_cat == 'Q134830' then table.insert(sections, frame:expandTemplate{title='prefixsee', args={lang_code}}) elseif lex_cat == 'Q102047' then table.insert(sections, frame:expandTemplate{title='suffixsee', args={lang_code}}) -- elseif lex_cat == 'Q111029' then -- table.insert(sections, frame:expandTemplate{title='rootsee', args={'+', lang_code, matched_lemma}}) end local reference_notes = get_any_notes(sections, args, i18n['manual_reference']) if #references_seen > 0 or #reference_notes > 0 then table.insert(sections, heading_level(i18n['heading_references'], 4)) table.insert(sections, frame:extensionTag('references')) add_specific_notes(sections, reference_notes) end local external_link_table = getExternalLinks ( current_lexeme ) if #external_link_table > 0 then local external_links = '* ' .. table.concat(external_link_table, '\n* ') table.insert(sections, heading_level(i18n['heading_external_links'], 4)) table.insert(sections, external_links) end add_any_notes(sections, args, i18n['manual_external_link']) if #references_seen == 0 and #reference_notes == 0 and sense_extlinks and #sense_extlinks == 0 and #external_link_table == 0 and #get_any_notes(sections, args, i18n['manual_external_link']) == 0 then table.insert(sections, i18n.rfref_category(lang_name)) end return table.concat(sections,"\n\n") end return p ibnilow2fna23c7dat7286geb8qthmb 512401 512383 2026-07-01T07:47:19Z Redmin 6857 512401 Scribunto text/plain local p = {} local i18n = require('মডিউল:আভিধানিক উপাত্ত/i18n') local references = require('মডিউল:উইকিউপাত্ত তথ্যসূত্র বিন্যাসকরণ').format local getArgs = require('Module:Arguments').getArgs local wb = mw.wikibase local ustring = mw.ustring local html = mw.html local mw_lang = mw.language local entity_cache = {} local reference_cache = {} local forms local lang_code local lex_cat local matched_lemma local lang_id local function wrapStringInWikilinks(str) local exceptions = i18n.nolinks local result = str:gsub('(%S+)', function(token) local word, trailing_char = token:match('^(.-)([;,]*)$') local wrapped = word:gsub('[^(-/]+', function(part) if exceptions[part] then return part else return '[[' .. part .. '#' .. i18n['content_lang_name'] .. '|' .. part .. ']]' end end) return wrapped .. trailing_char end) return result end local function serializeTable(val, name, skipnewlines, depth) -- https://stackoverflow.com/a/6081639 skipnewlines = skipnewlines or false depth = depth or 0 local tmp = string.rep(" ", depth) if name then tmp = tmp .. name .. " = " end if type(val) == "table" then tmp = tmp .. "{" .. (not skipnewlines and "\n" or "") for k, v in pairs(val) do tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "") end tmp = tmp .. string.rep(" ", depth) .. "}" elseif type(val) == "number" then tmp = tmp .. tostring(val) elseif type(val) == "string" then tmp = tmp .. string.format("%q", val) elseif type(val) == "boolean" then tmp = tmp .. (val and "true" or "false") else tmp = tmp .. "\"[inserializeable datatype:" .. type(val) .. "]\"" end return tmp end -- Use this to safely expand templates when you are not sure that they exist. local function safeExpand(frame, title, args) local _, result = pcall(function() return frame:expandTemplate{ title = title, args = args } end) if result:find('does not exist') then -- expandTemplate{} doesn't seem to throw any error that can be handled with pcall() so string search is the only viable option. return nil end return result end local function checkTitleCodePointInRange(title, start_point, end_point) return ustring.find( title, '[' ..ustring.char(start_point) .. '-' .. ustring.char(end_point) .. ']' ) end local function getLanguageForCategories( current_page_title ) -- বিশেষ ভাষার জন্য if lang_id == 'Q11051' then -- হিন্দি/উর্দু if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- উর্দু lang_id = 'Q11051ur' elseif checkTitleCodePointInRange(current_page_title, 0x0900, 0x097f) then -- হিন্দি lang_id = 'Q11051hi' end elseif lang_id == 'Q58635' then -- পাঞ্জাবি if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- শাহমুখী lang_id = 'Q58635pnb' elseif checkTitleCodePointInRange(current_page_title, 0x0a00, 0x0a7f) then -- গুরুমুখী lang_id = 'Q58635pa' end elseif lang_id == 'Q56356571' then -- নয়া ফার্সি ভাষা if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- ফার্সি (ইরান/আফগানিস্তান) lang_id = 'Q56356571fa' elseif checkTitleCodePointInRange(current_page_title, 0x0400, 0x04ff) then -- তাজিক lang_id = 'Q56356571tg' end end return lang_id end local function getEntity( id ) if entity_cache[id] == nil then entity_cache[id] = wb.getEntity(id) or error('Invalid ID provided: ' .. id) end return entity_cache[id] ~= false and entity_cache[id] or nil end -- Use this function to get the label of an item even if that item does not have any label in the wiki's content language or English. local function getLabel(id) if id == 'Q11051hi' then return 'হিন্দি' elseif id == 'Q11051ur' then return 'উর্দু' elseif id == 'Q56356571fa' then return 'ফার্সি' elseif id == 'Q56356571tg' then return 'তাজিক' elseif id == 'Q58635pa' or id == 'Q58635pnb' then return 'পাঞ্জাবি' end local label = wb.getLabel(id) if label then return label end local labels = getEntity(id).labels if not labels then return id end for _, v in pairs(labels) do if v and v.value then return v.value end end end local function getReference( id, reference ) local out_id = nil local url_value if reference_cache[id] == nil then local ref_text = references(reference, wb, mw_lang, i18n['content_lang_code'], i18n['wikipedia']) if reference.snaks then if reference.snaks['P248'] then for _, snak in pairs(reference.snaks['P248']) do if snak.datavalue and snak.datavalue.value.id == 'Q428' then -- কুরআন ref_text = ustring.gsub(ref_text, 'নামক অনুচ্ছেদ', 'নং আয়াত') break end end end if reference.snaks['P854'] then local snak = reference.snaks['P854'][1] if snak.datavalue then url_value = snak.datavalue.value end end end if url_value then ref_text = ref_text .. ', [' .. url_value .. ' সংযোগ]' end reference_cache[id] = ref_text else out_id = id end return {out_id, reference_cache[id]} end -- Returns the Wiktionary language code for a lexeme entity or nil, in the latter case, getLemmas() can be relied on to fetch the language code by stripping extraneous bits from the 'language' string as necessary local function getLexemeLanguageCode(lexeme) local lang_item_id = lexeme:getLanguage() local lang_entity = getEntity(lang_item_id) for i, statement_property in ipairs({'P305','P424', 'P220'}) do -- আইইটিএফ ভাষা ট্যাগ, উইকিমিডিয়া ভাষা কোড, আইএসও ৬৩৯-৩ local statements = lang_entity:getBestStatements(statement_property) if statements[1] then local code = statements[1].mainsnak.datavalue.value if code == 'hr' then return 'sh' elseif code == 'pan' then return 'pa' else return code end end end end -- Return the first form of the lexeme which has exactly the given grammatical feature. local function formWithSingleGrammaticalFeature( item_id ) for i = 1, #forms do local grammaticalFeatures = forms[i]:getGrammaticalFeatures() if #grammaticalFeatures == 1 and grammaticalFeatures[1] == item_id then return forms[i] end end return nil end local function getArticleLinkTemplate(frame, stmt_value) local template = '' local sitelink = getEntity(stmt_value):getSitelink(i18n['wikipedia']) if sitelink then template = frame:expandTemplate{ title=i18n['template_wikipedia'], args={sitelink} } end return template end local function getArticleLinks (frame, sense ) local article_links = '' for i, stmt in pairs(sense:getAllStatements('P5137')) do -- এই অর্থের জন্য আইটেম article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end for i, stmt in pairs(sense:getAllStatements('P9970')) do -- এই অর্থের জন্য বিধেয় article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id) end return article_links end -- @TODO: Generalise local function expandTemplateForProperty(frame, object, property, template) local lemmas = {} local n = 0 for _, stmt in pairs(object:getAllStatements(property)) do local lex = wb.lexeme.splitLexemeId(stmt.mainsnak.datavalue.value.id) if lex then lex = getEntity(lex) n = n + 1 lemmas[n] = lex:getLemma(lang_code) end end if not lang_code or n == 0 then return '' end -- Build args: first lang_code, then lemmas local args = {lang_code} for i = 1, n do args[#args + 1] = lemmas[i] end return frame:expandTemplate{ title = template, args = args } end local function getExternalLinks( entity ) -- T418639 local external_links = {} if entity.claims == nil then return external_links end local formatter_urls = require('মডিউল:আভিধানিক উপাত্ত/urls').formatter_urls for property_id, statements in pairs(entity.claims) do local formatter_url = formatter_urls[property_id] if formatter_url then local property_source = wb.getBestStatements(property_id, 'P9073') local source_name if next(property_source) then source_name = getLabel(property_source[1].mainsnak.datavalue.value.id) or property_source[1].mainsnak.datavalue.value.id else source_name = getLabel(property_id) or property_id end for i = 1, #statements do local stmt = statements[i] if stmt.mainsnak.datavalue then local formatted_link = ustring.gsub( ustring.gsub(formatter_url, '$1', stmt.mainsnak.datavalue.value), ' ', '+' ) table.insert(external_links, '[' .. formatted_link .. ' ' .. source_name .. ']') end end end end return external_links end p.getExternalLinks = getExternalLinks -- রেখে দিন যাতে ডিবাগিং সম্ভব হয় local function heading_level(text, level) return '<h' .. level .. '>' .. ' ' .. text .. ' ' .. '</h' .. level .. '>' end local function termSpan( term ) local text = term[1] local lang = term[2] local dir = mw_lang.new( lang ):getDir() local span = html.create( 'span' ) span:attr( 'lang', lang ) :attr( 'dir', dir ) :wikitext( text ) return tostring( span ) end local function getLemmata( current_lexeme ) local lemma_string = '' for i, rep in pairs(current_lexeme:getLemmas()) do if lemma_string == '' then lemma_string = termSpan(rep) else lemma_string = lemma_string .. '/' .. termSpan(rep) end end return lemma_string end local function getLinkedLemmata(lexeme, frame) local lemma_string = '' local lang for i, rep in pairs(lexeme:getLemmas()) do lang = getLexemeLanguageCode(lexeme) if lang == nil then lang = string.gsub(rep[2], '-%S+', '') end if lemma_string == '' then lemma_string = frame:expandTemplate{title='link', args={lang, rep[1]}} else lemma_string = lemma_string .. '/' .. frame:expandTemplate{title='link', args={lang, rep[1]}} end end return lemma_string end local function getExamples( current_lexeme, sense_id, references_seen ) local examples = html.create('dl') local example_text, example_lang, example_form, example_str for i, stmt in pairs(current_lexeme:getAllStatements('P5831')) do -- ব্যবহারের উদাহরণ if stmt.qualifiers and stmt.qualifiers['P6072'] and stmt.qualifiers['P6072'][1].datavalue.value.id == sense_id then -- বিষয়ে লেক্সিমের অর্থ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_strs = {} if stmt.qualifiers['P1810'] then table.insert(example_form_strs, stmt.qualifiers['P1810'][1].datavalue.value) elseif stmt.qualifiers['P5830'] then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ for _, rep in pairs(example_form:getRepresentations()) do table.insert(example_form_strs, rep[1]) end end for _, example_form_str in pairs(example_form_strs) do local new_example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") if new_example_text ~= example_text then example_str = termSpan({new_example_text, example_lang}) break end example_text = new_example_text end if example_str == nil then example_str = termSpan({example_text, example_lang}) end local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end end for i, stmt in pairs(wb.getAllStatements(sense_id, 'P5831')) do -- ব্যবহারের উদাহরণ example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>') example_lang = stmt.mainsnak.datavalue.value.language local example_form_str = nil if stmt.qualifiers then example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ if stmt.qualifiers['P1810'] then example_form_str = stmt.qualifiers['P1810'][1].datavalue.value end end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentation(i18n['content_lang_code']) end if example_form and example_form_str == nil then example_form_str = example_form:getRepresentations()[1][1] end if example_form_str then example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''") end example_str = termSpan({example_text, example_lang}) local reference_text = '' if stmt.references then for j, reference in pairs(stmt.references) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. got_reference[2] end end if example_str then examples:tag('dd'):wikitext("''" .. example_str .. "''") if reference_text ~= '' then examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text) end end end return { tostring(examples) , references_seen } end -- This calls frame:preprocess() instead of :callParserFunction() because the latter does not work for Wikifunctions function calls yet (see https://www.wikifunctions.org/wiki/Wikifunctions:Embedded_function_calls). local function callWikifunctionsFunction(args, frame) return frame:preprocess('{{#function:' .. args .. '}}') end local function getOneStringForProperty(object, property) local val local stmts = object:getAllStatements(property) if #stmts ~= 0 then val = stmts[1].mainsnak.datavalue.value end return val end local function getItemForSense(sense) for k, stmt in pairs(sense:getAllStatements('P5137')) do -- যদি 'এই অর্থের জন্য আইটেম' মানের বাংলা লেবেল থাকে local qid = stmt.mainsnak.datavalue.value.id return qid, getLabel(qid) end end local function getTranslations(frame, senses) if #senses == 0 then return nil end local all_translations = {} local wmlang, item, label for _, sense in pairs(senses) do local translation_set = {} local gloss = sense:getGloss(i18n['content_lang_code']) if lex_cat ~= 'Q34698' then item, label = getItemForSense(sense) end if item then wmlang = require("Module:wikimedia languages") end for _, stmt in pairs(sense:getAllStatements('P5972')) do local translation = stmt.mainsnak.datavalue.value.id local lexeme_id = wb.lexeme.splitLexemeId(translation) local trans_lexeme = getEntity(lexeme_id) local lang_name = getLabel(trans_lexeme:getLanguage()) local trans_code = getLexemeLanguageCode(trans_lexeme) if trans_code then table.insert(translation_set, lang_name .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={trans_code, getLinkedLemmata(trans_lexeme, frame) .. '<br/>'}}) else table.insert(translation_set, lang_name .. ': ' .. getLinkedLemmata(trans_lexeme, frame) .. '<br/>' .. i18n.trans_category(lang_name)) end end if item then for _, v in pairs(getEntity(item).labels) do if string.find(v.language, '-') == nil then -- @TODO: Implement deduplication of translation and get rid of this check local lang = wmlang.getByCode(v.language) local wikt = lang:getWiktionaryLanguage() if wikt:hasType('regular') then table.insert(translation_set, getLabel(wikt:getWikidataItem()) .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={wikt:getCode(), v.value .. '<br/>'}}) end end end end if #translation_set > 0 then local block = frame:expandTemplate{ title = i18n['template_trans-top'], args = { gloss or label } } block = block .. table.concat(translation_set, '\n') .. frame:expandTemplate{ title = i18n['template_trans-bottom'] } table.insert(all_translations, block) end end if #all_translations == 0 then return nil end return heading_level(i18n['heading_translation'], 4) .. ' \n' .. table.concat(all_translations, '\n') end local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. "File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n['edit_wikidata'] .. "|link=https://www.wikidata.org/entity/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n['edit_wikidata'] .. "]]</span>" return icon end local function getMeanings( frame, args, current_lexeme, senses, references_seen, language_name) if #senses == 0 then return {createicon(i18n['content_lang_code'], current_lexeme:getId()) .. "''" .. i18n['text_category_rfdef'] .. "''" .. i18n.tocatlink(i18n['category_rfdef']), references_seen} end local meanings = html.create( 'ol' ) local idlinkset = {} for i, sense in pairs(senses) do local item_label_gloss_parts = {} local gloss_text_parts = {} local main_gloss_text = frame:expandTemplate{ title=i18n['template_anchor'], args={sense:getId()} } local specifiers = {} for k, property_id in ipairs({'P6084', 'P6191', 'P9488'}) do -- অবস্থান যেখানে শব্দার্থ ব্যবহৃত, যে রীতিতে শব্দার্থ ব্যবহৃত হয়, যে ক্ষেত্রে ব্যবহৃত for _, stmt in pairs(sense:getAllStatements(property_id)) do local stmt_value = stmt.mainsnak.datavalue.value.id local reference_text = '' local refs = stmt.references if refs then for j, reference in pairs(refs) do table.insert(references_seen, reference.hash) local got_reference = getReference(reference.hash, reference) reference_text = reference_text .. '\n\n' .. frame:extensionTag('ref', got_reference[2]) end end local val = getLabel(stmt_value) table.insert(specifiers, val .. reference_text) if property_id == 'P9488' and lang_code ~= nil then table.insert(item_label_gloss_parts, i18n.tocatlink(lang_code .. ':' .. val)) end end end if #specifiers > 0 then main_gloss_text = main_gloss_text .. "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local gloss = sense:getGloss( i18n['content_lang_code'] ) if gloss then main_gloss_text = main_gloss_text .. wrapStringInWikilinks(gloss) if gloss:match('^প্রদত্ত%s*(%S-)%s*নাম$') then -- given names main_gloss_text = main_gloss_text .. i18n.tocatlink(language_name .. ' ' .. i18n['category_given_names']) end else local other_gloss_text = nil local other_gloss_lang = nil local stmt_value, item_label = getItemForSense(sense) if item_label then table.insert(item_label_gloss_parts, '[[:d:' .. stmt_value .. '|' .. item_label .. ']]') end if #item_label_gloss_parts > 0 then other_gloss_text = table.concat(item_label_gloss_parts, '; ') end if other_gloss_text == nil then for _, fallback_lang in ipairs(mw_lang.getFallbacksFor( i18n['content_lang_code'] )) do if sense:getGloss( fallback_lang ) then other_gloss_text, other_gloss_lang = sense:getGloss( fallback_lang ) end end if other_gloss_lang == nil then local glosses = sense:getGlosses() for _, gloss in pairs(glosses) do other_gloss_text = gloss[1] other_gloss_lang = gloss[2] break end end main_gloss_text = main_gloss_text .. other_gloss_text .. "<sup><em>" .. mw_lang.fetchLanguageName(other_gloss_lang, i18n['content_lang_code']) .. "</em></sup>" else main_gloss_text = main_gloss_text .. "''" .. other_gloss_text .. "''" end main_gloss_text = main_gloss_text .. i18n.tocatlink(i18n['category_rfdef_equivalent']) end local synonym = expandTemplateForProperty(frame, sense, 'P5973', i18n['template_synonym']) if synonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. synonym end local antonym = expandTemplateForProperty(frame, sense, 'P5974', i18n['template_antonym']) if antonym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. antonym end local hypernym = expandTemplateForProperty(frame, sense, 'P6593', i18n['template_hypernym']) if hypernym ~= '' then main_gloss_text = main_gloss_text .. ' <br/> ' .. hypernym end if lex_cat == 'Q1084' or lex_cat == 'Q147276' then -- noun or proper noun local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-noun']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym elseif lex_cat == 'Q34698' then local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-adj']) main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym end table.insert(gloss_text_parts, main_gloss_text .. createicon(i18n['content_lang_code'], sense:getId())) for _, stmt in pairs(sense:getAllStatements('P8394')) do -- টিপ্পনীর উদ্ধৃতি local gloss_quote = termSpan({stmt.mainsnak.datavalue.value.text, stmt.mainsnak.datavalue.value.language}) if stmt.references[1] then local got_reference = getReference ( stmt.references[1].hash, stmt.references[1] ) gloss_quote = '"' .. gloss_quote .. '" ' .. got_reference[2] end table.insert(references_seen, stmt.references[1].hash) table.insert(gloss_text_parts, frame:extensionTag('ref', gloss_quote)) end for _, stmt in pairs(sense:getAllStatements('P1343')) do -- বর্ণিত উৎস -- TODO: do away with making fake reference objects local fake_reference = { ['snaks'] = {} } fake_reference.snaks['P248'] = { [1] = stmt.mainsnak } local qualifiers_order = stmt['qualifiers-order'] if qualifiers_order then for _, k in ipairs(qualifiers_order) do fake_reference.snaks[k] = stmt.qualifiers[k] end end fake_reference.hash = mw.hash.hashValue('sha3-512', serializeTable(fake_reference)) table.insert(references_seen, fake_reference.hash) local got_reference = getReference(fake_reference.hash, fake_reference) if got_reference[1] == nil then table.insert(gloss_text_parts, frame:extensionTag('ref', got_reference[2], {name = fake_reference.hash})) else table.insert(gloss_text_parts, frame:extensionTag{name = 'ref', content='', args = {name = got_reference[1]}}) end end local first_sense_image = '' local sense_images = sense:getAllStatements('P18') if next(sense_images) then first_sense_image = sense_images[1].mainsnak.datavalue.value end if first_sense_image ~= '' then table.insert(gloss_text_parts, '[[চিত্র:' .. first_sense_image .. "|thumb|'''" .. getLemmata(current_lexeme) .. "'''—" .. main_gloss_text .. ']]') end local idlinks = getExternalLinks(sense) if #idlinks > 0 then local idlinktext = '<small>(' for _, idlink in pairs(idlinks) do idlinktext = idlinktext .. idlink .. '\n' end idlinktext = idlinktext .. ')</small>' table.insert(gloss_text_parts, idlinktext) table.insert(idlinkset, idlinks) end local externallinks = getArticleLinks(frame, sense) if externallinks ~= '' then table.insert(gloss_text_parts, externallinks) end local new_notes = {} local sense_keys = { sense:getId(), string.sub(sense:getId(), string.find(sense:getId(), '-')+1) } for _, v in ipairs(sense_keys) do if args[v] then table.insert(new_notes, args[v]) end end if #new_notes > 0 then for _, v in ipairs(new_notes) do if i == 1 then table.insert(gloss_text_parts, '<br/>' .. v) else table.insert(gloss_text_parts, v) end end end examples, references_seen = unpack(getExamples( current_lexeme, sense:getId(), references_seen )) local gloss_text = table.concat(gloss_text_parts, '\n') meanings:tag('li'):wikitext(gloss_text):wikitext(examples) end return {meanings, references_seen, idlinkset} end local function getPronunciationBaseForm() local base_form = nil -- (!) অন্য ভাষার শব্দের যদি অন্য রকম মূল ফর্ম থাকে সেগুলো এখানে নতুন if বিবৃতি দিয়ে যোগ করা যায়। if lang_code == 'bn' then if lex_cat == 'Q1084' then -- বিশেষ্য base_form = formWithSingleGrammaticalFeature( 'Q131105' ) -- কর্তৃকারক elseif lex_cat == 'Q24905' then -- ক্রিয়া base_form = formWithSingleGrammaticalFeature( 'Q1350145' ) -- ক্রিয়া বিশেষ্য end end if base_form == nil then for i, form in pairs(forms) do base_form = form break end end return base_form end local function getCombines( current_lexeme, frame ) local combines = '' local index_mappings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P5238')) do if stmt.qualifiers and stmt.qualifiers['P1545'] then -- ক্রম local current_index = tonumber(stmt.qualifiers['P1545'][1].datavalue.value) index_mappings[current_index] = stmt end end if #index_mappings ~= 0 then for i, stmt in ipairs(index_mappings) do if stmt.mainsnak.datavalue then local part_lexeme_id = stmt.mainsnak.datavalue.value.id local part_lexeme = getEntity(part_lexeme_id) local current_substring = getLinkedLemmata(part_lexeme, frame) local part_etymology = getEtymology(part_lexeme, frame, 'partial') if part_etymology ~= '' and part_etymology then current_substring = current_substring .. ' (← ' .. part_etymology .. ')' end if combines == '' then combines = current_substring else -- @TODO: This shoukd use the 'affix' and 'compound' templates instead. combines = combines .. ' + ' .. current_substring end end end end return combines end function getRoots( current_lexeme, frame ) local stmts = current_lexeme:getAllStatements('P5920') if #stmts == 0 then return '', '', '' end local root_lexeme = getEntity(stmts[1].mainsnak.datavalue.value.id) return getLexemeLanguageCode(root_lexeme), '√' .. getLinkedLemmata(root_lexeme, frame), root_lexeme:getLemma('ar') end function getEtymology( current_lexeme, frame, mode ) -- @TODO: Fix the etymology chains that are not possible to render local etymology = '' local current_combines = getCombines(current_lexeme, frame) local root_lang, current_roots, root_str = getRoots(current_lexeme, frame) if mode ~= 'partial' and root_str then --frame:expandTemplate{title=i18n['template_root'], args={lang_code, root_lang, root_str}} end local stmts = current_lexeme:getAllStatements('P5191') local new_etymology_string if #stmts == 0 then if current_roots ~= '' and current_combines ~= '' and current_roots then return current_roots .. '<br/>(' .. current_combines .. ')' elseif current_roots ~= '' then if lang_code == 'ar' and mode ~= 'partial' and root_str ~= matched_lemma then return frame:expandTemplate{title=i18n['template_ar-rootbox'], args={root_str}} else return current_roots end else return current_combines end end local origin_lexeme_string for i, stmt in pairs(stmts) do local origin_lexeme_dv = stmt.mainsnak.datavalue -- If this is nil, the origin lexeme is not known. if origin_lexeme_dv then local origin_lexeme = getEntity(origin_lexeme_dv.value.id) local origin_lexeme_lang = getLabel(origin_lexeme:getLanguage()) local sitelink = i18n.wplink(origin_lexeme:getLanguage(), origin_lexeme_lang, wb) if sitelink ~= '' then origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. sitelink .. ')' else origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. origin_lexeme_lang .. ')' end if stmt.qualifiers and stmt.qualifiers['P5886'] then local mode_of_derivation = stmt.qualifiers['P5886'][1].datavalue.value.id if mode_of_derivation == 'Q1345001' then -- @TODO: Add support for showing gender origin_lexeme_string = frame:expandTemplate{title=i18n['template_borrowed'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_borrowing'] elseif mode_of_derivation == 'Q845079' then origin_lexeme_string = ustring.gsub(i18n['etymology_learned_borrowing'], '$1', origin_lexeme_string) elseif mode_of_derivation == 'Q56611986' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_inherited'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_inheritance'] elseif mode_of_derivation == 'Q189743' then origin_lexeme_string = frame:expandTemplate{title=i18n['template_ellipsis'], args={lang_code, getLemmata(origin_lexeme)}} .. ' ' .. i18n['etymology_ellipsis'] end end local origin_origin = getEtymology(origin_lexeme, frame) if origin_origin ~= '' and origin_origin then new_etymology_string = origin_lexeme_string .. ' ← ' .. origin_origin else new_etymology_string = origin_lexeme_string end end if etymology == '' then etymology = new_etymology_string elseif origin_lexeme_string and etymology then etymology = etymology .. ' ' .. origin_lexeme_string elseif origin_lexeme_string and etymology == nil then etymology = origin_lexeme_string end end if current_roots ~= '' and etymology and current_roots then etymology = etymology .. ' ' .. current_roots elseif current_roots ~= '' and etymology == nil then etymology = current_roots end if current_combines ~= '' and etymology then etymology = etymology .. '<br/>(' .. current_combines .. ')' end return etymology end local function pronunciationBlock(block, value) return '* ' .. i18n['text_' .. block] .. ' ' .. value end local function getPronunciation(frame, current_lexeme, lang_name) local pronunciations = {} local base_form = getPronunciationBaseForm() local iast, iso15919_transcription, itrans, xsampa if base_form then for i, stmt in pairs(base_form:getAllStatements('P443')) do -- উচ্চারণের অডিও local pronunciation_file = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন local qual = stmt.qualifiers[property_id] if qual then for _, qual in pairs(qual) do local stmt_value = qual.datavalue.value.id table.insert(specifiers, getLabel(stmt_value)) end end end end if #specifiers > 0 then specifier_text = table.concat(specifiers, "'', ''") end local audio_text if specifier_text ~= '' then audio_text = i18n['text_audio'] .. ' (' .. specifier_text .. ')' else audio_text = i18n['text_audio'] end table.insert(pronunciations, '* ' .. frame:expandTemplate{ title= i18n['template_audio'], args = {lang_name, pronunciation_file, audio_text} }) iso15919_transcription = getOneStringForProperty(base_form, 'P5825') -- আইএসও ১৫৯১৯ প্রতিলিপিকরণ itrans = getOneStringForProperty(base_form, 'P8881') -- ITRANS iast = getOneStringForProperty(base_form, 'P7581') -- আইএএসটি প্রতিলিপিকরণ xsampa = getOneStringForProperty(base_form, 'P2859') end local ipa_transcription = base_form:getAllStatements('P898') -- আধ্বব প্রতিলিপিকরণ -- @TODO: অডিও ও প্রতিলিপিকরণ দুটোই থাকলে একটার ঠিক পরেই আরেকটা দেখানো উচিত if #ipa_transcription ~= 0 then for i, stmt in pairs(ipa_transcription) do local ipa_text = stmt.mainsnak.datavalue.value local specifier_text = '' local specifiers = {} if stmt.qualifiers then for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন for l, qual in ipairs(stmt.qualifiers[property_id]) do table.insert(specifiers, getLabel( qual.datavalue.value.id )) end end end if #specifiers > 0 then specifier_text = "(''" .. table.concat(specifiers, "'', ''") .. "'') " end local syllable_count if lang_code == 'tr' then syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z10029|' .. ipa_text, frame) else syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z30837|' .. ipa_text, frame) end table.insert(pronunciations, '* ' .. specifier_text .. frame:expandTemplate{ title= i18n['template_ipa'], args = {lang_name, ipa_text} } .. '\n* ' .. syllable_count) end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. elseif lang_code == 'bn' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='bn-IPA', }) elseif lang_code == 'ar' then local lemma = current_lexeme:getLemma('ar') table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ar-IPA', args={lemma} }) elseif lang_code == 'en' then table.insert(pronunciations, '* ' .. i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z29940|' .. matched_lemma, frame)) elseif lang_code == 'pl' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='pl-IPA', }) elseif lang_code == 'ko' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ko-IPA', }) elseif lang_code == 'fi' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fi-IPA', }) elseif lang_code == 'ta' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='ta-IPA', }) elseif lang_code == 'fax' then table.insert(pronunciations, '* ' .. frame:expandTemplate{ title='fax-pron', }) end end -- {{আধ্বব|en|/ˈɪntəvjuː/}} if iso15919_transcription then table.insert(pronunciations, pronunciationBlock('iso15919', iso15919_transcription)) end if itrans then table.insert(pronunciations, pronunciationBlock('itrans', itrans)) end if iast then table.insert(pronunciations, pronunciationBlock('iast', iast)) end if xsampa then table.insert(pronunciations, pronunciationBlock('xsampa', xsampa)) end return table.concat(pronunciations, '\n') end local function getAlternativeSpellings( current_lexeme, frame ) local alt_spellings = {} for i, stmt in pairs(current_lexeme:getAllStatements('P11577')) do -- বিকল্প বানান if stmt.mainsnak.datavalue then table.insert(alt_spellings, '* ' .. frame:expandTemplate{title=i18n['template_alter'], args={lang_code, getLemmata(getEntity(stmt.mainsnak.datavalue.value.id), frame)}}) end end return table.concat(alt_spellings, '\n') end function get_any_notes(sections, args, keys) local notes = {} for i, v in ipairs(keys) do if args[v] then table.insert(notes, args[v]) end end return notes end function add_specific_notes(sections, notes) for i, v in ipairs(notes) do table.insert(sections, v) end end local function add_any_notes(sections, args, keys, heading) for i, v in ipairs(keys) do if args[v] then if heading then table.insert(sections, heading) end table.insert(sections, args[v]) end end end local function getMatchingLemmaForPageTitle(lexeme, title) local lemmas = lexeme:getLemmas() local match for _, lemma_entry in ipairs(lemmas) do local lemma = lemma_entry[1] if lemma == title then match = lemma break end end if match == nil then if lang_code == 'ar' then match = lexeme:getLemma('ar') elseif lang_code == 'rhg' then match = lexeme:getLemma('rhg-arab') elseif lang_id == 'Q11051ur' then match = lexeme:getLemma('ur') elseif lang_code == 'arz' then match = lexeme:getLemma('arz') end end return match end local function buildLanguageAgnosticInflectionTable() local has_image = false local form_images = {} for i, form in ipairs(forms) do local form_image = form:getAllStatements('P7407') if next(form_image) then form_images[i] = form_image[1].mainsnak.datavalue.value has_image = true end end local table_class = "wikitable mw-collapsible sortable" if not has_image then table_class = table_class .. " mw-collapsed" end local text = "{| class='" .. table_class .. "' style='border:solid 1px rgb(80%,80%,100%); text-align:center;'\n" text = text .. "|+ " .. i18n['heading_inflection_table'] .. "\n" text = text .. "|- \n" text = text .. "! " .. i18n['heading_form'] .. " !! " .. i18n['heading_grammatical_features'] if has_image then text = text .. " !! " .. (i18n['heading_image']) end text = text .. " \n" for i, form in ipairs(forms) do local rep = form:getRepresentations() local feat = form:getGrammaticalFeatures() local rep_text = "" for j, r in pairs(rep) do if rep_text == "" then rep_text = r[1] else rep_text = rep_text .. " / " .. r[1] end end local feat_text = "" if feat then for j, f in ipairs(feat) do local label = getLabel(f) or f if feat_text == "" then feat_text = label else feat_text = feat_text .. ", " .. label end end end text = text .. "|-\n" text = text .. "| " .. (rep_text ~= "" and rep_text or "—") text = text .. " || " .. (feat_text ~= "" and feat_text or "—") if has_image then local image_cell = "—" if form_images[i] then image_cell = "[[চিত্র:" .. form_images[i] .. "|50px]]" end text = text .. " || " .. image_cell end text = text .. "\n" end text = text .. "|}" return text end function p.all(frame) local args = getArgs(frame) local lexeme_id = args[1] local current_lexeme = getEntity(lexeme_id) local current_language = current_lexeme:getLanguage() lang_id = current_language local senses = current_lexeme:getSenses() local add_heading = true forms = current_lexeme:getForms() if args[2] then local val = mw.text.trim(tostring(args[2])) if val == "false" or val == "0" or val == "না" then add_heading = false end end local references_seen = {} local sections = {} local title = mw.title.getCurrentTitle().text local lang_category = getLanguageForCategories(title, true) local lang_name = getLabel(lang_category) if add_heading == true then local lang_heading = heading_level(lang_name, 2) table.insert(sections, lang_heading) end lang_code = getLexemeLanguageCode(current_lexeme) matched_lemma = getMatchingLemmaForPageTitle(current_lexeme, title) lex_cat = current_lexeme:getLexicalCategory() local cat = i18n.lang_category(getLabel(lex_cat), lang_name) local lex_cat_template, ety_added, pron_added, alt_added if cat then table.insert(sections, heading_level(getLabel(lex_cat) .. cat .. frame:expandTemplate{ title = i18n['template_anchor'], args = { lexeme_id } }, 3)) table.insert(sections, frame:expandTemplate{ title= i18n['template_lexeme'], args = {lexeme_id} }) add_any_notes(sections, args, i18n['manual_category']) local etymology = getEtymology( current_lexeme, frame ) if etymology ~= '' and etymology then table.insert(sections, heading_level(i18n['heading_etymology'], 4)) table.insert(sections, tostring(etymology)) ety_added = true end if ety_added then add_any_notes(sections, args, i18n['manual_etymology']) else add_any_notes(sections, args, i18n['manual_etymology'], heading_level(i18n['heading_etymology'], 4)) end local pronunciation = getPronunciation( frame, current_lexeme, lang_name) if pronunciation ~= '' then table.insert(sections, heading_level(i18n['heading_pronunciation'], 4)) table.insert(sections, tostring(pronunciation)) pron_added = true end if pron_added then add_any_notes(sections, args, i18n['manual_pronunciation']) else add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level(i18n['heading_pronunciation'], 4)) end local alternative_spellings = getAlternativeSpellings(current_lexeme, frame) if alternative_spellings ~= '' then table.insert(sections, heading_level(i18n['heading_alternative_spellings'], 4)) table.insert(sections, alternative_spellings) alt_added = true end if alt_added then add_any_notes(sections, args, i18n['manual_alternative_spellings']) else add_any_notes(sections, args, i18n['manual_alternative_spellings'], heading_level( i18n['heading_alternative_spellings'], 4)) end if lang_code and lang_code ~= 'ksy' and lang_code ~= 'rkt' then -- Skip for Kharia Thar, Rangpuri if lex_cat == 'Q34698' then -- বিশেষণ if lang_code == 'en' or lang_code == 'bn' then if #forms <= 1 then lex_cat_template = frame:expandTemplate{title= lang_code .. '-বিশেষণ'} end else lex_cat_template = safeExpand(frame, lang_code .. '-adj') if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. '-বিশেষণ') end end elseif lex_cat == 'Q1084' then -- @TODO: Also check for plural forms local gender local stmts = current_lexeme:getAllStatements('P5185') -- ব্যাকরণগত লিঙ্গ if #stmts ~= 0 and stmts[1].mainsnak.datavalue then if #stmts == 1 then local gender_qid = stmts[1].mainsnak.datavalue.value.id if gender_qid == 'Q499327' then gender = 'm' elseif gender_qid == 'Q1775415' then gender = 'f' elseif gender_qid == 'Q1775461' then gender = 'n' elseif gender_qid == 'Q1305037' then gender = 'c' end end else for i, stmt in pairs(stmts) do local qid = stmts[i].mainsnak.datavalue if qid then qid = qid.value.id end if qid == 'Q499327' then gender = gender .. 'm' elseif qid == 'Q1775415' then gender = gender .. 'f' end end end -- The following checks are ordered based on which one is expected to be true in a higher number of cases. if current_language == 'Q13955' then if matched_lemma then lex_cat_template = safeExpand(frame, 'ar-noun', {matched_lemma,gender}) else lex_cat_template = frame:expandTemplate{title='ar-noun', args={nil,gender}} end elseif current_language == 'Q29919' then lex_cat_template = frame:expandTemplate{title='arz-noun', args={g=gender}} elseif current_language == 'Q397' then if matched_lemma then lex_cat_template = frame:expandTemplate{title='la-noun', args={matched_lemma,g=gender}} end elseif current_language == 'Q11059' then lex_cat_template = frame:expandTemplate{title='sa-noun', args={g=gender}} elseif current_language ~= 'Q1860' then -- These templates require the gender to be passed as the 1st argument. lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix'], {gender}) if not lex_cat_template then lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix_fallback'], {gender}) end end end end -- elseif lex_cat == 'Q147276' then -- lex_cat_template = safeExpand(frame, lang_code .. '-proper noun', {gender}) -- if not lex_cat_template then -- lex_cat_template = safeExpand(frame, lang_code .. '-নামবাচক বিশেষ্য', {gender}) -- end end if lex_cat_template then table.insert(sections, lex_cat_template) else if matched_lemma then table.insert(sections, heading_level(matched_lemma, 4)) else table.insert(sections, i18n.tocatlink(i18n['category_no_matching_lemma'])) end end local meanings, references_seen, sense_extlinks = unpack(getMeanings( frame, args, current_lexeme, senses, references_seen, lang_name)) table.insert(sections, tostring(meanings)) add_any_notes(sections, args, i18n['manual_meaning']) local instance_of = current_lexeme:getAllStatements('P31') -- সত্ত্বার ধরন if #instance_of ~= 0 then local instance_of_entity = instance_of[1].mainsnak.datavalue.value.id if instance_of_entity == 'Q376431' then -- বর্ণের নাম table.insert(sections, i18n.tocatlink(lang_code .. ':রং')) else table.insert(sections, heading_level(i18n['heading_special_info'], 4) .. i18n['text_instance_of'] .. ' ' .. getLabel(instance_of_entity) .. i18n['text_sentence_terminator']) end end if lex_cat ~= 'Q9788' then local translations = getTranslations(frame, senses) if translations then table.insert(sections, translations) end end -- (!) বিশেষ ভাষার বিভক্তির সারণি যদি থাকে সেগুলো এখানে নতুন if বিবৃতি যোগ করা যায়। if next(forms) then if current_language == 'Q9610' then -- বাংলা if lex_cat == 'Q24905' then local conjTable = require('মডিউল:আভিধানিক উপাত্ত/Q9610').getConjTable(frame, forms) table.insert(sections, conjTable) elseif lex_cat == 'Q1084' then table.insert(sections, callWikifunctionsFunction('Z33243|' .. lexeme_id .. '|', frame)) else if #forms > 1 then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end --elseif current_language == 'Q13955' then -- আরবি -- if lex_cat == 'Q1084' then -- table.insert(sections, frame:expandTemplate{title='ar-decl-noun', args={lemma}}) -- end elseif current_language == 'Q188' and lex_cat == 'Q1084' then -- জার্মান table.insert(sections, callWikifunctionsFunction('Z28602|' .. lexeme_id .. '|', frame)) --elseif current_language == 'Q397' and lex_cat == 'Q1084' then -- লাতিন -- table.insert(sections, callWikifunctionsFunction('Z26333|' .. matched_lemma .. '|', frame)) elseif current_language == 'Q150' and lex_cat == 'Q34698' then -- ফরাসি table.insert(sections, callWikifunctionsFunction('Z36435|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q652' and lex_cat == 'Q34698' then -- ইতালীয় table.insert(sections, callWikifunctionsFunction('Z36407|' .. lexeme_id .. '|', frame)) elseif current_language == 'Q809' or current_language == 'Q9058' or current_language == 'Q6654' or current_language == 'Q9056' then -- পোলীয়, স্লোভাক, ক্রোয়েশীয়, চেক table.insert(sections, callWikifunctionsFunction('Z36421|' .. lexeme_id .. '|', frame)) elseif #forms > 1 and current_language ~= 'Q150' then table.insert(sections, buildLanguageAgnosticInflectionTable()) end end if lex_cat == 'Q134830' then table.insert(sections, frame:expandTemplate{title='prefixsee', args={lang_code}}) elseif lex_cat == 'Q102047' then table.insert(sections, frame:expandTemplate{title='suffixsee', args={lang_code}}) -- elseif lex_cat == 'Q111029' then -- table.insert(sections, frame:expandTemplate{title='rootsee', args={'+', lang_code, matched_lemma}}) end local reference_notes = get_any_notes(sections, args, i18n['manual_reference']) if #references_seen > 0 or #reference_notes > 0 then table.insert(sections, heading_level(i18n['heading_references'], 4)) table.insert(sections, frame:extensionTag('references')) add_specific_notes(sections, reference_notes) end local external_link_table = getExternalLinks ( current_lexeme ) if #external_link_table > 0 then local external_links = '* ' .. table.concat(external_link_table, '\n* ') table.insert(sections, heading_level(i18n['heading_external_links'], 4)) table.insert(sections, external_links) end add_any_notes(sections, args, i18n['manual_external_link']) if #references_seen == 0 and #reference_notes == 0 and sense_extlinks and #sense_extlinks == 0 and #external_link_table == 0 and #get_any_notes(sections, args, i18n['manual_external_link']) == 0 then table.insert(sections, i18n.rfref_category(lang_name)) end return table.concat(sections,"\n\n") end return p ec354dabt85iuera2cx49x62o8d2bti অকল 0 52883 512368 455681 2026-06-30T18:05:37Z Salil Kumar Mukherjee 7406 অনুবাদ 512368 wikitext text/x-wiki ==অসমীয়া== ===বিকল্প বানান=== * {{alter|as|একল}} * {{alter|as|আক্লা||কামরূপী}} ===ব্যুৎপত্তি=== {{inh+|as|inc-oas|অকল}}। {{m|inc-oas|একল}}। এর উৎস {{উত্তরাধিকারী|as|inc-mgd|𑀏𑀓𑁆𑀓𑀮𑁆𑀮}}। এর উৎস {{উত্তরাধিকারী|as|sa|एक्कल|এক্কল}}। একই উৎসজাত: {{সমোদ্ভব|bn|একলা}}। {{সমোদ্ভব|syl|ꠄꠇꠟꠣ}}। {{সমোদ্ভব|hi|अकेला}}। ===উচ্চারণ=== * {{as-IPA}} ===বিশেষণ=== {{as-adj}} # [[only]] #: {{uxi|as|'''অকল''' [[দুই]] [[মিনিট]]|'''only''' two minutes}} ===ক্রিয়াবিশেষণ=== {{as-adv}} # [[only]], [[just]] #: {{উদা|as|[[মোক]] '''অকল''' [[আৰু]] [[দু-|দু]][[-বিধ|বিধ]] [[ফল]] [[লগা|লাগে]]।|I '''only''' need two more types of fruits.}} ====সমার্থক শব্দ==== {{col2|as|মাথোঁ|মাথোন|কেৱল|মাত্ৰ|মুঠেই|একমাত্ৰ}} ====উদ্ভূত শব্দ==== {{col2|as|অকলে|অকলশৰীয়া|অকলকতীয়া}} ---- =={{ভাষা|bn}}== ===বিকল্প বানান=== {{alter|bn|আকল|আক্কল|আক্কেল}} ===ব্যুৎপত্তি=== {{bor+|bn|ar|عقل}}।[[বাংলা]] {{l|bn|আকল}}। ===উচ্চারণ=== * {{আধ্বব|bn|/ɔ.kɔl/}} ===বিশেষ্য=== {{bn-বিশেষ্য}} # [[প্রজ্ঞা]], [[knowledge]] ===সমার্থক শব্দ=== * {{l|bn|বুদ্ধি}} 3qysh9xdhavffwb0hhqoxtquj6wxfgs 512369 512368 2026-06-30T18:06:30Z Salil Kumar Mukherjee 7406 অনুবাদ 512369 wikitext text/x-wiki ==অসমীয়া== ===বিকল্প বানান=== * {{alter|as|একল}} * {{alter|as|আক্লা||কামরূপী}} ===ব্যুৎপত্তি=== {{inh+|as|inc-oas|অকল}}। {{m|inc-oas|একল}}। এর উৎস {{উত্তরাধিকারী|as|inc-mgd|𑀏𑀓𑁆𑀓𑀮𑁆𑀮}}। এর উৎস {{উত্তরাধিকারী|as|sa|एक्कल|এক্কল}}। একই উৎসজাত: {{সমোদ্ভব|bn|একলা}}। {{সমোদ্ভব|syl|ꠄꠇꠟꠣ}}। {{সমোদ্ভব|hi|अकेला}}। ===উচ্চারণ=== * {{as-IPA}} ===বিশেষণ=== {{as-adj}} # [[only]] #: {{uxi|as|'''অকল''' [[দুই]] [[মিনিট]]|'''only''' two minutes}} ===ক্রিয়াবিশেষণ=== {{as-adv}} # [[only]], [[just]] #: {{উদা|as|[[মোক]] '''অকল''' [[আৰু]] [[দু-|দু]][[-বিধ|বিধ]] [[ফল]] [[লগা|লাগে]]।|I '''only''' need two more types of fruits.}} ====সমার্থক শব্দ==== {{col2|as|মাথোঁ|মাথোন|কেৱল|মাত্ৰ|মুঠেই|একমাত্ৰ}} ====উদ্ভূত শব্দ==== {{col2|as|অকলে|অকলশৰীয়া|অকলকতীয়া}} ---- =={{ভাষা|bn}}== ===বিকল্প বানান=== {{alter|bn|আকল|আক্কল|আক্কেল}} ===ব্যুৎপত্তি=== {{bor+|bn|ar|عقل}}।[[বাংলা]] {{l|bn|আকল}}। ===উচ্চারণ=== * {{আধ্বব|bn|/ɔ.kɔl/}} ===বিশেষ্য=== {{bn-বিশেষ্য}} # [[প্রজ্ঞা]], [[জ্ঞান]] ===সমার্থক শব্দ=== * {{l|bn|বুদ্ধি}} cqar810zq3uviskjkirh0s2p0bf9miy মানা 0 58432 512392 458631 2026-07-01T05:21:05Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L310428-এর সাথে সংযোগ তৈরি করছি 512392 wikitext text/x-wiki {{আরও দেখুন|মানাহ}} ==অসমীয়া== ===উচ্চারণ=== * {{as-IPA}} ===ব্যুৎপত্তি ১=== {{as-verb-c|মান}} {{inh+|as|sa|मन्यते|মন্যতে|t=to think, to honour}}; এর উৎস {{inh|as|ine-pro|*mn̥yo-}}; এর উৎস {{m|ine-pro|*men-||to think}}। ====বিকল্প রূপ==== * {{alter|as|মনা||পূর্বাঞ্চলীয় প্রমিত}} ====বিশেষণ==== {{as-adj}} {{tlb|as|মধ্যাঞ্চলীয় প্রমিত}} # [[agreed]], [[accepted]] # [[followed]], [[obeyed]] ====ক্রিয়া==== {{as-verb|t}} {{tlb|as|মধ্যাঞ্চলীয় প্রমিত}} # [[agree]], [[accept]], [[accord]], [[accede]], [[concede]], [[acquiesce]], [[stand]] #: {{ux|as|[[সি]] [[মোৰ]] [[কথা]][[-টো|টো]] '''নামানিলে'''।|He did not '''agree''' with me.}} # [[follow]], [[obey]], [[abide]], [[adhere]], [[comply]], [[conform]] #: {{ux|as|[[মই]] [[তেখেত|তেখেতক]] [[খুব]] '''মানোঁ'''।|I '''adhere''' her very much.}} #: {{ux|as|[[মই]] [[নিয়ম|নিয়݁ম]]ܿ[[-বোৰ|বোৰ]] '''মানি''' [[চলা|চলোঁ]]।|I '''follow''' the rules.}} =====ধাতুরূপ===== {{as-conj-cvc-ct|মান|man}} =====সম্পর্কিত শব্দ===== * {{l|as|মান}} ===ব্যুৎপত্তি ২=== {{bor+|as|fa|-}}; এর উৎস {{der|as|ar|-}}। ====বিশেষ্য==== {{as-noun}} # [[prohibition]], [[hindrance]] =====শব্দরূপ===== {{as-noun-টো|mana|ই|i}} =====উদ্ভূত শব্দ===== {{der2|as|মানা কৰা}} =====সম্পর্কিত শব্দ===== {{rel2|as|মানাহি}} ---- =={{langname|bn}}== === ব্যুৎপত্তি === {{inh+|bn|inc-mgd}}; from {{inh|bn|sa|मन्यते|মন্যতে|t=to think, to honour}}; এর উৎস {{inh|bn|ine-pro|*mn̥yo-}}; এর উৎস {{m|ine-pro|*men-||to think}}। একই উৎসজাত: {{cog|as|মানা}}। === উচ্চারণ === * {{IPA|bn|/ma.na/|[ˈma.na]}} ** {{অডিও|bn|LL-Q9610 (ben)-Titodutta-মানা.wav|অডিও}} * {{rhymes|bn|ana|s=2}} * {{hyphenation|bn|মা|না}} === ক্রিয়া === {{bn-ক্রিয়া}} # [[accept]], [[admit]] #: {{ux|bn|শেষে আমি হার '''মেনে''' বাড়ি ফিরলাম।|In the end, I '''admitted''' defeat and returned home.|subst=ফিরলাম/ফির্লাম্}} # [[obey]], [[observe]], [[follow]] #: {{ux|bn|আমি নিয়ম '''মেনে''' গাড়ি চালাই।|I '''follow''' the rules when I drive.|lit=I, [the] rules '''having followed''', [the] car drive.}} ====ধাতুরূপ==== {{bn-conj-cac-cec|মান|man|মেন|men}} {{লে|L310428|না}} ==পালি== ===বিকল্প রূপ=== {{pi-alt|Latn=mānā}} ===বিশেষ্য=== {{head|pi|বিশেষ্যের রূপ}} # {{pi-sc||mānā}}, ''which is'' {{pi-nr-inflection of|মান||abl|s|;|nom//voc|p}} kzki27eslghg19634vwxrvl39escyel হরফ 0 59243 512390 460566 2026-07-01T05:17:50Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L303436-এর সাথে সংযোগ তৈরি করছি 512390 wikitext text/x-wiki [[বিষয়শ্রেণী:bn:ভাষাতত্ত্ব]] {{লে|L303436}} ====উদ্ভূত শব্দ==== *{{l|bn|হরফ ঢালাই}} *{{l|bn|হরফ ঢালাইয়ের কারখানা}} js4sfnlr2s4apfr10l1vit67ccikvu7 அங்காடி 0 74534 512373 362686 2026-07-01T04:30:58Z Redmin 6857 [[User:Sriveenkat]] 512373 wikitext text/x-wiki {{লে|L1209587|L1209587-S1=#* {{ux|ta|அங்காடி விலையை அதிர அடிக்காதே.{{audio3|file=LL-Q5885 (tam)-Sriveenkat-அங்காடி விலையை அதிர அடிக்காதே.wav}}|t=Do not beat down the market price.}} }} 9wrff1mu92jlzyr1vzpryuxndu45xt0 512374 512373 2026-07-01T04:32:41Z Redmin 6857 512374 wikitext text/x-wiki {{লে|L1209587|L1209587-S1={{ux|ta|அங்காடி விலையை அதிர அடிக்காதே.{{audio3|file=LL-Q5885 (tam)-Sriveenkat-அங்காடி விலையை அதிர அடிக்காதே.wav}}|t=Do not beat down the market price.}} }} 3tmsljfxgsrrk03kju2p3dv9w7ozyii கடை 0 74535 512371 362859 2026-07-01T04:28:21Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1310261-এর সাথে সংযোগ তৈরি করছি 512371 wikitext text/x-wiki {{লে|L1310261}} 7u6a0secnj8gp3i9bx1zptxip0iqs4f ছুঁচ 0 75799 512382 337467 2026-07-01T04:58:38Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L408626-এর সাথে সংযোগ তৈরি করছি 512382 wikitext text/x-wiki {{লে|L408626|উচ্চারণ= * {{IPA|bn|/cʰũc/}} * {{বাংলা উচ্চারণ|ছুঁচ্}}|L408626-S1={{syn|bn|সূচি}}|ব্যুৎপত্তি= {{inh+|bn|sa|सूची}}।|বিকল্প রূপ= * {{alter|bn|সুচ}} }} khz96vs8vhtcqk5a6z7ynn49nqnhvu4 ছুঁচো 0 91580 512378 475889 2026-07-01T04:39:30Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L408624-এর সাথে সংযোগ তৈরি করছি 512378 wikitext text/x-wiki {{লে|L408624|meaning=# [[খুব]] [[ছোটো]] [[চোখ]] [[সুচালো]] [[মুখ]] ও [[ঘন]] [[কোমল]] লোমাবৃত [[গাঢ়]] [[ধূসর]] বর্ণের [[স্তন্যপায়ী]] গায়ে দুর্গন্ধযুক্ত [[নিশাচর]] ইঁদুরজাতীয় [[প্রাণী]] যার সামনের পা [[দুটি]] অপেক্ষাকৃত [[ছোটো]] ও [[শক্তিশালী]], [[ছুঁচা]], [[ছুছুন্দর]], গন্ধমুষিক। (অলংকাররূপে) [[নীচ]] স্বভাবের [[লোক]]।}} d83oqtx4w8kxkqbv68hh1f8uzsmsmpi হরকত 0 117871 512396 500061 2026-07-01T06:22:24Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571097-এর সাথে সংযোগ তৈরি করছি 512396 wikitext text/x-wiki == {{langname|bn}} == === উচ্চারণ === * {{bn-IPA}} === বিশেষ্য === {{bn-বিশেষ্য}} # বাধা, [[বিঘ্ন]]। [[ক্ষতি]]। {{লে|L1571097|না}} l8nky2n8fpnsp710qsrpwn6vuranb1u পসার 0 121222 512377 269138 2026-07-01T04:38:55Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571004-এর সাথে সংযোগ তৈরি করছি 512377 wikitext text/x-wiki == {{langname|bn}} == ===উচ্চারণ=== * পশার্ ===ব্যুৎপত্তি ১=== *[[হিন্দি]] পঁসর থেকে। === বিশেষ্য === {{বিশেষ্য|bn}} #[[দোকান]] #পণ্যসামগ্রীর [[আধার]] #পণ্যসম্ভার {{লে|L1571004|না|meaning=#[[ব্যবসায়|ব্যবসায়ে]] [[উন্নতি]] #[[ক্রেতা]] [[মক্কেল]] প্রভৃতির [[আধিক্য]]}} pexog30js8g75capv5nmixbju4uyy1p পশ্চাদগতি 0 131854 512376 357184 2026-07-01T04:36:33Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571006-এর সাথে সংযোগ তৈরি করছি 512376 wikitext text/x-wiki {{লে|L1571006|meaning=#প্রত্যাবৃত্তি; পশ্চাদপসরণ|উচ্চারণ= *পোশ্চাদগোতি|ব্যুৎপত্তি= *[[সংস্কৃত]]জাত # পিছনে যাওয়া, পিছু হটা।}} p71i525cwbcufzts44mvk7dtdmetvv9 মডিউল:আভিধানিক উপাত্ত/i18n 828 148710 512379 512287 2026-07-01T04:46:22Z Redmin 6857 +alter 512379 Scribunto text/plain local p = {} p['fallback_wikipedia'] = 'enwiki' p['content_lang_name'] = 'বাংলা' p['content_lang_code'] = 'bn' -- The proper way to do this would be to use mw.ustring.gsub(mw.site.wikiId, 'wiktionary', '') but that does mean wasting compute so instead, just use the 'cached' config which isn't really labour-intensive. p['wikipedia'] = 'bnwiki' -- p['content_lang_code'] .. 'wiki' p['heading_etymology'] = 'ব্যুৎপত্তি' p['heading_pronunciation'] = 'উচ্চারণ' p['heading_translation'] = 'অনুবাদ' p['heading_references'] = 'তথ্যসূত্র' p['heading_external_links'] = 'বহিঃসংযোগ' p['heading_alternative_spellings'] = 'বিকল্প বানান' p['heading_inflection_table'] = 'বিভক্তির সারণী' p['heading_form'] = 'রূপ' p['heading_grammatical_features'] = 'ব্যাকরণিক বৈশিষ্ট্য' p['heading_image'] = 'চিত্র' p['heading_alternative_script'] = 'বিকল্প রূপ' p['text_instance_of'] = 'একটি' p['text_audio'] = 'অডিও' p['text_iso15919'] = '[[w:আইএসও ১৫৯১৯|আইএসও ১৫৯১৯]]:' p['text_iast'] = '[[w:সংস্কৃত লিপ্যন্তরের আন্তর্জাতিক বর্ণমালা|সলিআব]]:' p['text_itrans'] = '[[w:en:ITRANS|ITRANS]]:' p['text_xsampa'] = '[[w:এক্স-সাম্পা|এক্স-সাম্পা]]:' p['text_syllable_count'] = '[[w:অক্ষর (সিলেবল)|অক্ষর]] সংখ্যা:' p['template_lexeme'] = 'উইকিউপাত্ত লেক্সিম' -- Q81739987 p['template_wikipedia'] = 'উইকিপিডিয়া' -- Q6275256 p['template_audio'] = 'অডিও ভাষার নাম' -- Q138620346 p['template_anchor'] = 'anchor' -- Q5412976 p['template_rfdef'] = 'rfdef' -- Q30733154 p['template_ipa'] = 'আধ্বব ভাষার নাম' -- Q138608718 p['template_t'] = 't' -- Q30769953 p['template_trans-top'] = 'অনুবাদ-শীর্ষ' -- Q30528422 p['template_trans-bottom'] = 'অনুবাদ-নিচ' -- Q30528419 p['template_antonym'] = 'বিপরীতার্থক' -- Q35305357 p['template_synonym'] = 'synonyms' -- Q32751230 p['template_hypernym'] = 'hypernyms' -- Q35305454 p['template_demonym-noun'] = 'demonym-noun' -- Q130360250 p['template_demonym-adj'] = 'demonym-adj' -- Q135184225 p['template_homophones'] = 'সমোচ্চারিত' -- Q30557565 p['template_borrowed'] = 'ধারকৃত শব্দ' -- Q30872304 p['template_inherited'] = 'inherited' -- Q30864051 p['template_ar-rootbox'] = 'ar-rootbox' -- Q115627074 p['template_root'] = 'root' -- Q104521645 p['template_ellipsis'] = 'ellipsis' -- Q107037827 p['template_prefixsee'] = 'prefixsee' -- Q47517865 p['template_rootsee'] = 'rootsee' -- Q105987491 p['template_suffixsee'] = 'suffixsee' -- Q47517855 p['template_alter'] = 'alter' -- Q54909435 p['noun_template_suffix'] = '-noun' p['noun_template_suffix_fallback'] = '-বিশেষ্য' p['proper noun_template_suffix'] = '-proper noun' p['proper noun_template_suffix_fallback'] = '-নামবাচক বিশেষ্য' p['verb_template_suffix'] = '-verb' p['verb_template_suffix_fallback'] = '-ক্রিয়া' p['manual_category'] = {'বিষয়শ্রেণী', 'category'} p['manual_etymology'] = {'ব্যুৎপত্তি', 'etymology'} p['manual_pronunciation'] = {'উচ্চারণ', 'pronunciation'} p['manual_meaning'] = {'অর্থ', 'meaning'} p['manual_reference'] = {'তথ্যসূত্র', 'reference'} p['manual_external_link'] = {'বহিঃসংযোগ', 'external_link'} p['etymology_borrowing'] = 'থেকে [[w:ঋণশব্দ|ঋণকৃত]]' p['etymology_learned_borrowing'] = '$1 থেকে [[d:Q845079|শিক্ষিতভাবে ঋণকৃত]]' p['etymology_inheritance'] = 'থেকে [[উত্তরলব্ধ]]' p['etymology_ellipsis'] = '[[w:en:Ellipsis (linguistics)|সংক্ষিপ্ত হয়ে]] উপলব্ধ' -- অংশচ্ছেদ (ভাষাবিজ্ঞান) p['edit_wikidata'] = 'উইকিউপাত্তে সম্পাদনা করুন' -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে আছে p['category_rfdef'] = 'ভাষা অনুযায়ী সংজ্ঞার জন্য অনুরোধ' -- Q33129136 p['category_rfdef_equivalent'] = 'শব্দার্থের বাংলা মানের অনুরোধ' -- [[:wikt:en:Category:Requests for English equivalent term by language]]-এর কাছাকাছি p['category_no_matching_lemma'] = 'যেসব ভুক্তিতে লেমার হেডিং দেখানো অসম্ভব' -- Entries will be put in this category whenever a lemma heading cannot be rendered because no lemma of the linked lexeme matched the page title. p['category_given_names'] = 'প্রদত্ত নাম' -- Q8492384 -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে নেই p['text_category_rfdef'] = 'এই শব্দের লেক্সিমে অর্থ প্রয়োজন। দয়া করে লেক্সিম পাতায় গিয়ে একটি অর্থ যোগ করুন, যাতে অন্য পাঠকরা জানতে পারবে এটা মানে কি।' function p.tocatlink(str) return '[[বিষয়শ্রেণী:' .. str .. ']]' end function p.lang_category(lex_cat, language) local cat_text = p.tocatlink(language .. ' লেমা') cat_text = cat_text .. p.tocatlink(language .. ' ' .. lex_cat) return cat_text end function p.trans_category(language) return p.tocatlink(language .. ' অনুবাদসহ পাতা') end function p.wplink(qid, display_text, wb) local link = wb.getSitelink(qid, p['wikipedia']) if link == nil then link = wb.getSitelink(qid, p['fallback_wikipedia']) if link ~= nil then return '[[w:en:' .. link .. '|' .. display_text .. ']]' end else return '[[w:' .. link .. '|' .. display_text .. ']]' end return '' end function p.rfref_category(language) local cat_text = p.tocatlink('তথ্যসূত্রহীন ' .. language .. ' শব্দ',language) return cat_text end p.nolinks = { -- These are words that are so commonly used that links to entries about them are unnecessary. ['করা'] = true, ['হওয়া'] = true, ['যাওয়া'] = true, ['যে'] = true, ['ও'] = true, ['তার'] = true, ['এবং'] = true, ['যার'] = true, ['যায়'] = true, ['সম্পর্কিত'] = true, } return p qaypffqsoxfzv8n0uahf7erw4fsxu9y 512380 512379 2026-07-01T04:58:07Z Redmin 6857 512380 Scribunto text/plain local p = {} p['fallback_wikipedia'] = 'enwiki' p['content_lang_name'] = 'বাংলা' p['content_lang_code'] = 'bn' -- The proper way to do this would be to use mw.ustring.gsub(mw.site.wikiId, 'wiktionary', '') but that does mean wasting compute so instead, just use the 'cached' config which isn't really labour-intensive. p['wikipedia'] = 'bnwiki' -- p['content_lang_code'] .. 'wiki' p['heading_etymology'] = 'ব্যুৎপত্তি' p['heading_pronunciation'] = 'উচ্চারণ' p['heading_translation'] = 'অনুবাদ' p['heading_references'] = 'তথ্যসূত্র' p['heading_external_links'] = 'বহিঃসংযোগ' p['heading_alternative_spellings'] = 'বিকল্প বানান' p['heading_inflection_table'] = 'বিভক্তির সারণী' p['heading_form'] = 'রূপ' p['heading_grammatical_features'] = 'ব্যাকরণিক বৈশিষ্ট্য' p['heading_image'] = 'চিত্র' p['heading_alternative_script'] = 'বিকল্প রূপ' p['text_instance_of'] = 'একটি' p['text_audio'] = 'অডিও' p['text_iso15919'] = '[[w:আইএসও ১৫৯১৯|আইএসও ১৫৯১৯]]:' p['text_iast'] = '[[w:সংস্কৃত লিপ্যন্তরের আন্তর্জাতিক বর্ণমালা|সলিআব]]:' p['text_itrans'] = '[[w:en:ITRANS|ITRANS]]:' p['text_xsampa'] = '[[w:এক্স-সাম্পা|এক্স-সাম্পা]]:' p['text_syllable_count'] = '[[w:অক্ষর (সিলেবল)|অক্ষর]] সংখ্যা:' p['template_lexeme'] = 'উইকিউপাত্ত লেক্সিম' -- Q81739987 p['template_wikipedia'] = 'উইকিপিডিয়া' -- Q6275256 p['template_audio'] = 'অডিও ভাষার নাম' -- Q138620346 p['template_anchor'] = 'anchor' -- Q5412976 p['template_rfdef'] = 'rfdef' -- Q30733154 p['template_ipa'] = 'আধ্বব ভাষার নাম' -- Q138608718 p['template_t'] = 't' -- Q30769953 p['template_trans-top'] = 'অনুবাদ-শীর্ষ' -- Q30528422 p['template_trans-bottom'] = 'অনুবাদ-নিচ' -- Q30528419 p['template_antonym'] = 'বিপরীতার্থক' -- Q35305357 p['template_synonym'] = 'synonyms' -- Q32751230 p['template_hypernym'] = 'hypernyms' -- Q35305454 p['template_demonym-noun'] = 'demonym-noun' -- Q130360250 p['template_demonym-adj'] = 'demonym-adj' -- Q135184225 p['template_homophones'] = 'সমোচ্চারিত' -- Q30557565 p['template_borrowed'] = 'ধারকৃত শব্দ' -- Q30872304 p['template_inherited'] = 'inherited' -- Q30864051 p['template_ar-rootbox'] = 'ar-rootbox' -- Q115627074 p['template_root'] = 'root' -- Q104521645 p['template_ellipsis'] = 'ellipsis' -- Q107037827 p['template_prefixsee'] = 'prefixsee' -- Q47517865 p['template_rootsee'] = 'rootsee' -- Q105987491 p['template_suffixsee'] = 'suffixsee' -- Q47517855 p['template_alter'] = 'alter' -- Q54909435 p['noun_template_suffix'] = '-noun' p['noun_template_suffix_fallback'] = '-বিশেষ্য' p['proper noun_template_suffix'] = '-proper noun' p['proper noun_template_suffix_fallback'] = '-নামবাচক বিশেষ্য' p['verb_template_suffix'] = '-verb' p['verb_template_suffix_fallback'] = '-ক্রিয়া' p['manual_category'] = {'বিষয়শ্রেণী', 'category'} p['manual_etymology'] = {'ব্যুৎপত্তি', 'etymology'} p['manual_pronunciation'] = {'উচ্চারণ', 'pronunciation'} p['manual_meaning'] = {'অর্থ', 'meaning'} p['manual_reference'] = {'তথ্যসূত্র', 'reference'} p['manual_external_link'] = {'বহিঃসংযোগ', 'external_link'} p['manual_alternative_spelling'] = {'বিকল্প রূপ', 'বিকল্প', 'alternative spelling', 'alternative form'} p['etymology_borrowing'] = 'থেকে [[w:ঋণশব্দ|ঋণকৃত]]' p['etymology_learned_borrowing'] = '$1 থেকে [[d:Q845079|শিক্ষিতভাবে ঋণকৃত]]' p['etymology_inheritance'] = 'থেকে [[উত্তরলব্ধ]]' p['etymology_ellipsis'] = '[[w:en:Ellipsis (linguistics)|সংক্ষিপ্ত হয়ে]] উপলব্ধ' -- অংশচ্ছেদ (ভাষাবিজ্ঞান) p['edit_wikidata'] = 'উইকিউপাত্তে সম্পাদনা করুন' -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে আছে p['category_rfdef'] = 'ভাষা অনুযায়ী সংজ্ঞার জন্য অনুরোধ' -- Q33129136 p['category_rfdef_equivalent'] = 'শব্দার্থের বাংলা মানের অনুরোধ' -- [[:wikt:en:Category:Requests for English equivalent term by language]]-এর কাছাকাছি p['category_no_matching_lemma'] = 'যেসব ভুক্তিতে লেমার হেডিং দেখানো অসম্ভব' -- Entries will be put in this category whenever a lemma heading cannot be rendered because no lemma of the linked lexeme matched the page title. p['category_given_names'] = 'প্রদত্ত নাম' -- Q8492384 -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে নেই p['text_category_rfdef'] = 'এই শব্দের লেক্সিমে অর্থ প্রয়োজন। দয়া করে লেক্সিম পাতায় গিয়ে একটি অর্থ যোগ করুন, যাতে অন্য পাঠকরা জানতে পারবে এটা মানে কি।' function p.tocatlink(str) return '[[বিষয়শ্রেণী:' .. str .. ']]' end function p.lang_category(lex_cat, language) local cat_text = p.tocatlink(language .. ' লেমা') cat_text = cat_text .. p.tocatlink(language .. ' ' .. lex_cat) return cat_text end function p.trans_category(language) return p.tocatlink(language .. ' অনুবাদসহ পাতা') end function p.wplink(qid, display_text, wb) local link = wb.getSitelink(qid, p['wikipedia']) if link == nil then link = wb.getSitelink(qid, p['fallback_wikipedia']) if link ~= nil then return '[[w:en:' .. link .. '|' .. display_text .. ']]' end else return '[[w:' .. link .. '|' .. display_text .. ']]' end return '' end function p.rfref_category(language) local cat_text = p.tocatlink('তথ্যসূত্রহীন ' .. language .. ' শব্দ',language) return cat_text end p.nolinks = { -- These are words that are so commonly used that links to entries about them are unnecessary. ['করা'] = true, ['হওয়া'] = true, ['যাওয়া'] = true, ['যে'] = true, ['ও'] = true, ['তার'] = true, ['এবং'] = true, ['যার'] = true, ['যায়'] = true, ['সম্পর্কিত'] = true, } return p 9ijsnl7e4ktrbl9he8rg9tj61mig7az 512384 512380 2026-07-01T05:00:42Z Redmin 6857 512384 Scribunto text/plain local p = {} p['fallback_wikipedia'] = 'enwiki' p['content_lang_name'] = 'বাংলা' p['content_lang_code'] = 'bn' -- The proper way to do this would be to use mw.ustring.gsub(mw.site.wikiId, 'wiktionary', '') but that does mean wasting compute so instead, just use the 'cached' config which isn't really labour-intensive. p['wikipedia'] = 'bnwiki' -- p['content_lang_code'] .. 'wiki' p['heading_etymology'] = 'ব্যুৎপত্তি' p['heading_pronunciation'] = 'উচ্চারণ' p['heading_translation'] = 'অনুবাদ' p['heading_references'] = 'তথ্যসূত্র' p['heading_external_links'] = 'বহিঃসংযোগ' p['heading_alternative_spellings'] = 'বিকল্প বানান' p['heading_inflection_table'] = 'বিভক্তির সারণী' p['heading_form'] = 'রূপ' p['heading_grammatical_features'] = 'ব্যাকরণিক বৈশিষ্ট্য' p['heading_image'] = 'চিত্র' p['heading_alternative_script'] = 'বিকল্প রূপ' p['text_instance_of'] = 'একটি' p['text_audio'] = 'অডিও' p['text_iso15919'] = '[[w:আইএসও ১৫৯১৯|আইএসও ১৫৯১৯]]:' p['text_iast'] = '[[w:সংস্কৃত লিপ্যন্তরের আন্তর্জাতিক বর্ণমালা|সলিআব]]:' p['text_itrans'] = '[[w:en:ITRANS|ITRANS]]:' p['text_xsampa'] = '[[w:এক্স-সাম্পা|এক্স-সাম্পা]]:' p['text_syllable_count'] = '[[w:অক্ষর (সিলেবল)|অক্ষর]] সংখ্যা:' p['template_lexeme'] = 'উইকিউপাত্ত লেক্সিম' -- Q81739987 p['template_wikipedia'] = 'উইকিপিডিয়া' -- Q6275256 p['template_audio'] = 'অডিও ভাষার নাম' -- Q138620346 p['template_anchor'] = 'anchor' -- Q5412976 p['template_rfdef'] = 'rfdef' -- Q30733154 p['template_ipa'] = 'আধ্বব ভাষার নাম' -- Q138608718 p['template_t'] = 't' -- Q30769953 p['template_trans-top'] = 'অনুবাদ-শীর্ষ' -- Q30528422 p['template_trans-bottom'] = 'অনুবাদ-নিচ' -- Q30528419 p['template_antonym'] = 'বিপরীতার্থক' -- Q35305357 p['template_synonym'] = 'synonyms' -- Q32751230 p['template_hypernym'] = 'hypernyms' -- Q35305454 p['template_demonym-noun'] = 'demonym-noun' -- Q130360250 p['template_demonym-adj'] = 'demonym-adj' -- Q135184225 p['template_homophones'] = 'সমোচ্চারিত' -- Q30557565 p['template_borrowed'] = 'ধারকৃত শব্দ' -- Q30872304 p['template_inherited'] = 'inherited' -- Q30864051 p['template_ar-rootbox'] = 'ar-rootbox' -- Q115627074 p['template_root'] = 'root' -- Q104521645 p['template_ellipsis'] = 'ellipsis' -- Q107037827 p['template_prefixsee'] = 'prefixsee' -- Q47517865 p['template_rootsee'] = 'rootsee' -- Q105987491 p['template_suffixsee'] = 'suffixsee' -- Q47517855 p['template_alter'] = 'alter' -- Q54909435 p['noun_template_suffix'] = '-noun' p['noun_template_suffix_fallback'] = '-বিশেষ্য' p['proper noun_template_suffix'] = '-proper noun' p['proper noun_template_suffix_fallback'] = '-নামবাচক বিশেষ্য' p['verb_template_suffix'] = '-verb' p['verb_template_suffix_fallback'] = '-ক্রিয়া' p['manual_category'] = {'বিষয়শ্রেণী', 'category'} p['manual_etymology'] = {'ব্যুৎপত্তি', 'etymology'} p['manual_pronunciation'] = {'উচ্চারণ', 'pronunciation'} p['manual_meaning'] = {'অর্থ', 'meaning'} p['manual_reference'] = {'তথ্যসূত্র', 'reference'} p['manual_external_link'] = {'বহিঃসংযোগ', 'external_link'} p['manual_alternative_spellings'] = {'বিকল্প রূপ', 'বিকল্প', 'alternative spelling', 'alternative form'} p['etymology_borrowing'] = 'থেকে [[w:ঋণশব্দ|ঋণকৃত]]' p['etymology_learned_borrowing'] = '$1 থেকে [[d:Q845079|শিক্ষিতভাবে ঋণকৃত]]' p['etymology_inheritance'] = 'থেকে [[উত্তরলব্ধ]]' p['etymology_ellipsis'] = '[[w:en:Ellipsis (linguistics)|সংক্ষিপ্ত হয়ে]] উপলব্ধ' -- অংশচ্ছেদ (ভাষাবিজ্ঞান) p['edit_wikidata'] = 'উইকিউপাত্তে সম্পাদনা করুন' -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে আছে p['category_rfdef'] = 'ভাষা অনুযায়ী সংজ্ঞার জন্য অনুরোধ' -- Q33129136 p['category_rfdef_equivalent'] = 'শব্দার্থের বাংলা মানের অনুরোধ' -- [[:wikt:en:Category:Requests for English equivalent term by language]]-এর কাছাকাছি p['category_no_matching_lemma'] = 'যেসব ভুক্তিতে লেমার হেডিং দেখানো অসম্ভব' -- Entries will be put in this category whenever a lemma heading cannot be rendered because no lemma of the linked lexeme matched the page title. p['category_given_names'] = 'প্রদত্ত নাম' -- Q8492384 -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে নেই p['text_category_rfdef'] = 'এই শব্দের লেক্সিমে অর্থ প্রয়োজন। দয়া করে লেক্সিম পাতায় গিয়ে একটি অর্থ যোগ করুন, যাতে অন্য পাঠকরা জানতে পারবে এটা মানে কি।' function p.tocatlink(str) return '[[বিষয়শ্রেণী:' .. str .. ']]' end function p.lang_category(lex_cat, language) local cat_text = p.tocatlink(language .. ' লেমা') cat_text = cat_text .. p.tocatlink(language .. ' ' .. lex_cat) return cat_text end function p.trans_category(language) return p.tocatlink(language .. ' অনুবাদসহ পাতা') end function p.wplink(qid, display_text, wb) local link = wb.getSitelink(qid, p['wikipedia']) if link == nil then link = wb.getSitelink(qid, p['fallback_wikipedia']) if link ~= nil then return '[[w:en:' .. link .. '|' .. display_text .. ']]' end else return '[[w:' .. link .. '|' .. display_text .. ']]' end return '' end function p.rfref_category(language) local cat_text = p.tocatlink('তথ্যসূত্রহীন ' .. language .. ' শব্দ',language) return cat_text end p.nolinks = { -- These are words that are so commonly used that links to entries about them are unnecessary. ['করা'] = true, ['হওয়া'] = true, ['যাওয়া'] = true, ['যে'] = true, ['ও'] = true, ['তার'] = true, ['এবং'] = true, ['যার'] = true, ['যায়'] = true, ['সম্পর্কিত'] = true, } return p jzqu1y1rqighlfonqgm6r8ozzkh9ofh 512400 512384 2026-07-01T07:40:22Z Redmin 6857 512400 Scribunto text/plain local p = {} p['fallback_wikipedia'] = 'enwiki' p['content_lang_name'] = 'বাংলা' p['content_lang_code'] = 'bn' -- The proper way to do this would be to use mw.ustring.gsub(mw.site.wikiId, 'wiktionary', '') but that does mean wasting compute so instead, just use the 'cached' config which isn't really labour-intensive. p['wikipedia'] = 'bnwiki' -- p['content_lang_code'] .. 'wiki' p['heading_etymology'] = 'ব্যুৎপত্তি' p['heading_pronunciation'] = 'উচ্চারণ' p['heading_translation'] = 'অনুবাদ' p['heading_references'] = 'তথ্যসূত্র' p['heading_external_links'] = 'বহিঃসংযোগ' p['heading_alternative_spellings'] = 'বিকল্প বানান' p['heading_inflection_table'] = 'বিভক্তির সারণী' p['heading_form'] = 'রূপ' p['heading_grammatical_features'] = 'ব্যাকরণিক বৈশিষ্ট্য' p['heading_image'] = 'চিত্র' p['heading_alternative_script'] = 'বিকল্প রূপ' p['heading_special_info'] = 'বিশেষ তথ্য' p['text_instance_of'] = 'এটি একটি' p['text_sentence_terminator'] = '।' p['text_audio'] = 'অডিও' p['text_iso15919'] = '[[w:আইএসও ১৫৯১৯|আইএসও ১৫৯১৯]]:' p['text_iast'] = '[[w:সংস্কৃত লিপ্যন্তরের আন্তর্জাতিক বর্ণমালা|সলিআব]]:' p['text_itrans'] = '[[w:en:ITRANS|ITRANS]]:' p['text_xsampa'] = '[[w:এক্স-সাম্পা|এক্স-সাম্পা]]:' p['text_syllable_count'] = '[[w:অক্ষর (সিলেবল)|অক্ষর]] সংখ্যা:' p['template_lexeme'] = 'উইকিউপাত্ত লেক্সিম' -- Q81739987 p['template_wikipedia'] = 'উইকিপিডিয়া' -- Q6275256 p['template_audio'] = 'অডিও ভাষার নাম' -- Q138620346 p['template_anchor'] = 'anchor' -- Q5412976 p['template_rfdef'] = 'rfdef' -- Q30733154 p['template_ipa'] = 'আধ্বব ভাষার নাম' -- Q138608718 p['template_t'] = 't' -- Q30769953 p['template_trans-top'] = 'অনুবাদ-শীর্ষ' -- Q30528422 p['template_trans-bottom'] = 'অনুবাদ-নিচ' -- Q30528419 p['template_antonym'] = 'বিপরীতার্থক' -- Q35305357 p['template_synonym'] = 'synonyms' -- Q32751230 p['template_hypernym'] = 'hypernyms' -- Q35305454 p['template_demonym-noun'] = 'demonym-noun' -- Q130360250 p['template_demonym-adj'] = 'demonym-adj' -- Q135184225 p['template_homophones'] = 'সমোচ্চারিত' -- Q30557565 p['template_borrowed'] = 'ধারকৃত শব্দ' -- Q30872304 p['template_inherited'] = 'inherited' -- Q30864051 p['template_ar-rootbox'] = 'ar-rootbox' -- Q115627074 p['template_root'] = 'root' -- Q104521645 p['template_ellipsis'] = 'ellipsis' -- Q107037827 p['template_prefixsee'] = 'prefixsee' -- Q47517865 p['template_rootsee'] = 'rootsee' -- Q105987491 p['template_suffixsee'] = 'suffixsee' -- Q47517855 p['template_alter'] = 'alter' -- Q54909435 p['noun_template_suffix'] = '-noun' p['noun_template_suffix_fallback'] = '-বিশেষ্য' p['proper noun_template_suffix'] = '-proper noun' p['proper noun_template_suffix_fallback'] = '-নামবাচক বিশেষ্য' p['verb_template_suffix'] = '-verb' p['verb_template_suffix_fallback'] = '-ক্রিয়া' p['manual_category'] = {'বিষয়শ্রেণী', 'category'} p['manual_etymology'] = {'ব্যুৎপত্তি', 'etymology'} p['manual_pronunciation'] = {'উচ্চারণ', 'pronunciation'} p['manual_meaning'] = {'অর্থ', 'meaning'} p['manual_reference'] = {'তথ্যসূত্র', 'reference'} p['manual_external_link'] = {'বহিঃসংযোগ', 'external_link'} p['manual_alternative_spellings'] = {'বিকল্প রূপ', 'বিকল্প', 'alternative spelling', 'alternative form'} p['etymology_borrowing'] = 'থেকে [[w:ঋণশব্দ|ঋণকৃত]]' p['etymology_learned_borrowing'] = '$1 থেকে [[d:Q845079|শিক্ষিতভাবে ঋণকৃত]]' p['etymology_inheritance'] = 'থেকে [[উত্তরলব্ধ]]' p['etymology_ellipsis'] = '[[w:en:Ellipsis (linguistics)|সংক্ষিপ্ত হয়ে]] উপলব্ধ' -- অংশচ্ছেদ (ভাষাবিজ্ঞান) p['edit_wikidata'] = 'উইকিউপাত্তে সম্পাদনা করুন' -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে আছে p['category_rfdef'] = 'ভাষা অনুযায়ী সংজ্ঞার জন্য অনুরোধ' -- Q33129136 p['category_rfdef_equivalent'] = 'শব্দার্থের বাংলা মানের অনুরোধ' -- [[:wikt:en:Category:Requests for English equivalent term by language]]-এর কাছাকাছি p['category_no_matching_lemma'] = 'যেসব ভুক্তিতে লেমার হেডিং দেখানো অসম্ভব' -- Entries will be put in this category whenever a lemma heading cannot be rendered because no lemma of the linked lexeme matched the page title. p['category_given_names'] = 'প্রদত্ত নাম' -- Q8492384 -- বিষয়শ্রেণী যেগুলো অন্য উইকিঅভিধানে নেই p['text_category_rfdef'] = 'এই শব্দের লেক্সিমে অর্থ প্রয়োজন। দয়া করে লেক্সিম পাতায় গিয়ে একটি অর্থ যোগ করুন, যাতে অন্য পাঠকরা জানতে পারবে এটা মানে কি।' function p.tocatlink(str) return '[[বিষয়শ্রেণী:' .. str .. ']]' end function p.lang_category(lex_cat, language) local cat_text = p.tocatlink(language .. ' লেমা') cat_text = cat_text .. p.tocatlink(language .. ' ' .. lex_cat) return cat_text end function p.trans_category(language) return p.tocatlink(language .. ' অনুবাদসহ পাতা') end function p.wplink(qid, display_text, wb) local link = wb.getSitelink(qid, p['wikipedia']) if link == nil then link = wb.getSitelink(qid, p['fallback_wikipedia']) if link ~= nil then return '[[w:en:' .. link .. '|' .. display_text .. ']]' end else return '[[w:' .. link .. '|' .. display_text .. ']]' end return '' end function p.rfref_category(language) local cat_text = p.tocatlink('তথ্যসূত্রহীন ' .. language .. ' শব্দ',language) return cat_text end p.nolinks = { -- These are words that are so commonly used that links to entries about them are unnecessary. ['করা'] = true, ['হওয়া'] = true, ['যাওয়া'] = true, ['যে'] = true, ['ও'] = true, ['তার'] = true, ['এবং'] = true, ['যার'] = true, ['যায়'] = true, ['সম্পর্কিত'] = true, } return p 1ysattgqhspzc5fjc7qqqi01jgi4by3 অঙ্ক 0 170145 512386 512363 2026-07-01T05:09:05Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L582523-এর সাথে সংযোগ তৈরি করছি 512386 wikitext text/x-wiki {{লে|L582523|ব্যুৎপত্তি= * সংস্কৃত জাত * অঙ্ক্+অ |meaning=# [[রাশি]] # [[হিসাব]], [[গণনা]]}} pv8qmbt5dbanxelmvsr65e9otbrmrwj كڊي 0 170147 512372 2026-07-01T04:28:25Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1310261-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512372 wikitext text/x-wiki {{লে|L1310261}} 7u6a0secnj8gp3i9bx1zptxip0iqs4f that 0 170148 512385 2026-07-01T05:03:02Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L333971-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512385 wikitext text/x-wiki {{লে|L333971}} k5s4h5gd6zfti4xyzog7y0p9u15boeh অঙ্কুরিত 0 170149 512387 2026-07-01T05:09:36Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L582405-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512387 wikitext text/x-wiki {{লে|L582405}} kixqhdpx9jee34cgwgn1kba9lvyw5q1 হরপ 0 170150 512389 2026-07-01T05:13:48Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L303436-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512389 wikitext text/x-wiki {{লে|L303436}} pi5zpoa2vy2ux0njyxjavr3aw81ipso ventinove 0 170151 512391 2026-07-01T05:18:01Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1201817-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512391 wikitext text/x-wiki {{লে|L1201817}} 0z9tkjd2euiyj37ogq5ofpwu4ynlawn -’s 0 170152 512393 2026-07-01T05:24:49Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1319038-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512393 wikitext text/x-wiki {{লে|L1319038}} c1wawiv82mgk0w7mclzqq6ametyqlx8 -ly 0 170153 512394 2026-07-01T05:27:12Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L28890-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512394 wikitext text/x-wiki {{লে|L28890}} ij3gntt03c5zlto75dodziycmd12rid uncanny 0 170154 512395 2026-07-01T06:19:00Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L253483-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512395 wikitext text/x-wiki {{লে|L253483}} kdcz0m61og6banqqclx2egv7lvk5730 حركة 0 170155 512397 2026-07-01T06:22:38Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1320378-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512397 wikitext text/x-wiki {{লে|L1320378}} gq2h1ar8d7vzuh9r4r2y69ldi1a7hew নুক্তা 0 170156 512398 2026-07-01T06:22:47Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571082-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512398 wikitext text/x-wiki {{লে|L1571082}} am39z9txxon2a2s1tdfehal3r7nu9aa নোক্তা 0 170157 512399 2026-07-01T06:22:50Z Redmin 6857 লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571082-এর জন্য একটি নতুন ভুক্তি তৈরি করছি 512399 wikitext text/x-wiki {{লে|L1571082}} am39z9txxon2a2s1tdfehal3r7nu9aa point mass 0 170158 512402 2026-07-01T11:07:08Z Redmin 6857 + 512402 wikitext text/x-wiki {{লে|L1571121}} mfk0bajm6nq7lftmklqgy1jys8nfew1 point charge 0 170159 512403 2026-07-01T11:07:34Z Redmin 6857 "{{লে|L1571119}}" দিয়ে পাতা তৈরি 512403 wikitext text/x-wiki {{লে|L1571119}} 07fv6yibtfszavpy4djqbwj9s9f5ylo