diff --git a/contrib/py-bindings/PyGF.hsc b/contrib/py-bindings/PyGF.hsc index ddd3920b6..fc827e68f 100644 --- a/contrib/py-bindings/PyGF.hsc +++ b/contrib/py-bindings/PyGF.hsc @@ -1,7 +1,7 @@ {-# LANGUAGE ForeignFunctionInterface #-} -- -- GF Python bindings --- Jordi Saludes, upc.edu 2010 +-- Jordi Saludes, upc.edu 2010, 2011 -- module PyGF where @@ -157,9 +157,6 @@ listToPyStrings ss = do pcs <- pyString cs pyl << pcs - --- foreign export ccall "gf_freeArray" free :: Ptr a -> IO () - foreign export ccall gf_showLanguage :: Ptr Language -> IO CString gf_showLanguage plang = do diff --git a/contrib/py-bindings/example.rst b/contrib/py-bindings/example.rst index 4d3c015c0..770c6e862 100644 --- a/contrib/py-bindings/example.rst +++ b/contrib/py-bindings/example.rst @@ -9,7 +9,7 @@ First you must import the library: >>> import gf -then load a .pgf file, like this tiny example: +then load a PGF file, like this tiny example: >>> pgf = gf.read_pgf("Query.pgf") @@ -73,7 +73,7 @@ Is it important to note the blank space at the end, otherwise we get it again: ['is'] But, how come that nothing is suggested at "is "? -At the current point, a literal integer is expected so GF would have to present an infinite list of alternatives. I can not blame it for refusing to do so. +At the current point, a literal integer is expected so GF would have to present an infinite list of alternatives. I cannot blame it for refusing to do so. >>> pgf.complete(eng, "is 42 ") ['even', 'odd', 'prime'] diff --git a/contrib/py-bindings/gfmodule.c b/contrib/py-bindings/gfmodule.c index 931baf072..99824fb77 100644 --- a/contrib/py-bindings/gfmodule.c +++ b/contrib/py-bindings/gfmodule.c @@ -267,7 +267,7 @@ static PyMethodDef expr_methods[] = { -/* tree typr: methods, constructor and destructor */ +/* tree type: methods, constructor and destructor */ // Are Expr and Tree equivalent ? REPRCB(tree_repr, Tree, gf_showExpr) diff --git a/contrib/py-bindings/test.py b/contrib/py-bindings/test.py index 6ec3f77cc..9ea6c1f45 100644 --- a/contrib/py-bindings/test.py +++ b/contrib/py-bindings/test.py @@ -108,7 +108,7 @@ class TestLinearize(unittest.TestCase): l = self.lang for abs,cnc in self.samples: ts = self.pgf.parse(l, cnc['eng']) - self.assertEqual(cnc['eng'],self.pgf.lin(l,ts[0])) + self.assertEqual(cnc['eng'],self.pgf.linearize(l,ts[0])) class TestTranslate(unittest.TestCase): def setUp(self): @@ -123,7 +123,7 @@ class TestTranslate(unittest.TestCase): if i==j: continue parsed = self.pgf.parse(l, cnc[i]) assert len(parsed) == 1 - lin = self.pgf.lin(m,parsed[0]) + lin = self.pgf.linearize(m,parsed[0]) self.assertEqual(lin,cnc[j]) class TestUnapplyExpr(unittest.TestCase):