Module:User:Jberkel/qualifier

local export = {}

local concat = table.concat local format_qualifier local type = type

function export.format_qualifier(list, open, close, opencontent, closecontent) if type(list) ~= "table" then list = {list} end if #list == 0 then return "" end return "" .. (open or "(") .. " " ..	      (opencontent or "") ..	       "" ..	       concat(list, ", ") ..		   " " ..		   (closecontent or "") ..		   "" .. (close or ")") .. " " end format_qualifier = export.format_qualifier

function format_qualifier_with_clarification(list, clarification, open, close) opencontent = "" .. clarification .. " " .. 		"" .. (open or "“") .. " "	closecontent = "" .. (close or "”") .. " "	return format_qualifier(list, "(", ")", opencontent, closecontent) end

function export.sense(list) return format_qualifier(list) .. ": " end

function export.antsense(list) return format_qualifier_with_clarification(list, "antonym(s) of ") .. ": " end

return export