Module:R:Strong's

Hello, you have come here looking for the meaning of the word Module:R:Strong's. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:R:Strong's, but we will also tell you about its etymology, its characteristics and you will know how to say Module:R:Strong's in singular and plural. Everything you need to know about the word Module:R:Strong's you have here. The definition of the word Module:R:Strong's will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:R:Strong's, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}


local function code_is_polytonic(sc)
	return sc == "Polyt" or sc == "polytonic"
end

local function text_is_polytonic(txt)
	return code_is_polytonic(require("Module:languages").getByCode("grc"):findBestScript(txt):getCode())
end

function export.strongs(frame)
	local he = require("Module:languages").getByCode("he")
	local grc = require("Module:languages").getByCode("grc")
	
	local args = frame:getParent().args
	local title = args or mw.title.getCurrentTitle().text
	local title_span = text_is_polytonic(title) and '<span class="Polyt" lang="grc">'..title..'</span>' or title

	if  mw.title.getCurrentTitle().nsText == "Template" then
		-- pass
	elseif he:findBestScript(title):getCode() == "Hebr" then
		error('Arguments for language and Strong’s Number are required for Hebrew word disambiguation.')
	elseif code_is_polytonic(grc:findBestScript(title):getCode()) then
		local strongs_concordance_numbers_G = require("Module:R:Strong's/grc-data-text-format")
		local number = tonumber(strongs_concordance_numbers_G:match(
			"%f" .. require("Module:string utilities").pattern_escape(title) .. "\t(%d+)%f"))
		if number then
			return "G" .. number
		else
			error('The term “' .. title .. '” does not have a Strong’s number.')
		end
	else
		error('The term “' .. title .. '” is not in polytonic or Hebrew script.')
	end
end

return export