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
I investigate this problem and found that recent merge (#477) broke the sentence piece output. This is because of the line number 94 in the xnmt/sent.py
84defsent_str(self, custom_output_procs=None, **kwargs) ->str:
85""" 86 Return a single string containing the readable version of the sentence. 87 88 Args: 89 custom_output_procs: if not None, overwrite the sentence's default output processors 90 **kwargs: should accept arbitrary keyword args 91 92 Returns: readable string 93 """94out_str=" ".join(self.str_tokens(**kwargs))
95pps=self.output_procs96ifcustom_output_procsisnotNone:
97pps=custom_output_procs98ifisinstance(pps, OutputProcessor): pps= [pps]
99forppinpps:
100out_str=pp.process(out_str)
101# TODO: change output processor interface accordingly102returnout_str
This creates a 'space' separated sentence piece output like: so steve lo pe z , a column of los angeles times , street streets in los angeles , when he hear d a beautiful music .
In the sentence piece, we have to join that by empty string, not space.
I investigate this problem and found that recent merge (#477) broke the sentence piece output. This is because of the line number 94 in the
xnmt/sent.py
This creates a 'space' separated sentence piece output like:
so steve lo pe z , a column of los angeles times , street streets in los angeles , when he hear d a beautiful music .
In the sentence piece, we have to join that by empty string, not space.
How to correctly solve this @msperber, @neubig ?
The text was updated successfully, but these errors were encountered: