[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG/src - normalizer.c:1.1.2.7

Andreas Jung andreas@digicool.com
Mon, 11 Feb 2002 22:09:35 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG/src
In directory cvs.zope.org:/tmp/cvs-serv10980/src

Modified Files:
      Tag: ajung-textindexng-branch
	normalizer.c 
Log Message:
 - added getTable() to extract translation table
 - more flexible handling for reading normalization files


=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/src/normalizer.c 1.1.2.6 => 1.1.2.7 ===
 }
 
+static PyObject *getTable(normalizer *self,PyObject *word)
+{
+    return self->table;
+}
+
 static PyObject *NormalizeWord(normalizer *self,PyObject *word)
 {
     int i;
@@ -153,6 +158,10 @@
 
 static struct PyMethodDef normalizer_methods[] =
     {
+        { "getTable", (PyCFunction)getTable,
+            METH_VARARGS, "getTable()"
+            "-- return the normalization table"
+        },
         { "normalize", (PyCFunction)normalize,
             METH_VARARGS, "normalize([string],[or list]) "
             "-- normalize a string or a list of strings/unicode strings"