pub fn core_char(c: &char) -> Option<char>Expand description
The function helps giving the core text of a greek new testament critical edition.
This might be useful for comparing greek new testament critical editions by gettig their “core” differences/concordances.
In concrete terms, core_char remove any character that is not in the greek alphabet, puts all greek letters in lowercase, and change all sigmas to lunar sigma.
So this function :
- does not replace nomina sacras (e.g., κϲ) by their non-abreviated form (resp. κυριοϲ), nor words (e.g., κύριος) by their nomina sacras form (when a nomina sacra form exists) (resp. κϲ).
- is made to delete any character used to encode nomina sacras (e.g., ‘|’, or ‘(’ and ‘)’), hence |κς| will give κϲ.
- does delete all ‘ˉ’ characters (so παραβολὴˉ becomes παραβολη, not παραβολην) TODO : expliquer pourquoi on ne garde pas le point median.
§Example :
use gnt_tools::core_char;
let s = "16 Εἶπεν δὲ παραβολὴν πρὸς αὐτοὺς λέγων·
ἀνθρώπου τινὸς πλουσίου εὐφόρησεν ἡ χώρα. 17
καὶ διελογίζετο ἐν ἑαυτῷ λέγων· τί ποιήσω, ὅτι
οὐκ ἔχω ποῦ συνάξω τοὺς καρπούς μου; ";
let s2 = "ειπενδεπαραβοληνπροϲαυτουϲλεγωνανθρωπουτ\
ινοϲπλουϲιουευφορηϲενηχωρακαιδιελογιζετοενεαυτω\
λεγωντιποιηϲωοτιουκεχωπουϲυναξωτουϲκαρπουϲμου";
let core_text : String = s.chars()
.filter_map(|c| core_char(&c))
.collect();
assert_eq!(core_text.as_str(), s2);