mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-10-26 00:43:17 -06:00
word completion in the C runtime now returns multi-word expressions and the category for every expression
This commit is contained in:
1 parent
2aa14bfef8
commit
d1368c3519
4 files changed
+67
-35
No files matched your search
@@ -920,9 +920,10 @@ Iter_fetch_token(IterObject* self)
|
||||
if (tp == NULL)
|
||||
return NULL;
|
||||
|
||||
PyObject* ty_tok = gu2py_string(tp->tok);
|
||||
PyObject* res = Py_BuildValue("(f,O)", tp->prob, ty_tok);
|
||||
Py_DECREF(ty_tok);
|
||||
PyObject* py_tok = gu2py_string(tp->tok);
|
||||
PyObject* py_cat = gu2py_string(tp->cat);
|
||||
PyObject* res = Py_BuildValue("(f,O,O)", tp->prob, py_tok, py_cat);
|
||||
Py_DECREF(py_tok);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user