You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In python interpreter, run the following command line by line
importpgfgrammar=pgf.readPGF("Foods.pgf")
lang=grammar.languages["FoodsEng"]
x=lang.complete("that fish is very delicious")
print([tfortinx] )
# [(4.9416422843933105, 'very', 'Quality', 'Very'),# (6.887552261352539, 'very', 'Quality', 'Very')]# Do it againx=lang.complete("that fish is very delicious")
print([tfortinx] )
# [(4.9416422843933105, 'very', 'Quality', 'Very'),# (6.887552261352539, 'very', 'Quality', 'Very')]# Do it againx=lang.complete("that fish is very delicious")
print([tfortinx] )
# [(6.887552261352539, 'very', 'Quality', 'Very')]# Do it againx=lang.complete("that fish is very delicious")
print([tfortinx] )
# []# Do it againx=lang.complete("that fish is very delicious")
print([tfortinx] )
# [(6.887552261352539, 'very', 'Quality', 'Very')]
It seems the completion results change every time, and if I restart the python interpreter and do it again , it also changes.
Strange Behavior Reproduction 2
If I put the above code into a python script, say run.py and execute it with python interpreter.
The results will always be empty list;
[]
[]
[]
[]
[]
This seems to be deterministic, but it doesn't align with the above behavior.
How would you interpret these two behavior ?
The text was updated successfully, but these errors were encountered:
Hello,
Today I noticed two wired behaviors while using
complete
function with GF.The following code are executed with
pyg==1.0
Strange Behavior Reproduction 1
Take this PGF file as example: https://listenmaa.fi/b/Foods.pgf
In python interpreter, run the following command line by line
It seems the completion results change every time, and if I restart the python interpreter and do it again , it also changes.
Strange Behavior Reproduction 2
If I put the above code into a python script, say
run.py
and execute it with python interpreter.The results will always be empty list;
This seems to be deterministic, but it doesn't align with the above behavior.
How would you interpret these two behavior ?
The text was updated successfully, but these errors were encountered: