8,756
edits
(split conjugate into its own module so both grammar and htmlparse can use) |
mNo edit summary |
||
Line 17: | Line 17: | ||
pronoun = pronounresult | pronoun = pronounresult | ||
end | end | ||
end | |||
if pronouns[pronoun] == nil then | |||
error ("There was no pronoun set named " .. (pronoun or "(no pronoun)").. "!") | |||
end | end | ||
Line 66: | Line 69: | ||
end | end | ||
elseif (a == "verb") then | elseif (a == "verb") then | ||
if (c == nil or c == '') then | if (c == nil or c == '') then --[if no :afterpronoun] | ||
returnstring = conjugate.singularverb(b) | returnstring = conjugate.singularverb(b) | ||
elseif (p.isplural( | elseif (p.isplural() == '0') then --[if not plural, singularize] | ||
returnstring = conjugate.singularverb(b) | returnstring = conjugate.singularverb(b) | ||
else | else | ||
Line 93: | Line 96: | ||
function p.isplural(gender,pronoun) | function p.isplural(gender,pronoun) | ||
if (pronoun~=nil) then | |||
return pronouns[pronoun]['pseudoplural'] | |||
end | |||
if progentable["pseudoplural"] == '1' or progentable["plural"] == '1' then | if progentable["pseudoplural"] == '1' or progentable["plural"] == '1' then | ||
return '1' | return '1' | ||
Line 101: | Line 107: | ||
function p.test() | function p.test() | ||
text=" | text="Before you =verb:recline= =article==pronouns.personTerm= clothed in leafy raiment, so svelte and still you mistake =pronouns.objective= for the fallen branch of a sickly tree until you meet the gaze of =pronouns.possessive= cerulean eyes. Upon closer scrutiny, you discern the hilts of =pronouns.possessive= twin swords, Caslainard and Polluxus, rising through the foliage of =pronouns.possessive= cloak and over =pronouns.possessive= shoulders. =pronouns.Possessive= sylvan sashes, of which =pronouns.subjective= =verb:wear:afterpronoun= several, are strewn with the ears, claws, and horns of creatures unfamiliar to you, and as you examine them, =pronouns.subjective= =verb:scrutinize:afterpronoun= you wearing an expression that bears qualities of both a smirk and a scowl yet that is not quite either." | ||
gender = "male" | gender = "male" | ||
pronoun = " | pronoun = "" | ||
local f = {["args"] = {[1]= text, [2] = gender, [3] = pronoun }} | local f = {["args"] = {[1]= text, [2] = gender, [3] = pronoun }} |