String feature #703

Merged
merged 4 commits into from May 23, 2014

Projects

None yet

3 participants

@unnonouno
Jubatus member

I made string_feature interface, and made word_splitter its subclass.
And, I replaced all other classes related to word_splitter with ones that use string_feature.

This patch breaks many compatibilities.

@unnonouno
Jubatus member

fixes #658

@kmaehashi kmaehashi added this to the Near Future milestone Apr 7, 2014
@unnonouno unnonouno changed the title from (WIP) String feature to String feature May 1, 2014
@kmaehashi kmaehashi modified the milestone: 0.6.0, Near Future May 7, 2014
@kumagi kumagi was assigned by kmaehashi May 7, 2014
@kumagi kumagi assigned unnonouno and unassigned kumagi May 19, 2014
@kumagi kumagi commented on the diff May 23, 2014
jubatus/core/fv_converter/word_splitter.cpp
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+#include "word_splitter.hpp"
+
+#include <vector>
+
+namespace jubatus {
+namespace core {
+namespace fv_converter {
+
+void word_splitter::extract(
+ const std::string& text,
@kumagi
kumagi May 23, 2014

It requires #include<string> via cpplint.

@kumagi kumagi commented on the diff May 23, 2014
jubatus/core/fv_converter/word_splitter.cpp
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+#include "word_splitter.hpp"
+
+#include <vector>
+
+namespace jubatus {
+namespace core {
+namespace fv_converter {
+
+void word_splitter::extract(
+ const std::string& text,
+ std::vector<string_feature_element>& result) const {
+ std::vector<std::pair<size_t, size_t> > boundaries;
@kumagi
kumagi May 23, 2014

std::pair requires #include <utility>

@kumagi
Jubatus member

LGTM

@kumagi kumagi merged commit 3054681 into develop May 23, 2014

1 check passed

Details continuous-integration/travis-ci The Travis CI build passed
@kumagi kumagi deleted the string-feature branch May 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment