提升标记器csv未知的转义序列

时间:2017-01-03 17:09:22

标签: c++ csv boost

我正在尝试将csv文件拆分为字符串向量。但是我收到了这个错误

    terminate called after throwing an instance of boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::escaped_list_error> >'
what():  unknown escape sequence

这是我收到错误的行:

"13986";"Parallelizing Convolutional Neural Networks on Intel $^{\textregistered }$$ Many Integrated Core Architecture.";"2015";"Junjie Liu|Haixia Wang|Dongsheng Wang|Yuan Gao|Zuofeng Li";"1";"2016-08-21 09:53:00";"Parallelizing Convolutional Neural Networks on Intel^{ textregistered} Many Integrated Core Architecture. J Liu, H Wang, D Wang, Y Gao, Z Li -   Architecture of Computing Systems, 2015 - Springer. Abstract Convolutional neural networks (CNNs) are state-of-the-art machine learning  algorithm in low-resolution vision tasks and are widely applied in many applications.  However, the training process of them is very time-consuming. As a result, many  .."

这是我正在使用的功能:

vector<string> parse(string s){
    typedef tokenizer<escaped_list_separator<char> > so_tokenizer;
    vector<string> strs;
    so_tokenizer tok(s, escaped_list_separator<char>('\\', ';', '\"'));
    cout << s << endl;
    for(so_tokenizer::iterator beg=tok.begin(); beg!=tok.end(); ++beg){
        strs.push_back(*beg);
    }
    return strs;
}

0 个答案:

没有答案