我需要从包含非ascii字符的字符串列表(例如“é”)创建一个幕府将军StringCharFeatures
。
在python 2中,这有效:
from modshogun import StringCharFeatures, RAWBYTE
StringCharFeatures([u"abcdé".encode('LATIN-1')], RAWBYTE)
但是使用python 3,它引发了一个异常:
NotImplementedError: Wrong number or type of arguments for overloaded function 'new_StringCharFeatures'.
Possible C/C++ prototypes are:
shogun::CStringFeatures< char >::CStringFeatures()
shogun::CStringFeatures< char >::CStringFeatures(shogun::EAlphabet)
shogun::CStringFeatures< char >::CStringFeatures(shogun::SGStringList< char >,shogun::EAlphabet)
shogun::CStringFeatures< char >::CStringFeatures(shogun::SGStringList< char >,shogun::CAlphabet *)
shogun::CStringFeatures< char >::CStringFeatures(shogun::CAlphabet *)
shogun::CStringFeatures< char >::CStringFeatures(shogun::CStringFeatures< char > const &)
shogun::CStringFeatures< char >::CStringFeatures(shogun::CFile *,shogun::EAlphabet)
shogun::CStringFeatures< char >::CStringFeatures(shogun::CFile *)
有没有办法解决它?
答案 0 :(得分:0)
这应该适用于最新的开发,修复将包含在6.2.0
中