diff documentViewer.py @ 141:39c7d6164da8

characterNormalization (reg,norm, none)
author abukhman
date Thu, 12 Aug 2010 12:08:24 +0200
parents 6345583d809a
children 83e35adb92d3
line wrap: on
line diff
--- a/documentViewer.py	Wed Aug 11 12:17:46 2010 +0200
+++ b/documentViewer.py	Thu Aug 12 12:08:24 2010 +0200
@@ -226,13 +226,14 @@
         return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)
   
     security.declareProtected('View','index_html')
-    def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None):
+    def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None, characterNormalization=None):
         '''
         view it
         @param mode: defines how to access the document behind url 
         @param url: url which contains display information
         @param viewMode: if images display images, if text display text, default is auto (text,images or auto)
         @param tocMode: type of 'table of contents' for navigation (thumbs, text, figures, none)
+        @param characterNormalization type of text display (reg, norm, none)
         @param querySearch: type of different search modes (fulltext, fulltextMorph, xpath, xquery, ftIndex, ftIndexMorph, fulltextMorphLemma)
         '''
         
@@ -677,7 +678,7 @@
         self.REQUEST.SESSION['docinfo'] = docinfo
         return docinfo
                
-    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None):
+    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None, characterNormalization=None):
         """returns pageinfo with the given parameters"""
         pageinfo = {}
         current = getInt(current)
@@ -700,6 +701,7 @@
                 pageinfo['numgroups'] += 1        
         pageinfo['viewMode'] = viewMode
         pageinfo['tocMode'] = tocMode
+        pageinfo['characterNormalization'] =characterNormalization
         pageinfo['query'] = self.REQUEST.get('query',' ')
         pageinfo['queryType'] = self.REQUEST.get('queryType',' ')
         pageinfo['querySearch'] =self.REQUEST.get('querySearch', 'fulltext')