Documentation for this module may be created at Module:grk-stems/trials/data/τεκμηρίωση

--[=[
ΟΔΗΓΙΕΣ - INSTRUCTIONS
	Load this module using require(), not using mw.loadData().
	USE e.g.: local m_data = require("Module:XXX/data")
		IF: local module_path = 'Module:YYY'
		USE: local m_data = require(module_path .."/data")
	DO NOT USE: local m_data = mw.loadData("XXX")
	HOW to call it:
		m_data.xxxxxx e.g. m_data.unaccented_to_accented
]=]--
--[=[
-- Συγκέντρωση όλων των μετατροπών χαρακτήρων που βρέθηκαν σε modules έως το 2019.
-- Χρησιμεύουν στα module κλίσεων.
-- A compilation of all character conversions found in modules at el.wiktionary up to 2019
-- Used in inflection modules.
See explanations at the end of this text

ΕΡΩΤΗΣΕΙΣ QUESTIONS
* Προσγεγραμμένο ιώτα? Adscript iota for capital letters
* Do i have to write export, export for every group?
]=]--

local export = {}


-- the ambiguous dicrhonic vowels for ancient greek (brachy or macron) are:
	-- anything with perispomeni or superscript iota is macron
export.dichrona = { 
   'α', 'Α', 'ἄ', 'ἅ', 'Ἄ', 'Ἅ',
   'ί', 'Ί', 'ΐ', 'ἴ', 'ἵ', 'Ἴ', 'Ἵ',
   'ύ', 'Ύ', 'ΰ', 'ὔ', 'ὕ', 'Ὕ'
}
-- it cannot accept subsrcipt. Acceptable: 
--  'ᾶ', 'ἆ', 'ἇ', 'Ἆ', 'Ἇ', 'ῖ', 'ἶ', 'ἷ', 'Ἶ', 'Ἷ', 'ῦ', 'ὖ', 'ὗ', 'Ὗ'
export.dichrona_makra = { 
--	'ᾶ', 'ᾴ', 'ᾷ', 'ἆ', 'ᾄ', 'ᾆ', 'ἇ', 'ᾅ, 'ᾇ', 'Ἆ', 'Ἇ', 'ῖ', 'ἶ', 'ἷ', 'Ἶ', 'Ἷ', 'ῦ', 'ὖ', 'ὗ', 'Ὗ'
}
-- or mw.ustring.find(stem["θ"], '[ᾶᾴᾷἆᾄᾆἇᾅᾇἎἏῖἶἷἾἿῦὖὗὟ]')





-- ============================== as Module:grk-stems

---- place accent (okeia) on unaccented - τονισμός άτονου με οξεία
---- get more / υπάρχουν πολλά ζευγάρια ακόμη να συμπληρωθούν, πχ κεφαλαία με ή χωρίς πνεύμα κλπ
---- for unaccented_to_perispomeni (for polytonic): see oxeia_to_perispomeni
export.unaccented_to_accented = { 
	['α'] = 'ά', ['ᾳ'] = 'ᾴ', ['ἀ'] = 'ἄ', ['ἁ'] = 'ἅ',
	['ε'] = 'έ', ['ἐ'] = 'ἔ', ['ἑ'] = 'ἕ',
	['η'] = 'ή', ['ῃ'] = 'ῄ', ['ἠ'] = 'ἤ', ['ἡ'] = 'ἥ',
	['ι'] = 'ί', ['ϊ'] = 'ΐ', ['ἰ'] = 'ἴ', ['ἱ'] = 'ἵ',
	['ο'] = 'ό', ['ὀ'] = 'ὄ', ['ὁ'] = 'ὅ',
	['υ'] = 'ύ', ['ϋ'] = 'ΰ', ['ὐ'] = 'ὔ', ['ὑ'] = 'ὕ',
	['ω'] = 'ώ', ['ῳ'] = 'ῴ', ['ὠ'] = 'ὤ', ['ὡ'] = 'ὥ'
}

---- remove accent from accented / αφαίρεση του τόνου
export.accented_to_unaccented = {
   ['ά'] = 'α', ['ᾶ'] = 'α', ['ᾴ'] = 'ᾳ', ['ᾷ'] = 'ᾳ',
   ['ἄ'] = 'ἀ', ['ἆ'] = 'ἀ', ['ᾄ'] = 'ᾀ', ['ᾆ'] = 'ᾀ',
   ['ἅ'] = 'ἁ', ['ἇ'] = 'ἁ', ['ᾅ'] = 'ᾁ', ['ᾇ'] = 'ᾁ',
   ['Ἄ'] = 'Ἀ', ['Ἆ'] = 'Ἀ', ['Ἅ'] = 'Ἁ', ['Ἇ'] = 'Ἁ',
   ['έ'] = 'ε', ['ἔ'] = 'ἐ', ['ἕ'] = 'ἑ',
   ['Ἔ'] = 'Ἐ', ['Ἕ'] = 'Ἑ',   
   ['ή'] = 'η', ['ῆ'] = 'η', ['ῄ'] = 'ῃ', ['ῇ'] = 'ῃ',
   ['ἤ'] = 'ἠ', ['ἦ'] = 'ἠ', ['ᾔ'] = 'ᾐ', ['ᾖ'] = 'ᾐ',
   ['ἥ'] = 'ἡ', ['ἧ'] = 'ἡ', ['ᾕ'] = 'ᾑ', ['ᾗ'] = 'ᾑ',
   ['Ἤ'] = 'Ἠ', ['Ἦ'] = 'Ἠ', ['Ἥ'] = 'Ἡ', ['Ἧ'] = 'Ἡ',
   ['ί'] = 'ι', ['ΐ'] = 'ϊ', ['ῖ'] = 'ι',
   ['ἴ'] = 'ἰ', ['ἶ'] = 'ἰ', ['ἵ'] = 'ἱ', ['ἷ'] = 'ἱ',
   ['Ἴ'] = 'Ἰ', ['Ἶ'] = 'Ἰ', ['Ἵ'] = 'Ἱ', ['Ἷ'] = 'Ἱ',
   ['ό'] = 'ο', ['ὄ'] = 'ὀ', ['ὅ'] = 'ὁ',
   ['Ὄ'] = 'Ὀ', ['Ὅ'] = 'Ὁ',
   ['ύ'] = 'υ', ['ΰ'] = 'ϋ', ['ῦ'] = 'υ', ['ὔ'] = 'ὐ', ['ὖ'] = 'ὐ', 
   ['ὕ'] = 'ὑ', ['ὗ'] = 'ὑ', ['Ὕ'] = 'Ὑ', ['Ὗ'] = 'Ὑ',
   ['ώ'] = 'ω', ['ῶ'] = 'ω', ['ῴ'] = 'ῳ', ['ῷ'] = 'ῳ',
   ['ὤ'] = 'ὠ', ['ὦ'] = 'ὠ', ['ᾤ'] = 'ᾠ', ['ᾦ'] = 'ᾠ',
   ['ὥ'] = 'ὡ', ['ὧ'] = 'ὡ', ['ᾥ'] = 'ᾡ', ['ᾧ'] = 'ᾡ',
   ['Ὤ'] = 'Ὠ', ['Ὦ'] = 'Ὠ', ['Ὥ'] = 'Ὡ', ['Ὧ'] = 'Ὡ'
}

---- replace perispomeni with oxeia / αλλαγή περισπωμένης σε οξεία
export.perispomeni_to_oxeia = {
   ['ᾶ'] = 'ά', ['ᾷ'] = 'ᾴ', ['ἆ'] = 'ἄ', ['ᾆ'] = 'ᾄ', ['ἇ'] = 'ἅ', ['ᾇ'] = 'ᾅ',
   ['ῆ'] = 'ή', ['ῇ'] = 'ῄ', ['ἦ'] = 'ἤ', ['ᾖ'] = 'ᾔ', ['ἧ'] = 'ἥ', ['ᾗ'] = 'ᾕ',
   ['ῶ'] = 'ώ', ['ῷ'] = 'ῴ', ['ὦ'] = 'ὤ', ['ᾦ'] = 'ᾤ', ['ὧ'] = 'ὥ', ['ᾧ'] = 'ᾥ',
   ['ῖ'] = 'ί', ['ἶ'] = 'ἴ', ['ἷ'] = 'ἵ',
   ['ῦ'] = 'ύ', ['ὖ'] = 'ὔ', ['ὗ'] = 'ὕ'
}

---- replace oxeia with perispomeni / αλλαγή οξείας σε περισπωμένη 
export.oxeia_to_perispomeni = {
   ['ά'] = 'ᾶ', ['ᾴ'] = 'ᾷ', ['ἄ'] = 'ἆ', ['ᾄ'] = 'ᾆ', ['ἅ'] = 'ἇ', ['ᾅ'] = 'ᾇ',
   ['ή'] = 'ῆ', ['ῄ'] = 'ῇ', ['ἤ'] = 'ἦ', ['ᾔ'] = 'ᾖ', ['ἥ'] = 'ἧ', ['ᾕ'] = 'ᾗ',
   ['ώ'] = 'ῶ', ['ῴ'] = 'ῷ', ['ὤ'] = 'ὦ', ['ᾤ'] = 'ᾦ', ['ὥ'] = 'ὧ', ['ᾥ'] = 'ᾧ',
   ['ί'] = 'ῖ', ['ἴ'] = 'ἶ', ['ἵ'] = 'ἷ',
   ['ύ'] = 'ῦ', ['ὔ'] = 'ὖ', ['ὕ'] = 'ὗ'
}

export.digraphs = { 'αι', 'ει', 'οι', 'αυ', 'ευ', 'ηυ', 'ου' }
	--  υι ??

-- Move accent backwords
export.digraphs1 = { 
	['αΐ'] = 'άι',
	['εΐ'] = 'έι',
	['οΐ'] = 'όι',
	['αΰ'] = 'άυ',
	['εΰ'] = 'έυ',
	['ουί'] = 'ούι'
}
	-- oυϊ with accent? 

-- Convert modern greek diphthongs (pronounced as one syllable) to two separate vowels:
export.digraphs2 = {
    ['άι'] = 'αϊ',
    ['έι'] = 'εϊ',
    ['όι'] = 'οϊ',
    ['άυ'] = 'αϋ',
    ['έυ'] = 'εϋ',
    ['όυ'] = 'οϋ' 
}
	-- ήυ ??
    -- ['ύι'] = 'υϊ', not in nouns / δεν υπάρχει σε ουσιαστικά, μόνο στο επίθετο δρύινος.
    -- Αντίθετα, θα βάλει διαλυτικά στο βούισμα, βουΐσματα. Πολυτονικό?

return export

--[=[
Conversions of greek characters unaccented <--> accented vowels or digraphs
i) for [[monotonic]] script: only one accent: TONOS ⟨ ΄ ⟩
ii) for [[polytonic]] script: The diacritics: 
Τόνοι - Accents:
	[[τόνος]] tonos ([[οξεία]] oxia, acute) ⟨ ´ ) is now accepted as identical to the modern accent TONOS and the latin acute accent: ⟨ ´ ⟩.
		So, polytonic includes the functions of monotonic.
	[[περισπωμένη]] perispomeni ( ῀ ) similar but not identical to the latin circumflex  ( ˆ )
	(The [[βαρεία]], grave accent ( ˋ )  is used only in texts, not isolated words)
Πνεύματα - Breathings: 
	[[ψιλή]], psile, soft breathing ( ᾿ ) 
	[[δασεία]], daseia, rough breathing  ῾ )
[[διαίρεσις]] diaeresis or [[διαλυτικά]] dialytics:  splits digraph-vowels
[[υπογρεγραμμένη]] subscript [[ιώτα]] iota
For more, see https://en.wiktionary.org/wiki/Module:grc-utilities
Prosody: μακρόν (macron) or βραχύ (breve) are not marked in el.wiktionary, only mentioned.
]=]--