[mlpack-git] master: Split correctly on comments too. (c13ca51)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 11:45:00 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/de9cc4b05069e1fa4793d9355f2f595af5ff45d2...6070527af14296cd99739de6c62666cc5d2a2125

>---------------------------------------------------------------

commit c13ca51c72bbe5d3cbb35acb4480c506f7a29ad2
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Oct 21 12:03:02 2015 -0400

    Split correctly on comments too.


>---------------------------------------------------------------

c13ca51c72bbe5d3cbb35acb4480c506f7a29ad2
 src/mlpack/core/data/load_arff_impl.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/core/data/load_arff_impl.hpp b/src/mlpack/core/data/load_arff_impl.hpp
index 32651f4..1e6dc73 100644
--- a/src/mlpack/core/data/load_arff_impl.hpp
+++ b/src/mlpack/core/data/load_arff_impl.hpp
@@ -42,8 +42,8 @@ void LoadARFF(const std::string& filename,
     if (line[0] == '@')
     {
       typedef boost::tokenizer<boost::escaped_list_separator<char>> Tokenizer;
-      std::string spaces = " \t";
-      boost::escaped_list_separator<char> sep("\\", spaces, "\"{");
+      std::string separators = " \t\%"; // Split on comments too.
+      boost::escaped_list_separator<char> sep("\\", separators, "\"{");
       Tokenizer tok(line, sep);
       Tokenizer::iterator it = tok.begin();
 



More information about the mlpack-git mailing list