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
use_known=True gives error
Look at the followings:
mtr = MosesTruecaser("mymodel_x")
mtr.truecase("THE ADVENTURES OF SHERLOCK HOLMES")
['the', 'adventures', 'OF', 'Sherlock', 'HOLMES']
mtr.truecase("THE ADVENTURES OF SHERLOCK HOLMES", return_str=True)
'the adventures OF Sherlock HOLMES'
mtr.truecase("THE ADVENTURES OF SHERLOCK HOLMES", return_str=True, use_known=True)
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sacremoses/truecase.py", line 306, in truecase
token = token + other_factors
TypeError: unsupported operand type(s) for +: 'int' and 'str'
mdtr.detruecase("the adventures OF Sherlock HOLMES", return_str=True)
'The adventures OF Sherlock HOLMES'
The text was updated successfully, but these errors were encountered:
use_known=True gives error
Look at the followings:
The text was updated successfully, but these errors were encountered: