summaryrefslogtreecommitdiffstats
path: root/modules/conf/confmaker.pl
diff options
context:
space:
mode:
authorPeter von Kaehne <refdoc@gmx.net>2017-10-26 08:36:26 +0000
committerPeter von Kaehne <refdoc@gmx.net>2017-10-26 08:36:26 +0000
commit1857eefb96481ac2bd3b20bf1eb79d2e4171fd1a (patch)
tree4eb06e621a6bab739d574a0c4e854c9f02dab754 /modules/conf/confmaker.pl
parent7187eaf8f0973da7455d803b31e84a234e995252 (diff)
downloadsword-tools-1857eefb96481ac2bd3b20bf1eb79d2e4171fd1a.tar.gz
corrected handling of strongs and morph markup
git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@515 07627401-56e2-0310-80f4-f8cd0041bdcd
Diffstat (limited to 'modules/conf/confmaker.pl')
-rwxr-xr-xmodules/conf/confmaker.pl21
1 files changed, 17 insertions, 4 deletions
diff --git a/modules/conf/confmaker.pl b/modules/conf/confmaker.pl
index f5e6f23..355e7e1 100755
--- a/modules/conf/confmaker.pl
+++ b/modules/conf/confmaker.pl
@@ -136,7 +136,7 @@ if ((length($language)>0) && (length($doc_lang)==0)) {
##GlobalOptionsFilter - prepare
my @doc_features = ('title', 'note', 'reference', 'q', 'figure', 'rdg');
-my @word_features = ('lemma', 'gloss', 'morph',);
+my @word_features = ('lemma', 'strong', 'gloss', 'morph',);
my @char_features = ('Hebrew Vowel Points', 'Arabic Vowel Points', 'Hebrew Cantillation', 'Greek Accents');
my %doc_filters = ( 'title' => "OSISHeadings",
@@ -154,7 +154,7 @@ my %doc_filters = ( 'title' => "OSISHeadings",
);
-my %doc_feature = ( 'lemma' => 'StrongsNumbers',
+my %doc_feature = ( 'strong' => 'StrongsNumbers',
'figure' => 'Images',
'p' => 'NoParagraphs',
@@ -163,7 +163,7 @@ my %doc_feature = ( 'lemma' => 'StrongsNumbers',
my %diacritics = ( 'Hebrew Vowel Points' => "UTF8HebrewPoints",
'Arabic Vowel Points' => 'UTF8ArabicPoints',
'Hebrew Cantillation' => 'UTF8Cantillation',
-# 'Greek Accents' => 'UTF8GreekAccents',
+ 'Greek Accents' => 'UTF8GreekAccents',
);
@@ -189,6 +189,20 @@ foreach my $f(@word_features) {
}
+if ($doc_has_feature{'lemma'}) {
+ foreach my $e(@elements) {
+ if ($e->hasAttribute('lemma')) {
+ my $lemma = $e->getAttribute('lemma');
+
+ if (index(lc($lemma), 'strong') != -1) {
+ $doc_has_feature{'strong'}=true;
+ last;
+ }
+ }
+ }
+}
+
+
my @paragraphs = $doc->getElementsByTagName('p');
if (@paragraphs==0) {$doc_has_feature{'p'}=true};
@@ -230,7 +244,6 @@ foreach (@word_features) {
}
foreach $filter(@char_features) {
-
my $tmp = new Sword::SWBuf($hs->parse($doc->toString()));
$manager->filterText($filter, $tmp);