Module:siwa-noun: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
local export = {}
local export = {}
local m_u = require('Module:utilities')
local m_pron = require('Module:siwa-pron')
local m_data = require('Module:siwa-noun/data')
local sub = mw.ustring.sub
local find = mw.ustring.find
local gmatch = mw.ustring.gmatch
local gsub = mw.ustring.gsub
local u = mw.ustring.char
local split = mw.text.split
local gsplit = mw.text.gsplit
local UNRELEASED = u(0x031A) -- COMBINING LEFT ANGLE ABOVE. ̚
local vowel = "[iɪyeøɛœæauɔ̃ɑʊɤɯ]"
function syll_count(term)
term = m_pron.crux(term)
local xc = "[mnɲŋpbtdcɟkɡvðsɕzʑxɣhrlɬjw⁽ʰ⁾ʔː̥͡"..UNRELEASED.."]"
local pattern = "(" .. xc .. "?" .. vowel .. "+ː?" .. xc .. "*)"
local _, n = gsub(term, pattern, "%1")
return n
end
local function detect_decl(word, stem, quality)
end


-- The main entry point.
-- The main entry point.
-- This is the only function that can be invoked from a template.
-- This is the only function that can be invoked from a template.
function export.show(frame)
function export.show(frame)
local parent_args = frame:getParent().args
local params = {
if mw.title.getCurrentTitle().nsText ~= "Reconstruction" then return end
[1] = { required = true },
[2] = {},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local stems = nil
local stems = nil
local decl_type = {}
local decl_type = {}
local word = mw.title.getCurrentTitle().subpageText
local word = mw.title.getCurrentTitle().title
local args = {}

Revision as of 21:32, 3 February 2021



local export = {}

local m_u = require('Module:utilities')
local m_pron = require('Module:siwa-pron')
local m_data = require('Module:siwa-noun/data')

local sub = mw.ustring.sub
local find = mw.ustring.find
local gmatch = mw.ustring.gmatch
local gsub = mw.ustring.gsub
local u = mw.ustring.char
local split = mw.text.split
local gsplit = mw.text.gsplit

local UNRELEASED = u(0x031A) -- COMBINING LEFT ANGLE ABOVE. ̚
local vowel = "[iɪyeøɛœæauɔ̃ɑʊɤɯ]"

function syll_count(term)
	term = m_pron.crux(term)
	local xc = "[mnɲŋpbtdcɟkɡvðsɕzʑxɣhrlɬjw⁽ʰ⁾ʔː̥͡"..UNRELEASED.."]"
	local pattern = "(" .. xc .. "?" .. vowel .. "+ː?" .. xc .. "*)"
	local _, n = gsub(term, pattern, "%1")
	
	return n
end	

local function detect_decl(word, stem, quality)
	

end

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
	local params = {
		[1] = { required = true },
		[2] = {},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	local stems = nil
	local decl_type = {}
	local word = mw.title.getCurrentTitle().title
	
	
	
	
end

return export