[sword-svn] r515 - trunk/modules/conf

refdoc at crosswire.org refdoc at crosswire.org
Thu Oct 26 01:36:26 MST 2017


Author: refdoc
Date: 2017-10-26 01:36:26 -0700 (Thu, 26 Oct 2017)
New Revision: 515

Modified:
   trunk/modules/conf/confmaker.pl
Log:
corrected handling of strongs and morph markup


Modified: trunk/modules/conf/confmaker.pl
===================================================================
--- trunk/modules/conf/confmaker.pl	2017-06-10 21:06:44 UTC (rev 514)
+++ trunk/modules/conf/confmaker.pl	2017-10-26 08:36:26 UTC (rev 515)
@@ -136,7 +136,7 @@
 ##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_feature = ( 'lemma' => 'StrongsNumbers',
+my %doc_feature = ( 'strong' => 'StrongsNumbers',
                     'figure' => 'Images',
                      'p'  => 'NoParagraphs',
 
@@ -163,7 +163,7 @@
 my %diacritics = ( 'Hebrew Vowel Points' => "UTF8HebrewPoints",
                    'Arabic Vowel Points' => 'UTF8ArabicPoints',
                    'Hebrew Cantillation' => 'UTF8Cantillation',
-#                   'Greek Accents' 	 => 'UTF8GreekAccents',
+                   'Greek Accents' 	 => 'UTF8GreekAccents',
                  );
 
             
@@ -189,6 +189,20 @@
  
 }   
 
+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 $filter(@char_features) {
-   
    my $tmp = new Sword::SWBuf($hs->parse($doc->toString()));
    
    $manager->filterText($filter, $tmp);




More information about the sword-cvs mailing list