Skip to content

Commit

Permalink
start some NLP stuff
Browse files Browse the repository at this point in the history
fix to typo in example_callback.cpp
  • Loading branch information
djmott committed Jul 26, 2016
1 parent 03b783f commit 3d293fe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/example_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main(){
Multiplier oMultiplier;

//attach multiplier instance to oMultiply using .connect() method. This requires the class member to invoke and the instance to invoke it on
oMultiply.connect<Multiplier, &Multiplier::Multiply>(&oMultipler);
oMultiply.connect<Multiplier, &Multiplier::Multiply>(&oMultiplier);

std::cout << "Calling oMultipler.Multiply(6,3) through oMultiply callback returns : " << oMultiply(6, 3) << std::endl;
return 0;
Expand Down
16 changes: 16 additions & 0 deletions include/xtd/nlp/bag_of_words.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @file
histogram of words in a document
@copyright David Mott (c) 2016. Distributed under the Boost Software License Version 1.0. See LICENSE.md or http://boost.org/LICENSE_1_0.txt for details.
*/


namespace xtd{
namespace nlp{
class bag_of_words : std::map<std::string, uint32_t>{
public:
explicit bag_of_words(const xtd::string& src){
auto sWords = src.split();
}
};
}
}
3 changes: 2 additions & 1 deletion include/xtd/nlp/nlp.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @file
natural language processing
@copyright David Mott (c) 2016. Distributed under the Boost Software License Version 1.0. See LICENSE.md or http://boost.org/LICENSE_1_0.txt for details.
*/

2 changes: 2 additions & 0 deletions include/xtd/xtd.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -399,4 +399,6 @@ TODO("Remove cassert when XTD implementation is finished")
#include <xtd/windows/dbghelp.hpp>
#endif

#include <xtd/nlp/nlp.hpp>

#include <xtd/exception.inl>

0 comments on commit 3d293fe

Please sign in to comment.