summaryrefslogtreecommitdiff
path: root/python/src/sa/sym.pxi
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-12-28 10:28:55 +0100
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-12-28 10:28:55 +0100
commitf60f6a0c753ad9365ab29f9ba0fa6bfdfe0ed3a2 (patch)
tree3a69ef50902265156946032e9e7e030953b96545 /python/src/sa/sym.pxi
parent0e48f7418f3d0a66563d1e0f1a21f3ccae541852 (diff)
parenta8c0f7ae3b1c3c1219eed1b382ef6ee5bd9cf0f3 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/src/sa/sym.pxi')
-rw-r--r--python/src/sa/sym.pxi6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/src/sa/sym.pxi b/python/src/sa/sym.pxi
index f47599cf..81f19ef1 100644
--- a/python/src/sa/sym.pxi
+++ b/python/src/sa/sym.pxi
@@ -114,3 +114,9 @@ def decode_lattice(lattice):
def decode_sentence(lattice):
return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice)
+
+def encode_words(words):
+ return tuple(sym_fromstring(word, True) for word in words)
+
+def decode_words(syms):
+ return tuple(sym_tostring(sym) for sym in syms) \ No newline at end of file