changeset 2230:48af49661497

SystemInfo: info for stemmer snowball added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 29 May 2007 11:06:49 +0200
parents c1ef587208c0
children ba51622d8283
files MoinMoin/macro/SystemInfo.py
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/SystemInfo.py	Tue May 29 10:16:11 2007 +0200
+++ b/MoinMoin/macro/SystemInfo.py	Tue May 29 11:06:49 2007 +0200
@@ -153,7 +153,21 @@
 
         row(_('Xapian search'), xapRow)
         row(_('Xapian Version'), xapVersion)
-        row(_('Xapian stemming'), xapState[request.cfg.xapian_stemming])
+ 
+        stems = [nonestr]
+        try:
+            import Stemmer
+            try:
+                stems = Stemmer.algorithms()
+                stemVersion = Stemmer.version()
+            except:
+                 stemVersion = _('!PyStemmer not installed')
+        except ImportError:
+            stemVersion = _('!PyStemmer not installed')
+ 
+        row(_('Snowball stemming'), xapState[request.cfg.xapian_stemming])
+        row(_('Snowball Version'), stemVersion)
+        row(_('Snowball stems'), ', '.join(stems) or nonestr)
 
         try:
             from threading import activeCount