Module:grk-stems/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 = {}

---- 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.
]=]--