从字节创建StringCharFeatures

时间:2015-08-16 13:15:26

标签: python-3.x shogun

我需要从包含非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 *)

有没有办法解决它?

1 个答案:

答案 0 :(得分:0)

这应该适用于最新的开发,修复将包含在6.2.0