Module:SemanticAnnotations: Difference between revisions
// via Wikitext Extension for VSCode |
// via Wikitext Extension for VSCode |
||
| Line 10: | Line 10: | ||
local VALUE_LIMIT = 25 -- per individual property | local VALUE_LIMIT = 25 -- per individual property | ||
--[[ | --[[ Fallback for mw.smw.set using the #set parser function. | ||
@param args - Template parameters | @param args - Template parameters | ||
@param mappings - Property mappings: {["Property"] = "param"} or complex format | @param mappings - Property mappings: {["Property"] = "param"} or complex format | ||
| Line 170: | Line 170: | ||
end | end | ||
-- Enhanced | -- Enhanced fallback for mw.smw.set with complex mapping support. | ||
function p.generateEnhancedAnnotations(args, mappings, options) | function p.generateEnhancedAnnotations(args, mappings, options) | ||
args = args or {} | args = args or {} | ||
| Line 253: | Line 253: | ||
end | end | ||
--[[ Sets semantic properties | --[[ Sets semantic properties using the native mw.smw API. | ||
This is the primary function for setting semantic data. | |||
@param args - Template parameters | @param args - Template parameters | ||
@param mappings - Property mappings in formats: | @param mappings - Property mappings in formats: | ||