[mlpack] 118/207: Case insensitive condition added
Barak A. Pearlmutter
barak+git at pearlmutter.net
Thu Mar 23 17:53:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit 80c450425b7ac6d21b8d8298a5735e777783cf88
Author: Praveen Ch <chvsp972911 at gmail.com>
Date: Thu Mar 2 05:26:42 2017 +1100
Case insensitive condition added
---
src/mlpack/core/data/load_arff_impl.hpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/mlpack/core/data/load_arff_impl.hpp b/src/mlpack/core/data/load_arff_impl.hpp
index d34d2cd..8c84ad1 100644
--- a/src/mlpack/core/data/load_arff_impl.hpp
+++ b/src/mlpack/core/data/load_arff_impl.hpp
@@ -56,13 +56,15 @@ void LoadARFF(const std::string& filename,
// Get the annotation we are looking at.
std::string annotation(*it);
+ std::transform(annotation.begin(), annotation.end(), annotation.begin(),
+ ::tolower);
- if (*tok.begin() == "@relation")
+ if (annotation == "@relation")
{
// We don't actually have anything to do with the name of the dataset.
continue;
}
- else if (*tok.begin() == "@attribute")
+ else if (annotation == "@attribute")
{
++dimensionality;
// We need to mark this dimension with its according type.
@@ -84,7 +86,7 @@ void LoadARFF(const std::string& filename,
throw std::logic_error("list of ARFF values not yet supported");
}
}
- else if (*tok.begin() == "@data")
+ else if (annotation == "@data")
{
// We are in the data section. So we can move out of this loop.
break;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list