Content deleted Content added
No edit summary |
No edit summary Tag: Reverted |
||
Line 1:
local p = {}
end▼
-- Special cases for verb conjugation that don't follow the regular 's' or 'es' pattern
local specialCases = {
go = "goes",
-- Add more special cases as necessary
}
-- Determines
local function
if pronoun:lower() == "he" or pronoun:lower() == "she" or pronoun:lower() == "it" then
return s:upper() == s▼
end▼
end
-- Capitalizes a word if the original was capitalized
-- Adjusts the verb based on the pronoun, verb tense, and input capitalization▼
local function matchCase(original, word)
else
end
▲end
local function adjustVerb(originalPronoun, originalVerb)
local pronoun = originalPronoun:lower() -- Use lowercase for logic
local verb = originalVerb:lower() -- Use lowercase for logic
local resultVerb = verb -- Default to the original verb form
-- Continuous tense (verbs ending in 'ing')
if verb:sub(-3) == "ing" then
else
-- Simple present tense
if pronoun == "he" or pronoun == "she" or pronoun == "it" then
elseif pronoun == "they"
-- Adjusting for plural
▲ end
▲ end
▲ elseif verb:match("s$") then
▲ verb = verb:sub(1, -2)
▲ end
end
resultVerb = matchCase(originalVerb, resultVerb) -- Adjust the case based on the original input
▲ end
▲ end
end
return
end
Line 66 ⟶ 52:
local originalPronoun = frame.args[1]
local originalVerb = frame.args[2]
return adjustVerb(originalPronoun, originalVerb) -- Adjust and return the result
end
|